OTP can flow through FIDO interface as a report type 3.
Fixes #123. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -561,13 +561,7 @@ int otp_send_frame(uint8_t *frame, size_t frame_len) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int otp_hid_set_report_cb(uint8_t itf,
|
int otp_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t const *buffer, uint16_t bufsize) {
|
||||||
uint8_t report_id,
|
|
||||||
hid_report_type_t report_type,
|
|
||||||
uint8_t const *buffer,
|
|
||||||
uint16_t bufsize)
|
|
||||||
{
|
|
||||||
if (itf == ITF_KEYBOARD) {
|
|
||||||
if (report_type == 3) {
|
if (report_type == 3) {
|
||||||
DEBUG_PAYLOAD(buffer, bufsize);
|
DEBUG_PAYLOAD(buffer, bufsize);
|
||||||
if (buffer[7] == 0xFF) { // reset
|
if (buffer[7] == 0xFF) { // reset
|
||||||
@@ -610,7 +604,6 @@ int otp_hid_set_report_cb(uint8_t itf,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user