Commit Graph

36 Commits

Author SHA1 Message Date
Christina Quast
ca005698dd Bugfix: Compiler warning RST pin type 2015-04-06 23:26:14 +02:00
Christina Quast
5958587fd1 Impl of _write for usage by newlib printf 2015-04-06 19:47:22 +02:00
Christina Quast
1e15cb6616 Uart_console: remove custom printf 2015-04-06 19:26:50 +02:00
Christina Quast
3ca88d8a5a USBDDriver: Corrected config array off by one 2015-04-04 17:50:36 +02:00
Christina Quast
35c9e861a9 USBDDriver.c: Fixed set configuration bug
On setConfiguration the first entry in the configuration entry
was always taken.
Now it takes cfgNum as index number.
2015-04-04 09:53:49 +02:00
Christina Quast
ce8fa7e646 Add optional TRACE_*_WP switch 2015-03-13 13:09:51 +01:00
Christina Quast
23bb831cfb Added prob useful gdb information 2015-03-13 13:06:03 +01:00
Christina Quast
1c3a7994b8 Basic Assembler defines 2015-03-13 12:57:59 +01:00
Christina Quast
f07ec9fa4b Header file with includes 2015-03-13 12:55:41 +01:00
Christina Quast
0a0ca9fa81 Add resources for gdb and gcc 2015-03-13 12:35:12 +01:00
Christina Quast
391dc2eb43 Undefine possibility for USB trace info
Define USB_NO_DEBUG to undefine TRACE_DEBUG_WP and TRACE_INFO_WP
2015-03-13 12:02:31 +01:00
Christina Quast
c63df595e5 Atmel lib bug fixed: param position off by one
Furthermore the debug output level is INFO instead of DEBUG now.
2015-03-10 23:32:45 +01:00
Christina Quast
32a90ac660 remove windows line endings in iso7816_4.c 2015-03-10 16:18:16 +01:00
Christina Quast
0757fff70b Bugfix: add header file for ccid reset pin 2015-03-10 15:54:34 +01:00
Christina Quast
e4bd7c104d Removed comment about USART_Configure in iso7816_4.c 2015-03-10 15:52:49 +01:00
Christina Quast
2fcef41c90 Reference to reset pin passed to ISO7816_Init 2015-03-10 15:51:21 +01:00
Christina Quast
49ba6bc1ba Fixed change usb config bug
In the standard atmel lib only one configuration was possible.
On a GETDESCRIPTOR request the board would always return the full buffer
with both configurations.

The USB driver requests each configuration one after another, using the
configuration index number.
The atmel lib did not support more than one USB configuration.
2015-02-20 14:35:36 +01:00
Christina Quast
97632e6309 Fixed format symbol bug in pmc.c 2015-01-27 15:36:56 +01:00
Christina Quast
061fa6e817 Fixed format symbol error in pio_it.c 2015-01-27 15:31:02 +01:00
Christina Quast
7f52340611 Format string fix for iso7816_4.c 2015-01-27 15:24:31 +01:00
Christina Quast
23c001303c Fixed format symbol (makro) for inttypes
"%u" becomes "%" PRIu32 for uint32_t, etc.
2015-01-27 15:17:37 +01:00
Christina Quast
79c2b72c7a 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:32:47 +01:00
Christina Quast
2021077a66 changed TRACE_WARN into TRACE_WARNING in iso7816_4.c 2015-01-27 11:19:27 +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
99de4e5753 There is no ASCII in ATR messages.. 2015-01-15 14:49:42 +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
19d26357f6 TRACE_Debug macro contains func name and line 2015-01-03 21:43:09 +01:00
Christina Quast
b123d740e0 atmel_softpack_libraries usb dir 2014-12-23 13:03:36 +01:00
Christina Quast
9035f1c23d Debug output and comments for iso7816 2014-12-19 19:45:54 +01:00
Christina Quast
99f9f7b504 working printf 2014-12-13 13:30:31 +01:00
Christina Quast
53b2105d38 Remove redundant includes 2014-12-09 15:34:35 +01:00
Christina Quast
530f20881c Sane defines for clk values 2014-12-05 13:03:59 +01:00
Christina Quast
8be71e4e99 Makefile with libs and atmel source 2014-12-02 13:06:01 +01:00