CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
ant_internal_drivers.h File Reference
#include <stdint.h>
Include dependency graph for ant_internal_drivers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ANT_DEFAULT_RX_LEN_MIN   5
 

Enumerations

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...
 

Functions

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.
 
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.
 

Variables

static const uint16_t ANT_ADDR_A = 0x31
 
static const uint16_t ANT_ADDR_B = 0x32
 

Macro Definition Documentation

◆ ANT_DEFAULT_RX_LEN_MIN

#define ANT_DEFAULT_RX_LEN_MIN   5

Enumeration Type Documentation

◆ 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 

Function Documentation

◆ 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_mcuthe i2c_bus_mcu to read from. Either ANT_I2C_BUS_A_MCU_A or ANT_I2C_BUS_B_MCU_B
rx_bufArray to store the response from the antenna controller
rx_lenLength of the response buffer
Returns
0 upon success, 1 if read_status received HAL_ERROR
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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_mcuthe i2c_bus and mcu combination to use/transmit to. Either ANT_I2C_BUS_A_MCU_A or ANT_I2C_BUS_B_MCU_B
cmd_bufArray of bytes to send to the antenna controller
cmd_lenLength 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
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ANT_ADDR_A

const uint16_t ANT_ADDR_A = 0x31
static

◆ ANT_ADDR_B

const uint16_t ANT_ADDR_B = 0x32
static