fix USB endpoint reset code

This commit is contained in:
NIIBE Yutaka
2011-02-24 15:54:40 +09:00
parent f769ebe05c
commit 0f7e86b3b8
3 changed files with 19 additions and 6 deletions

View File

@@ -1,3 +1,8 @@
2011-02-24 NIIBE Yutaka <gniibe@fsij.org>
* src/usb_prop.c (gnuk_device_SetInterface): Fix argument to
ClearDTOG_TX.
2011-02-10 NIIBE Yutaka <gniibe@fsij.org> 2011-02-10 NIIBE Yutaka <gniibe@fsij.org>
* Version 0.10. * Version 0.10.

10
README
View File

@@ -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: 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 (4) [Optional] Write fixed serial number
If you use fixed serial number in the file 'GNUK_SERIAL_NUMBER', you can do: If you use fixed serial number in the file 'GNUK_SERIAL_NUMBER', you can do:
# EMAIL=<YOUR-EMAIL-ADDRESS> ../tool/gnuk_put_binary.py -s ../GNUK_SERIAL_NUMBER # EMAIL=<YOUR-EMAIL-ADDRESS> ../tool/gnuk_put_binary.py -s ../GNUK_SERIAL_NUMBER
Writing serial number
...
(5) [Optional] Write card holder certificate (5) [Optional] Write card holder certificate
If you have card holder certificate binary file, you can do: If you have card holder certificate binary file, you can do:
# ../tool/gnuk_put_binary.py ../../<YOUR-CERTIFICATE>.bin # ../tool/gnuk_put_binary.py ../../<YOUR-CERTIFICATE>.bin
../../<YOUR-CERTIFICATE>.bin: <LENGTH-OF-YOUR-CERTIFICATE>
Updating card holder certificate
...
How to run How to run

View File

@@ -153,18 +153,18 @@ gnuk_device_SetInterface (void)
if (intf == 0) if (intf == 0)
{ {
ClearDTOG_RX (0x02); ClearDTOG_RX (ENDP2);
ClearDTOG_TX (0x81); ClearDTOG_TX (ENDP1);
} }
#ifdef ENABLE_VIRTUAL_COM_PORT #ifdef ENABLE_VIRTUAL_COM_PORT
else if (intf == 1) else if (intf == 1)
{ {
ClearDTOG_TX (0x84); ClearDTOG_TX (ENDP4);
} }
else if (intf == 2) else if (intf == 2)
{ {
ClearDTOG_RX (0x05); ClearDTOG_RX (ENDP5);
ClearDTOG_TX (0x83); ClearDTOG_TX (ENDP3);
} }
#endif #endif
} }