Embedded SDK
Embedded SDK
io.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stdint.h>
4 
5 #include "ux.h"
6 #include "os_io_seproxyhal.h"
7 
8 #include "buffer.h"
9 #include "macros.h"
10 
14 typedef enum {
17  WAITING
19 
20 #ifdef HAVE_BAGL
21 void io_seproxyhal_display(const bagl_element_t *element);
22 #endif // HAVE_BAGL
23 
30 void app_ticker_event_callback(void);
31 
41 
42 uint16_t io_exchange_al(uint8_t channel, uint16_t tx_len);
43 
49 void io_init(void);
50 
57 int io_recv_command(void);
58 
73 int io_send_response_buffers(const buffer_t *rdatalist, size_t count, uint16_t sw);
74 
89 static inline int io_send_response_pointer(const uint8_t *ptr, size_t size, uint16_t sw)
90 {
92  &(const buffer_t){.ptr = ptr, .size = size, .offset = 0}, 1, sw);
93 }
94 
107 static inline int io_send_response_buffer(const buffer_t *rdata, uint16_t sw)
108 {
109  return io_send_response_buffers(rdata, 1, sw);
110 }
111 
122 static inline int io_send_sw(uint16_t sw)
123 {
124  return io_send_response_buffers(NULL, 0, sw);
125 }
void app_ticker_event_callback(void)
Definition: io.c:53
void io_init(void)
Definition: io.c:124
int io_send_response_buffers(const buffer_t *rdatalist, size_t count, uint16_t sw)
Definition: io.c:154
uint16_t io_exchange_al(uint8_t channel, uint16_t tx_len)
Definition: io.c:99
io_state_e
Definition: io.h:14
@ RECEIVED
ready for new event
Definition: io.h:16
@ READY
Definition: io.h:15
@ WAITING
data received
Definition: io.h:17
int io_recv_command(void)
Definition: io.c:131
uint8_t io_event(uint8_t channel __attribute__((unused)))
struct __attribute__((packed)) ndef_struct_s
Structure to store an NDEF message.
Definition: nfc_ndef.h:102
unsigned short uint16_t
Definition: usbd_conf.h:54
unsigned char uint8_t
Definition: usbd_conf.h:53
void io_seproxyhal_display(const bagl_element_t *element)