mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-28 17:11:23 +02:00
Rename CCID_ codes to PICOKEY_
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -130,7 +130,7 @@ int driver_init_ccid(uint8_t itf) {
|
||||
|
||||
//ccid_tx[itf].w_ptr = ccid_tx[itf].r_ptr = 0;
|
||||
|
||||
return CCID_OK;
|
||||
return PICOKEY_OK;
|
||||
}
|
||||
|
||||
void tud_vendor_rx_cb(uint8_t itf) {
|
||||
@@ -302,10 +302,10 @@ void driver_exec_finished_cont_ccid(uint8_t itf, uint16_t size_next, uint16_t of
|
||||
void ccid_task() {
|
||||
for (int itf = 0; itf < ITF_SC_TOTAL; itf++) {
|
||||
int status = card_status(sc_itf_to_usb_itf(itf));
|
||||
if (status == CCID_OK) {
|
||||
if (status == PICOKEY_OK) {
|
||||
driver_exec_finished_ccid(itf, finished_data_size);
|
||||
}
|
||||
else if (status == CCID_ERR_BLOCKED) {
|
||||
else if (status == PICOKEY_ERR_BLOCKED) {
|
||||
driver_exec_timeout_ccid(itf);
|
||||
}
|
||||
if (ccid_tx[itf].w_ptr > ccid_tx[itf].r_ptr) {
|
||||
|
||||
@@ -598,10 +598,10 @@ void hid_task() {
|
||||
driver_process_usb_nopacket_hid();
|
||||
}
|
||||
int status = card_status(ITF_HID);
|
||||
if (status == CCID_OK) {
|
||||
if (status == PICOKEY_OK) {
|
||||
driver_exec_finished_hid(finished_data_size);
|
||||
}
|
||||
else if (status == CCID_ERR_BLOCKED) {
|
||||
else if (status == PICOKEY_ERR_BLOCKED) {
|
||||
send_keepalive();
|
||||
}
|
||||
if (hid_tx[ITF_HID_CTAP].w_ptr > hid_tx[ITF_HID_CTAP].r_ptr && last_write_result[ITF_HID_CTAP] != WRITE_PENDING) {
|
||||
|
||||
@@ -177,7 +177,7 @@ int card_status(uint8_t itf) {
|
||||
if (m == EV_EXEC_FINISHED) {
|
||||
timeout_stop();
|
||||
led_set_mode(MODE_MOUNTED);
|
||||
return CCID_OK;
|
||||
return PICOKEY_OK;
|
||||
}
|
||||
#ifndef ENABLE_EMULATION
|
||||
else if (m == EV_PRESS_BUTTON) {
|
||||
@@ -185,16 +185,16 @@ int card_status(uint8_t itf) {
|
||||
queue_try_add(&usb_to_card_q, &flag);
|
||||
}
|
||||
#endif
|
||||
return CCID_ERR_FILE_NOT_FOUND;
|
||||
return PICOKEY_ERR_FILE_NOT_FOUND;
|
||||
}
|
||||
else {
|
||||
if (timeout > 0) {
|
||||
if (timeout + timeout_counter[itf] < board_millis()) {
|
||||
timeout = board_millis();
|
||||
return CCID_ERR_BLOCKED;
|
||||
return PICOKEY_ERR_BLOCKED;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return CCID_ERR_FILE_NOT_FOUND;
|
||||
return PICOKEY_ERR_FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user