#include <stdint.h>
Go to the source code of this file.
|
enum | ANT_i2c_bus_mcu { ANT_I2C_BUS_A_MCU_A
, ANT_I2C_BUS_B_MCU_B
} |
| the antenna deployment module has two different i2c connections and two different microcontrollers. The values of this enum represent a combination of the i2c line to use in transmission and the microcontroller to transmit to. More...
|
|
◆ ANT_DEFAULT_RX_LEN_MIN
#define ANT_DEFAULT_RX_LEN_MIN 5 |
◆ ANT_i2c_bus_mcu
the antenna deployment module has two different i2c connections and two different microcontrollers. The values of this enum represent a combination of the i2c line to use in transmission and the microcontroller to transmit to.
Enumerator |
---|
ANT_I2C_BUS_A_MCU_A | |
ANT_I2C_BUS_B_MCU_B | |
◆ ANT_get_response()
uint8_t ANT_get_response |
( |
enum ANT_i2c_bus_mcu | i2c_bus_mcu, |
|
|
uint8_t | rx_buf[], |
|
|
uint16_t | rx_len ) |
Receives a response from the antenna controller.
- Parameters
-
i2c_bus_mcu | the i2c_bus_mcu to read from. Either ANT_I2C_BUS_A_MCU_A or ANT_I2C_BUS_B_MCU_B
|
rx_buf | Array to store the response from the antenna controller |
rx_len | Length of the response buffer |
- Returns
- 0 upon success, 1 if read_status received HAL_ERROR
◆ ANT_send_cmd()
uint8_t ANT_send_cmd |
( |
enum ANT_i2c_bus_mcu | i2c_bus_mcu, |
|
|
uint8_t | cmd_buf[], |
|
|
uint8_t | cmd_len ) |
Sends a command to the antenna controller.
- Parameters
-
i2c_bus_mcu | the i2c_bus and mcu combination to use/transmit to. Either ANT_I2C_BUS_A_MCU_A or ANT_I2C_BUS_B_MCU_B |
cmd_buf | Array of bytes to send to the antenna controller |
cmd_len | Length of the command buffer |
- Returns
- 0 upon success, 1 if tx_status received HAL_ERROR, 2 if tx_status received HAL_BUSY, 3 if tx_status received HAL_TIMEOUT, 4 if invalid i2c bus/mcu is passed
◆ ANT_ADDR_A
const uint16_t ANT_ADDR_A = 0x31 |
|
static |
◆ ANT_ADDR_B
const uint16_t ANT_ADDR_B = 0x32 |
|
static |