#include <stdint.h>
Go to the source code of this file.
|
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).
|
|
◆ 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 |
◆ 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_code | Command code number. |
- Returns
- 0 on success, >0 if error.
◆ 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_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. |
- Returns
- 0 on success, >0 if error.