#include <stdint.h>
#include <string.h>
#include "os.h"
#include "os_io_legacy_types.h"
#include "os_io_seph_cmd.h"
#include "os_io_seph_ux.h"
#include "os_io_default_apdu.h"
#include "seproxyhal_protocol.h"
#include "write.h"
#include "offsets.h"
#include "io.h"
Go to the source code of this file.
◆ SW_OK
Definition at line 48 of file io.c.
◆ SW_WRONG_RESPONSE_LENGTH
#define SW_WRONG_RESPONSE_LENGTH 0xB000 |
Definition at line 49 of file io.c.
◆ app_ticker_event_callback()
WEAK void app_ticker_event_callback |
( |
void |
| ) |
|
Function to be declared by the application to trigger execute code upon SEPROXYHAL_TAG_TICKER_EVENT
Definition at line 63 of file io.c.
◆ io_event()
WEAK unsigned char io_event |
( |
unsigned char |
channel | ) |
|
IO callback called when an interrupt based channel has received data to be processed. This function is responsible of forwarding received events to the UX lib.
- Returns
- 1 if success, 0 otherwise.
Definition at line 65 of file io.c.
◆ io_init()
WEAK void io_init |
( |
void |
| ) |
|
Initialize the APDU I/O state.
This function must be called before calling any other I/O function.
Definition at line 100 of file io.c.
◆ io_recv_command()
WEAK int io_recv_command |
( |
void |
| ) |
|
Receive APDU command in G_io_apdu_buffer.
- Returns
- zero or positive integer if success, -1 otherwise.
Definition at line 105 of file io.c.
◆ io_send_response_buffers()
WEAK int io_send_response_buffers |
( |
const buffer_t * |
rdatalist, |
|
|
size_t |
count, |
|
|
uint16_t |
sw |
|
) |
| |
Send APDU response (response data + status word) by filling G_io_apdu_buffer.
- Parameters
-
[in] | rdatalist | List of Buffers with APDU response data. |
[in] | count | Count of the buffers providded in rdatalist. |
[in] | sw | Status word of APDU response. |
- Returns
- zero or positive integer if success, -1 otherwise.
Definition at line 124 of file io.c.
◆ G_io_seproxyhal_spi_buffer
uint8_t G_io_seproxyhal_spi_buffer[OS_IO_SEPH_BUFFER_SIZE] |
Definition at line 53 of file io.c.