Commit Graph

48 Commits

Author SHA1 Message Date
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 87d141ec59 Reanabled some compiler warnings 2015-01-27 14:56:33 +01:00
Christina Quast d20f26d293 Makefile: Disable unused variable warnings 2015-01-27 14:40:31 +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 f7c28e0b0b phone: on reset by smartcardreader send ATR
Every time the reset line is pulled low, simtrace sends an ATR
packet over USART1.
The USART1 is slave in this configuration.
2015-01-23 20:57:52 +01:00
Christina Quast ea103826fa test for phone I/O pin 2015-01-21 14:00:45 +01:00
Christina Quast e8119112cb IRQ when phone RST line triggered
When the SIM card adapter, which is usually plugged into a phone,
is plugged into a CCID reader instead, the CCID reader triggers
the reset line of the RST line and therefore a PIO interrupt.
The reader then waits for an ATR from the smartcard,
which should be send next.
2015-01-20 20:15:04 +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 30376f616a Small aestethic change in usart.c 2015-01-15 14:39:47 +01:00
Christina Quast f03396802a Debugging of smartcard insertion interrupt
Currently the smartcard insertion interrupt is always triggered,
but when checking in PIO_ISR which pin triggered the interrupt
often times DTXD is returned (the debug transmit line which is printing
debug messages at the moment..)
2015-01-09 16:14:19 +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 a58aa18ffd Remove legacy commands for interactive iso7816 com 2015-01-09 12:22:58 +01:00
Christina Quast 3499044e74 Atmel CCID example based main 2015-01-03 23:00:55 +01:00
Christina Quast 9649361101 Makefile: included USB library files 2015-01-03 22:22:36 +01:00
Christina Quast ecd62c0289 Removed compiler dependent defines 2015-01-03 22:21:10 +01:00
Christina Quast 5f46d04c35 Defines for USB, SPI, simcard IO
Most defines where taken from this repository:
https://github.com/zwizwa/simtrace
2015-01-03 22:19:51 +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 5c0ea3dd64 ignore *.swo files 2015-01-03 21:46:36 +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 11e80aed9d iso7816: smartcard inserted detection partly works
Furthermore configuration of the iso7816 pins for communication
between processor and SIM card
2014-12-19 19:36:55 +01:00
Christina Quast 2370450c46 Ignore cscope and main file
Different main.c files are stored in directory mains/ and can be copied to the main folder
2014-12-16 11:00:38 +01:00
Christina Quast 0f1b36f0ae Using existing atmel led routines
There is a config file called led.c in the atmel softpack source code
which provides routines for configuring, setting and clearing the LEDs.
2014-12-16 10:59:13 +01:00
Christina Quast 0aca529375 working main.c example of printf 2014-12-13 13:33:29 +01:00
Christina Quast 99f9f7b504 working printf 2014-12-13 13:30:31 +01:00
Christina Quast dcb67a2843 move UART defines to board.h 2014-12-10 16:30:24 +01:00
Christina Quast 53b2105d38 Remove redundant includes 2014-12-09 15:34:35 +01:00
Christina Quast 72ff4565f3 ret type changed to size_t 2014-12-05 15:51:43 +01:00
Christina Quast 228265d7b3 Clock calculator python script 2014-12-05 15:51:13 +01:00
Christina Quast bc04ac800a Ignore build dirs 2014-12-05 13:24:34 +01:00
Christina Quast 530f20881c Sane defines for clk values 2014-12-05 13:03:59 +01:00
Christina Quast f1192c6cad UART with stdio functions 2014-12-05 13:03:27 +01:00
Christina Quast d51b5f4843 Remove windows line endings 2014-12-02 13:21:17 +01:00
Christina Quast 1e83f8be92 define UART pin on board 2014-12-02 13:19:34 +01:00
Christina Quast 6219b5c63d some main file possibilities 2014-12-02 13:09:49 +01:00
Christina Quast 8be71e4e99 Makefile with libs and atmel source 2014-12-02 13:06:01 +01:00
Christina Quast a42c11f876 simtrace board specific defines 2014-11-28 16:38:26 +01:00
Christina Quast 637ace9559 Real AT91 lib defines 2014-11-28 13:29:29 +01:00
Christina Quast c8ae58b2e7 at91 lib dir for src files 2014-11-28 11:02:16 +01:00
Christina Quast 980435d972 ignore volatile and auto backup content 2014-11-28 10:37:26 +01:00
Christina Quast 9e5b2573db blink2 2014-11-28 10:35:54 +01:00
Christina Quast b0a0570e11 initial 2014-11-28 10:27:32 +01:00
Christina Quast 2d18f171c2 minimal testprog (not working) 2014-11-22 19:48:48 +01:00