31 #include "proto/crc/tiny_crc.h" 53 #define HDLC_MIN_BUF_SIZE(mtu, crc) (sizeof(hdlc_ll_data_t) + (int)(crc) / 8 + (mtu) + TINY_ALIGN_STRUCT_VALUE - 1) 58 #define HDLC_BUF_SIZE_EX(mtu, crc, window) (sizeof(hdlc_ll_data_t) + ((int)(crc) / 8 + (mtu)) * (window) + TINY_ALIGN_STRUCT_VALUE - 1) 107 #ifndef DOXYGEN_SHOULD_SKIP_THIS 117 uint8_t *active_frame_buf;
125 const uint8_t *origin_data;
void(* on_frame_cb_t)(void *udata, uint8_t *pdata, int size)
on_frame_cb_t is a callback function, which is called every time new frame is received.
Definition: tiny_types.h:194
on_frame_cb_t on_frame_read
User-defined callback, which is called when new frame arrives from hw channel.
Definition: hdlc_int.h:75
int phys_mtu
Parameters in DOXYGEN_SHOULD_SKIP_THIS section should not be modified by a user.
Definition: hdlc_int.h:109
Structure describes configuration of lowest HDLC level Initialize this structure by 0 before passing ...
Definition: hdlc_int.h:65
This is Tiny HAL implementation for microcontrollers.
struct hdlc_ll_data_t hdlc_ll_data_t
Structure describes configuration of lowest HDLC level Initialize this structure by 0 before passing ...
int rx_buf_size
size of hdlc buffer
Definition: hdlc_int.h:95
hdlc_crc_t crc_type
crc field type to use on hdlc level.
Definition: hdlc_int.h:102
void(* on_tx_frame_cb_t)(void *udata, const uint8_t *pdata, int size)
on_frame_send_cb_t is a callback function, which is called every time new frame is sent...
Definition: tiny_types.h:203
on_tx_frame_cb_t on_frame_send
User-defined callback, which is called when the frame is sent to TX channel.
Definition: hdlc_int.h:85
uint8_t * rx_buf
Buffer to be used by hdlc level to receive data to.
Definition: hdlc_int.h:90
void * user_data
User data, which will be passed to user-defined callback as first argument.
Definition: hdlc_int.h:105