CTS-SAT-1-OBC-Firmware
|
#include "main.h"
#include "antenna_deploy_drivers/ant_internal_drivers.h"
#include "debug_tools/debug_i2c.h"
#include "debug_tools/debug_uart.h"
#include "log/log.h"
#include <stdint.h>
#include <string.h>
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 | |
const uint8_t | ANT_i2c_timeout_ms = 100 |
This file contains commands for communicating with the antenna deploy system(ADS). The ADS has two microcontrollers which control the deployment of the antennas. It also has two separate i2c buses which can be used to communicate with the ADS. The combination of microcontroller (mcu) to communicate to and i2c line to use is specified using a value from the Ant_i2c_bus_mcu enum. | |
I2C_HandleTypeDef | hi2c2 |
I2C_HandleTypeDef | hi2c3 |
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.
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 |
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.
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 |
const uint8_t ANT_i2c_timeout_ms = 100 |
This file contains commands for communicating with the antenna deploy system(ADS). The ADS has two microcontrollers which control the deployment of the antennas. It also has two separate i2c buses which can be used to communicate with the ADS. The combination of microcontroller (mcu) to communicate to and i2c line to use is specified using a value from the Ant_i2c_bus_mcu enum.
Timeout (ms) for both RX and TX I2C operations. 50ms seems adequate, but perhaps right on the limit.
|
extern |
|
extern |