|
CTS-SAT-1-OBC-Firmware
|
#include "main.h"#include "comms_drivers/ax100_tx.h"#include "comms_drivers/ax100_hw.h"#include "log/log.h"#include "debug_tools/debug_uart.h"#include "rtos_tasks/rtos_bootup_operation_fsm_task.h"#include "comms_drivers/rf_antenna_switch.h"#include <string.h>#include <stdint.h>
Functions | |
| static void | prepend_csp_header (uint8_t *destination, uint8_t *data, uint32_t data_len) |
Write the csp header (4 bytes) to the beginning of the packet, then copy the rest of data into destination. | |
| static uint8_t | send_bytes_to_ax100 (uint8_t *packet, uint16_t packet_size) |
| Send a csp packet over i2c to the AX100 for downlink. | |
| uint8_t | AX100_downlink_bytes (uint8_t *data, uint16_t data_len) |
| Send data to the ax100 for downlink. | |
Variables | |
| uint32_t | AX100_enable_downlink_uart_logs = 0 |
| When enabled, the radio packets will be sent to the Debug UART for debugging purposes. | |
| uint32_t | AX100_enable_downlink_inhibited_uart_logs = 1 |
| When enabled, log messages like "Downlink inhibited: ..." will be sent to the Debug UART. | |
| static const uint32_t | csp_priority = 3u << 30 |
| static const uint32_t | own_csp_addr = 1u << 25 |
| static const uint32_t | ground_station_csp_addr = 10u << 20 |
| static const uint32_t | ground_station_csp_port = 10u << 14 |
| static const uint32_t | own_csp_port = 10u << 8 |
| static const uint32_t | use_hmac = 0 << 3 |
| static const uint32_t | use_xtea = 0 << 2 |
| static const uint32_t | use_rdp = 0 << 1 |
| static const uint32_t | use_crc = 0 |
| static const uint32_t | AX100_i2c_tx_timeout_ms = 100 |
| static uint8_t | packet_buffer_including_csp_header [AX100_DOWNLINK_MAX_BYTES+AX100_CSP_HEADER_LENGTH_BYTES] |
| uint8_t AX100_downlink_bytes | ( | uint8_t * | data, |
| uint16_t | data_len ) |
Send data to the ax100 for downlink.
| data | pointer to the data to downlink |
| data_len | length of the data |


|
static |
Write the csp header (4 bytes) to the beginning of the packet, then copy the rest of data into destination.
| destination | where the assembled packet will be stored |
| data | data to place in the packet |
| data_len | length of data |

|
static |
Send a csp packet over i2c to the AX100 for downlink.


| uint32_t AX100_enable_downlink_inhibited_uart_logs = 1 |
When enabled, log messages like "Downlink inhibited: ..." will be sent to the Debug UART.
| uint32_t AX100_enable_downlink_uart_logs = 0 |
When enabled, the radio packets will be sent to the Debug UART for debugging purposes.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |