xcvr module
The xcvr module offers high-level functions for transceiver R/W access.
|
Read a number of bytes from transceiver register interface via I2C. |
|
Write a number of bytes to transceiver register interface via I2C. |
|
Read a number of bytes from transceiver register interface via I2C. |
|
Write a number of bytes to transceiver register interface via I2C. |
|
Read 4 bytes from transceiver register interface. |
|
Write 4 bytes to transceiver register interface. |
|
Read 2 bytes from transceiver register interface. |
|
Write 2 bytes to transceiver register interface. |
|
Read access speed on a transceiver I2C access in the unit of KHz. |
|
Set access speed on a transceiver I2C access in the unit of KHz. |
Module Contents
Transceiver R/W functions
- async get_xcvr_rw_seq_bank(port, bank, page, register, length)[source]
Read a number of bytes from transceiver register interface via I2C.
- Parameters:
- Returns:
The read bytes as a string, e.g. ‘DEADBEEF’
- Return type:
- async set_xcvr_rw_seq_bank(port, bank, page, register, value)[source]
Write a number of bytes to transceiver register interface via I2C.
- Parameters:
port (Z1600EdunPort | Z800FreyaPort | Z400ThorPort | Z100LokiPort | Z10OdinPort) – The port object
bank (int) – The bank address, e.g. 10 or 0xA
page (int) – The page address, e.g. 10 or 0xA
register (int) – The register address, e.g. 10 or 0xA
value (str) – The bytes to write as a string, e.g. ‘DEADBEEF’
- async get_xcvr_rw_seq(port, page, register, length)[source]
Read a number of bytes from transceiver register interface via I2C.
- Parameters:
- Returns:
The read bytes as a string, e.g. ‘DEADBEEF’
- Return type:
- async set_xcvr_rw_seq(port, page, register, value)[source]
Write a number of bytes to transceiver register interface via I2C.
- async set_xcvr_rw(port, page, register, value)[source]
Write 4 bytes to transceiver register interface.
- async get_i2c_freq_khz(port)[source]
Read access speed on a transceiver I2C access in the unit of KHz. Default to 100.
When the transceiver is plugged out and in again, the speed will be reset to the default value 100. The speed has a minimum and a maximum, which can be obtained from P_CAPABILITIES.
The I2C speed configuration will not be included in the port configuration file (.xpc). When you load a port configuration to a port, the transceiver I2C access speed will be reset to default 100.
- Parameters:
port (Z1600EdunPort | Z800FreyaPort | Z400ThorPort | Z100LokiPort | Z10OdinPort) – The port object
- Returns:
The current I2C access speed in KHz
- Return type:
- async set_i2c_freq_khz(port, frequency)[source]
Set access speed on a transceiver I2C access in the unit of KHz.
When the transceiver is plugged out and in again, the speed will be reset to the default value 100. The speed has a minimum and a maximum, which can be obtained from P_CAPABILITIES.
The I2C speed configuration will not be included in the port configuration file (.xpc). When you load a port configuration to a port, the transceiver I2C access speed will be reset to default 100.
- Parameters:
port (Z1600EdunPort | Z800FreyaPort | Z400ThorPort | Z100LokiPort | Z10OdinPort) – The port object
frequency (int) – The desired I2C access speed in KHz