|
CTS-SAT-1-OBC-Firmware
|
#include <stdint.h>

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). | |
| #define EPS_COMMAND_BID 0x00 |
| #define EPS_COMMAND_IVID 0x07 |
| #define EPS_COMMAND_STID 0x1A |
| #define EPS_DEFAULT_RX_LEN_MIN 5 |
| #define EPS_I2C_ADDR (0x20 << 1) |
| #define EPS_MAX_RESPONSE_POLL_TIME_MS 100 |
| 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. |

