Embedded SDK
Embedded SDK
Enumerations | Functions
io.h File Reference
#include <stdint.h>
#include "ux.h"
#include "os_io_seproxyhal.h"
#include "buffer.h"
#include "macros.h"
Include dependency graph for io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  io_state_e { READY , RECEIVED , WAITING }
 

Functions

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

Enumeration Type Documentation

◆ io_state_e

enum io_state_e

Enumeration for the status of IO.

Enumerator
READY 
RECEIVED 

ready for new event

WAITING 

data received

waiting

Definition at line 14 of file io.h.

Function Documentation

◆ app_ticker_event_callback()

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()

uint8_t io_event ( uint8_t channel   __attribute__(unused))

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.

◆ io_exchange_al()

uint16_t io_exchange_al ( uint8_t  channel,
uint16_t  tx_len 
)

Definition at line 99 of file io.c.

◆ io_init()

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()

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()

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.