tinyproto
Public Attributes | List of all members
hdlc_ll_init_t Struct Reference

Structure describes configuration of lowest HDLC level Initialize this structure by 0 before passing to hdlc_ll_init() function. More...

#include <hdlc.h>

Public Attributes

on_frame_cb_t on_frame_read
 User-defined callback, which is called when new packet arrives from hw channel. More...
 
on_tx_frame_cb_t on_frame_send
 User-defined callback, which is called when the packet is sent to TX channel. More...
 
void * buf
 Buffer to be used by hdlc level to receive data to. More...
 
int buf_size
 size of hdlc buffer
 
hdlc_crc_t crc_type
 crc field type to use on hdlc level. More...
 
void * user_data
 User data, which will be passed to user-defined callback as first argument.
 
int mtu
 mtu size, can be 0
 

Detailed Description

Structure describes configuration of lowest HDLC level Initialize this structure by 0 before passing to hdlc_ll_init() function.

Member Data Documentation

◆ buf

void* hdlc_ll_init_t::buf

Buffer to be used by hdlc level to receive data to.

Use hdlc_ll_get_buf_size() to calculate minimum buffer size.

◆ crc_type

hdlc_crc_t hdlc_ll_init_t::crc_type

crc field type to use on hdlc level.

If HDLC_CRC_DEFAULT is passed, crc type will be selected automatically (depending on library configuration), but HDLC_CRC_16 has higher priority.

◆ on_frame_read

on_frame_cb_t hdlc_ll_init_t::on_frame_read

User-defined callback, which is called when new packet arrives from hw channel.

The context of this callback is context, where hdlc_ll_run_rx() is called from.

Parameters
user_datauser-defined data
datapointer to received data
lensize of received data in bytes

◆ on_frame_send

on_tx_frame_cb_t hdlc_ll_init_t::on_frame_send

User-defined callback, which is called when the packet is sent to TX channel.

The context of this callback is context, where hdlc_ll_run_tx() is called from.

Parameters
user_datauser-defined data
datapointer to sent data
lensize of sent data in bytes

The documentation for this struct was generated from the following file: