From 0f7e86b3b80fc0b9c0f4c99de94ad0710e13f242 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 24 Feb 2011 15:54:40 +0900 Subject: [PATCH] fix USB endpoint reset code --- ChangeLog | 5 +++++ README | 10 +++++++++- src/usb_prop.c | 10 +++++----- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0cd6c47..9280bb2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-02-24 NIIBE Yutaka + + * src/usb_prop.c (gnuk_device_SetInterface): Fix argument to + ClearDTOG_TX. + 2011-02-10 NIIBE Yutaka * Version 0.10. diff --git a/README b/README index 77e665d..16898bd 100644 --- a/README +++ b/README @@ -301,19 +301,27 @@ Don't just wait, but do some other works on your PC. Connect your board to USB port of your PC. And invoke gnuk_put_binary.py: - # ../tool/gnuk_put_binary.py -r random_bits random_bits: 1024 + # ../tool/gnuk_put_binary.py -r random_bits + random_bits: 1024 + Updating random bits + ... (4) [Optional] Write fixed serial number If you use fixed serial number in the file 'GNUK_SERIAL_NUMBER', you can do: # EMAIL= ../tool/gnuk_put_binary.py -s ../GNUK_SERIAL_NUMBER + Writing serial number + ... (5) [Optional] Write card holder certificate If you have card holder certificate binary file, you can do: # ../tool/gnuk_put_binary.py ../../.bin + ../../.bin: + Updating card holder certificate + ... How to run diff --git a/src/usb_prop.c b/src/usb_prop.c index d71afe0..b0e2181 100644 --- a/src/usb_prop.c +++ b/src/usb_prop.c @@ -153,18 +153,18 @@ gnuk_device_SetInterface (void) if (intf == 0) { - ClearDTOG_RX (0x02); - ClearDTOG_TX (0x81); + ClearDTOG_RX (ENDP2); + ClearDTOG_TX (ENDP1); } #ifdef ENABLE_VIRTUAL_COM_PORT else if (intf == 1) { - ClearDTOG_TX (0x84); + ClearDTOG_TX (ENDP4); } else if (intf == 2) { - ClearDTOG_RX (0x05); - ClearDTOG_TX (0x83); + ClearDTOG_RX (ENDP5); + ClearDTOG_TX (ENDP3); } #endif }