mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-11 01:38:26 +02:00
@@ -189,11 +189,11 @@ static int usb_event_handle(uint8_t itf) {
|
|||||||
#endif
|
#endif
|
||||||
if (proc_packet > 0) {
|
if (proc_packet > 0) {
|
||||||
card_locked_itf = itf;
|
card_locked_itf = itf;
|
||||||
|
timeout_start();
|
||||||
#ifndef ENABLE_EMULATION
|
#ifndef ENABLE_EMULATION
|
||||||
uint32_t flag = EV_CMD_AVAILABLE;
|
uint32_t flag = EV_CMD_AVAILABLE;
|
||||||
queue_add_blocking(&usb_to_card_q, &flag);
|
queue_add_blocking(&usb_to_card_q, &flag);
|
||||||
#endif
|
#endif
|
||||||
timeout_start();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifdef USB_ITF_HID
|
#ifdef USB_ITF_HID
|
||||||
@@ -280,6 +280,7 @@ void usb_task() {
|
|||||||
// printf("\r\n ------ M = %lu\r\n",m);
|
// printf("\r\n ------ M = %lu\r\n",m);
|
||||||
if (has_m) {
|
if (has_m) {
|
||||||
if (m == EV_EXEC_FINISHED) {
|
if (m == EV_EXEC_FINISHED) {
|
||||||
|
timeout_stop();
|
||||||
#ifdef USB_ITF_HID
|
#ifdef USB_ITF_HID
|
||||||
if (itf == ITF_HID) {
|
if (itf == ITF_HID) {
|
||||||
driver_exec_finished_hid(finished_data_size);
|
driver_exec_finished_hid(finished_data_size);
|
||||||
@@ -292,7 +293,6 @@ void usb_task() {
|
|||||||
#endif
|
#endif
|
||||||
led_set_blink(BLINK_MOUNTED);
|
led_set_blink(BLINK_MOUNTED);
|
||||||
card_locked_itf = ITF_TOTAL;
|
card_locked_itf = ITF_TOTAL;
|
||||||
timeout_stop();
|
|
||||||
}
|
}
|
||||||
else if (m == EV_PRESS_BUTTON) {
|
else if (m == EV_PRESS_BUTTON) {
|
||||||
uint32_t flag = wait_button() ? EV_BUTTON_TIMEOUT : EV_BUTTON_PRESSED;
|
uint32_t flag = wait_button() ? EV_BUTTON_TIMEOUT : EV_BUTTON_PRESSED;
|
||||||
|
|||||||
Reference in New Issue
Block a user