|
libsle4442
0.2-5
|
API interface. More...

Functions | |
| void | sle_enable_port (void) |
| void | sle_disable_port (void) |
| struct sle_t * | sle_init (void) |
| void | sle_free (struct sle_t *sle) |
| void | sle_reset (uint8_t *atr) |
| reset the card. More... | |
| uint8_t | sle_present (struct sle_t *sle) |
| void | sle_dump_memory (uint8_t *mm) |
| void | sle_dump_prt_memory (uint8_t *mm) |
| void | sle_dump_secmem (uint8_t *mm) |
| void | sle_dump_allmem (struct sle_t *sle) |
| void | sle_auth (struct sle_t *sle, const uint8_t pin1, const uint8_t pin2, const uint8_t pin3) |
| void | sle_write_memory (struct sle_t *sle, const uint8_t base, const uint8_t len) |
| void | sle_write_secmem (struct sle_t *sle) |
API interface.
Low level bit banging driver to read and write to Sle4442 card.
| void sle_auth | ( | struct sle_t * | sle, |
| const uint8_t | pin1, | ||
| const uint8_t | pin2, | ||
| const uint8_t | pin3 | ||
| ) |
Perform the authentication.
See the datasheet on how to authenticate.
| sle | the struct allocated for the card. |
| pin1 | byte 1 of the pin number. |
| pin2 | byte 2 of the pin number. |
| pin3 | byte 3 of the pin number. |
| void sle_disable_port | ( | void | ) |
Disable the port and restore all the used pins to IN.
| void sle_dump_allmem | ( | struct sle_t * | sle | ) |
Dump the all memories, normal, secure and protected memory.
| sle | struct with allocated space for the dump. |
| void sle_dump_memory | ( | uint8_t * | mm | ) |
Dump the card's memory into the mm area.
| mm | the storage area where to dump the memory card. |
| void sle_dump_prt_memory | ( | uint8_t * | mm | ) |
Dump the protected memory.
| mm | allocated 4 Byte space for the dump. |
| void sle_dump_secmem | ( | uint8_t * | mm | ) |
Dump the secure memory.
| mm | allocated 4 Byte space for the dump. |
| void sle_enable_port | ( | void | ) |
Initialize the port.
Configure the I/O port's pin as: Card present pin: IN Reset: OUT Clock: OUT IO line: IN
| void sle_free | ( | struct sle_t * | sle | ) |
Free the memory allocated to the structure and disable the port connected to the card's reader.
| sle | the allocated structure. |
| struct sle_t* sle_init | ( | void | ) |
Initialize and allocate the structure and enable the port connected to the card's reader.
| uint8_t sle_present | ( | struct sle_t * | sle | ) |
Check for the presence of the card.
The status of the card will be stored into the struct.
| sle | the struct need to store the card's status. |
| void sle_reset | ( | uint8_t * | atr | ) |
reset the card.
| atr | pointer to the string sent to reset the card. |
| void sle_write_memory | ( | struct sle_t * | sle, |
| const uint8_t | base, | ||
| const uint8_t | len | ||
| ) |
Write a group of byte into the memory card.
Write one byte at a time from the allocated memory in the sle struct starting from base for len byte.
| sle | the allocated struct. |
| base | the base memory to start copying from. |
| len | how many byte to copy. |
| void sle_write_secmem | ( | struct sle_t * | sle | ) |
Write the secure memory.
Copy the 4 byte secure memory from the allocated struct to the card.
| sle | the allocated struct. |
1.8.13