35 #ifndef _TINY_LIGHT_H_ 36 #define _TINY_LIGHT_H_ 38 #include "proto/hdlc/low_level/hdlc.h" 60 #define LIGHT_BUF_SIZE (sizeof(uintptr_t) * 18) 72 #ifndef DOXYGEN_SHOULD_SKIP_THIS hdlc_ll_handle_t tiny_light_get_hdlc(STinyLightData *handle)
returns lower level hdlc handle.
Definition: tiny_light.c:201
int tiny_light_read(STinyLightData *handle, uint8_t *pbuf, int len)
reads frame from the channel in blocking mode.
Definition: tiny_light.c:158
#define TINY_ALIGNED_STRUCT
This macro is used internally for aligning the structures.
Definition: tiny_types.h:113
write_block_cb_t write_func
pointer to platform related write function
Definition: tiny_light.h:69
int tiny_light_close(STinyLightData *handle)
The function closes channel.
Definition: tiny_light.c:89
int(* read_block_cb_t)(void *pdata, void *buffer, int size)
The function reads data from communication channel.
Definition: tiny_types.h:185
read_block_cb_t read_func
pointer to platform related read function
Definition: tiny_light.h:71
hdlc_crc_t crc_type
CRC type to use.
Definition: tiny_light.h:80
int tiny_light_send(STinyLightData *handle, const uint8_t *pbuf, int len)
sends frame with user payload to communication channel in blocking mode
Definition: tiny_light.c:113
Structure describes configuration of lowest HDLC level Initialize this structure by 0 before passing ...
Definition: hdlc_int.h:65
This structure contains information about communication channel and its state.
Definition: tiny_light.h:66
This is Tiny HAL implementation for microcontrollers.
#define LIGHT_BUF_SIZE
This macro defines buffer size required for tiny light protocol.
Definition: tiny_light.h:60
int(* write_block_cb_t)(void *pdata, const void *buffer, int size)
The function writes data to communication channel port.
Definition: tiny_types.h:174
int tiny_light_init(STinyLightData *handle, write_block_cb_t write_func, read_block_cb_t read_func, void *pdata)
The function initializes internal structures for Tiny channel and return handle to be used with all T...
Definition: tiny_light.c:66