HID_LED_STATUS_CARDCHANGE

This commit is contained in:
NIIBE Yutaka
2013-12-13 12:55:10 +09:00
parent 544c5310d3
commit 43440ac0e6
2 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,8 @@
2013-12-13 Niibe Yutaka <gniibe@fsij.org> 2013-12-13 Niibe Yutaka <gniibe@fsij.org>
* src/usb_ctrl.c (HID_LED_STATUS_CARDCHANGE): Rename from
HID_LED_STATUS_NUMLOCK.
* tool/gnuk_token.py (gnuk_token.stop_gnuk): Detach kernel * tool/gnuk_token.py (gnuk_token.stop_gnuk): Detach kernel
driver of HID. driver of HID.

View File

@@ -128,7 +128,10 @@ uint32_t bDeviceState = UNCONNECTED; /* USB device status */
#define USB_HID_REQ_SET_IDLE 10 #define USB_HID_REQ_SET_IDLE 10
#define USB_HID_REQ_SET_PROTOCOL 11 #define USB_HID_REQ_SET_PROTOCOL 11
#define HID_LED_STATUS_NUMLOCK 0x01 #ifndef HID_LED_STATUS_CARDCHANGE
/* NumLock=1, CapsLock=2, ScrollLock=4 */
#define HID_LED_STATUS_CARDCHANGE 0x04
#endif
static uint8_t hid_idle_rate; /* in 4ms */ static uint8_t hid_idle_rate; /* in 4ms */
static uint8_t hid_report_saved; static uint8_t hid_report_saved;
@@ -416,7 +419,7 @@ usb_cb_ctrl_write_finish (uint8_t req, uint8_t req_no, uint16_t value,
{ {
if (index == 1 && req_no == USB_HID_REQ_SET_REPORT) if (index == 1 && req_no == USB_HID_REQ_SET_REPORT)
{ {
if ((hid_report ^ hid_report_saved) & HID_LED_STATUS_NUMLOCK) if ((hid_report ^ hid_report_saved) & HID_LED_STATUS_CARDCHANGE)
ccid_card_change_signal (); ccid_card_change_signal ();
hid_report_saved = hid_report; hid_report_saved = hid_report;