Added support for OTP interface.

This interface enables a HID Keyboard interface to send keystrokes to host. Also, it enables bidirectional flow through set/get report with 8-bytes chunked frames of 70 bytes.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2023-03-28 23:32:43 +02:00
parent c6d08ae139
commit c11d403f12
6 changed files with 142 additions and 30 deletions

View File

@@ -160,7 +160,7 @@ extern void tud_hid_report_complete_cb(uint8_t instance, uint8_t const *report,
const uint8_t *complete_report = NULL;
uint16_t complete_len = 0;
extern bool last_write_result;
extern uint16_t send_buffer_size;
extern uint16_t send_buffer_size[ITF_TOTAL];
int driver_write_emul(uint8_t itf, const uint8_t *buffer, size_t buffer_size) {
uint16_t size = htons(buffer_size);
int sock = get_sock_itf(itf);