tinyproto
Public Attributes | List of all members
hdlc_ll_data_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_int.h>

Public Attributes

on_frame_cb_t on_frame_read
 User-defined callback, which is called when new frame arrives from hw channel. More...
 
on_tx_frame_cb_t on_frame_send
 User-defined callback, which is called when the frame is sent to TX channel. More...
 
uint8_t * rx_buf
 Buffer to be used by hdlc level to receive data to.
 
int rx_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 phys_mtu
 Parameters in DOXYGEN_SHOULD_SKIP_THIS section should not be modified by a user.
 
struct {
   int(*   state )(hdlc_ll_handle_t handle,
      const uint8_t *data, int len)
 
   uint8_t *   ptr
 
   uint8_t   escape
 
   uint8_t *   active_frame_buf
 
rx
 
struct {
   int(*   state )(hdlc_ll_handle_t handle)
 
   uint8_t *   out_buffer
 
   int   out_buffer_len
 
   const uint8_t *   origin_data
 
   const uint8_t *   data
 
   int   len
 
   crc_t   crc
 
   uint8_t   escape
 
tx
 

Detailed Description

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

Member Data Documentation

◆ crc_type

hdlc_crc_t hdlc_ll_data_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_data_t::on_frame_read

User-defined callback, which is called when new frame 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_data_t::on_frame_send

User-defined callback, which is called when the frame 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: