Embedded SDK
Embedded SDK
Macros | Functions | Variables
io.c File Reference
#include <stdint.h>
#include <string.h>
#include "os.h"
#include "io.h"
#include "write.h"
Include dependency graph for io.c:

Go to the source code of this file.

Macros

#define SW_OK   0x9000
 
#define SW_WRONG_RESPONSE_LENGTH   0xB000
 

Functions

WEAK void app_ticker_event_callback (void)
 
WEAK uint8_t io_event (uint8_t channel)
 
WEAK uint16_t io_exchange_al (uint8_t channel, uint16_t tx_len)
 
WEAK void io_init ()
 
WEAK int io_recv_command ()
 
WEAK int io_send_response_buffers (const buffer_t *rdatalist, size_t count, uint16_t sw)
 

Variables

uint8_t G_io_seproxyhal_spi_buffer [IO_SEPROXYHAL_BUFFER_SIZE_B]
 

Macro Definition Documentation

◆ SW_OK

#define SW_OK   0x9000

Definition at line 30 of file io.c.

◆ SW_WRONG_RESPONSE_LENGTH

#define SW_WRONG_RESPONSE_LENGTH   0xB000

Definition at line 31 of file io.c.

Function Documentation

◆ 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 53 of file io.c.

◆ io_event()

WEAK uint8_t io_event ( uint8_t  channel)

Definition at line 55 of file io.c.

◆ io_exchange_al()

WEAK uint16_t io_exchange_al ( uint8_t  channel,
uint16_t  tx_len 
)

Definition at line 99 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 124 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 131 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]rdatalistList of Buffers with APDU response data.
[in]countCount of the buffers providded in rdatalist.
[in]swStatus word of APDU response.
Returns
zero or positive integer if success, -1 otherwise.

Definition at line 154 of file io.c.

Variable Documentation

◆ G_io_seproxyhal_spi_buffer

uint8_t G_io_seproxyhal_spi_buffer[IO_SEPROXYHAL_BUFFER_SIZE_B]

Definition at line 33 of file io.c.