2022-08-03 19:11:52 +08:00
|
|
|
typedef struct {
|
|
|
|
uint8_t request;
|
|
|
|
uint16_t param1;
|
|
|
|
uint16_t param2;
|
|
|
|
uint16_t length;
|
|
|
|
} __attribute__((packed)) ControlPacket_t;
|
|
|
|
|
|
|
|
int comms_control_handler(ControlPacket_t *req, uint8_t *resp);
|
2024-01-21 13:50:42 +08:00
|
|
|
void comms_endpoint2_write(const uint8_t *data, uint32_t len);
|
|
|
|
void comms_can_write(const uint8_t *data, uint32_t len);
|
2022-08-03 19:11:52 +08:00
|
|
|
int comms_can_read(uint8_t *data, uint32_t max_len);
|
2023-01-14 02:59:58 +08:00
|
|
|
void comms_can_reset(void);
|