CTS-SAT-1-OBC-Firmware
|
#include "main.h"
#include "debug_tools/debug_uart.h"
#include "debug_tools/debug_i2c.h"
#include "eps_drivers/eps_types.h"
#include "eps_drivers/eps_internal_drivers.h"
#include "uart_handler/uart_handler.h"
#include "stm32/stm32_timing_helpers.h"
#include "log/log.h"
#include <stdint.h>
#include <string.h>
Functions | |
uint8_t | EPS_send_cmd_get_response (const uint8_t cmd_buf[], uint8_t cmd_buf_len, uint8_t rx_buf[], uint16_t rx_buf_len) |
Sends a command to the EPS, and receives the response. | |
uint8_t | EPS_run_argumentless_cmd (uint8_t command_code) |
Sends an argumentless command to the EPS (expecting no data in the response). | |
Variables | |
UART_HandleTypeDef * | UART_eps_port_handle |
static const uint32_t | EPS_TX_TIMEOUT_MS = 1000 |
static const uint32_t | EPS_RX_TIMEOUT_BEFORE_FIRST_BYTE_MS = 50 |
static const uint32_t | EPS_RX_TIMEOUT_BETWEEN_BYTES_MS = 25 |
uint32_t | CONFIG_EPS_enable_uart_debug_print = 0 |
When enabled, the EPS's raw data is sent to the debug UART. | |
uint8_t EPS_run_argumentless_cmd | ( | uint8_t | command_code | ) |
Sends an argumentless command to the EPS (expecting no data in the response).
command_code | Command code number. |
uint8_t EPS_send_cmd_get_response | ( | const uint8_t | cmd_buf[], |
uint8_t | cmd_buf_len, | ||
uint8_t | rx_buf[], | ||
uint16_t | rx_buf_len ) |
Sends a command to the EPS, and receives the response.
cmd_buf | Array of bytes to send to the EPS, including the command code, STID, IVID, etc. |
cmd_buf_len | Exact length of the command buffer. |
rx_buf | Buffer to store the response. Is filled with the response, without tags. |
rx_buf_len | Length of the response buffer. Must be the command length. |
uint32_t CONFIG_EPS_enable_uart_debug_print = 0 |
When enabled, the EPS's raw data is sent to the debug UART.
|
static |
|
static |
|
static |
|
extern |