1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 03:50:58 +00:00

unix: fix wur in usb

This commit is contained in:
Jan Pochyla 2017-12-19 15:13:12 +01:00
parent 5f63081f37
commit 7be96048f8

View File

@ -106,7 +106,7 @@ int usb_hid_read(uint8_t iface_num, uint8_t *buf, uint32_t len) {
static const char *ping_req = "PINGPING"; static const char *ping_req = "PINGPING";
static const char *ping_resp = "PONGPONG"; static const char *ping_resp = "PONGPONG";
if (r == strlen(ping_req) && memcmp(ping_req, buf, strlen(ping_req)) == 0) { if (r == strlen(ping_req) && memcmp(ping_req, buf, strlen(ping_req)) == 0) {
usb_hid_write(0, (const uint8_t *)ping_resp, strlen(ping_resp)); (void)usb_hid_write(0, (const uint8_t *)ping_resp, strlen(ping_resp));
return 0; return 0;
} }
return r; return r;