Commit Graph

7 Commits

Author SHA1 Message Date
Christina Quast
f9890d91d3 Fix address evaluates always as true warnings
This was an example of a compiler warning when the switch -Waddress was passed:

atmel_softpack_libraries/usb/device/core/USBD.c: In function 'USBD_RequestHandler':
atmel_softpack_libraries/usb/device/core/USBD.c:149:14: warning: the address of
    'USBDCallbacks_RequestReceived' will always evaluate as 'true' [-Waddress]
     else if (USBDCallbacks_RequestReceived) {

The test for existense of USBDCallbacks_RequestReceived is removed since there
is always a default implementation of these function.
2015-01-27 14:27:38 +01:00
Christina Quast
8d0f4a6675 Pass ISO7816_GetChar return val to higher layers
The return value of ISO7816_GetChar is 0 in case of a timeout
when trying to retrieve values, and status of US_CSR otherwise.

Proper handling of this return value is not yet implemented though.
With the naive approach of just not sending the ATR if it could not
be read the simtrace firmware did not work together with pcsc_scan
AT ALL.
2015-01-15 14:53:38 +01:00
Christina Quast
f6bf349a53 CCID: Change cold to warm rst on PCtoRDRIccPowerOn
Before this change pcsc_scan would always receive garbage
from the stack when the reset button was pressed on the
simtrace board. Because the return value of ISO7816_GetChar
is never checked anywhere. If there is a timeout in this function,
the non-initialized local variable values which happen to be
lying around on the stack are inserted into the ATR message
and send to the host.

This only helps mitigating the symptoms but does not remove
the reason for the behavior. On the other hand, is it really
feasable to check the return value on EVERY call to
ISO7816_GetChar..?
2015-01-15 14:42:04 +01:00
Christina Quast
405cc03348 Fix bug in at91 lib
A value of 0x3 is defined as smartcard inserted event, which is not a
valid value for a SlotChange response.
2015-01-09 12:28:47 +01:00
Christina Quast
f51e0d22fe Updated cciddriver library files
I originally took the library files from https://github.com/zwizwa/simtrace
for cciddriver, etc.
Then I notices some things changed and between the AT91Lib for SAM7
and SAM3S I am using. Therefore I took the original files from the AT91Lib
which I downloaded for the SAM3S. Most lines only differ in comment convention.
2015-01-03 21:51:24 +01:00
Christina Quast
0b87d12002 USBDDriver.c and USBD.c with debug messages 2015-01-03 21:50:35 +01:00
Christina Quast
b123d740e0 atmel_softpack_libraries usb dir 2014-12-23 13:03:36 +01:00