diff options
author | jaseg <git@jaseg.net> | 2018-11-08 19:53:11 +0900 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2018-11-08 19:53:11 +0900 |
commit | 21be46a0b5364c5f00f4d081ad9524ae9a36d022 (patch) | |
tree | 9a1dc33ea40b88b038c7ef7702cddddf66373a41 /src/packet_interface.c | |
parent | e4e231880413c58215130c4b084ac49a03c16b9b (diff) | |
download | secure-hid-21be46a0b5364c5f00f4d081ad9524ae9a36d022.tar.gz secure-hid-21be46a0b5364c5f00f4d081ad9524ae9a36d022.tar.bz2 secure-hid-21be46a0b5364c5f00f4d081ad9524ae9a36d022.zip |
HID report transmission partially works now
partially i.e. if you attach the keyboard before the noise handshake. I
suspect some memory corruption somewhere.
Diffstat (limited to 'src/packet_interface.c')
-rw-r--r-- | src/packet_interface.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/packet_interface.c b/src/packet_interface.c index c448303..071cf02 100644 --- a/src/packet_interface.c +++ b/src/packet_interface.c @@ -57,3 +57,9 @@ void usart2_isr(void) { } /* else just return and wait for next byte */ } +void send_packet(struct dma_usart_file *f, const uint8_t *data, size_t len) { + /* ignore return value as putf is blocking and always succeeds */ + (void)cobs_encode_incremental(f, putf, (char *)data, len); + flush(f); +} + |