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

Go to the source code of this file.

Macros

#define EPS_I2C_ADDR   (0x20 << 1)
 
#define EPS_COMMAND_STID   0x1A
 
#define EPS_COMMAND_IVID   0x07
 
#define EPS_COMMAND_BID   0x00
 
#define EPS_DEFAULT_RX_LEN_MIN   5
 
#define EPS_MAX_RESPONSE_POLL_TIME_MS   100
 

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

Macro Definition Documentation

◆ EPS_COMMAND_BID

#define EPS_COMMAND_BID   0x00

◆ EPS_COMMAND_IVID

#define EPS_COMMAND_IVID   0x07

◆ EPS_COMMAND_STID

#define EPS_COMMAND_STID   0x1A

◆ EPS_DEFAULT_RX_LEN_MIN

#define EPS_DEFAULT_RX_LEN_MIN   5

◆ EPS_I2C_ADDR

#define EPS_I2C_ADDR   (0x20 << 1)

◆ EPS_MAX_RESPONSE_POLL_TIME_MS

#define EPS_MAX_RESPONSE_POLL_TIME_MS   100

Function Documentation

◆ EPS_run_argumentless_cmd()

uint8_t EPS_run_argumentless_cmd ( uint8_t command_code)

Sends an argumentless command to the EPS (expecting no data in the response).

Parameters
command_codeCommand code number.
Returns
0 on success, >0 if error.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ EPS_send_cmd_get_response()

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.

Parameters
cmd_bufArray of bytes to send to the EPS, including the command code, STID, IVID, etc.
cmd_buf_lenExact length of the command buffer.
rx_bufBuffer to store the response. Is filled with the response, without tags.
rx_buf_lenLength of the response buffer. Must be the command length.
Returns
0 on success, >0 if error.
Here is the call graph for this function:
Here is the caller graph for this function: