tinyproto
|
Structure describes configuration of lowest HDLC level Initialize this structure by 0 before passing to hdlc_init() function. More...
#include <hdlc.h>
Public Attributes | |
write_block_cb_t | send_tx |
Send bytes callback user-defined function. More... | |
int(* | on_frame_read )(void *user_data, void *data, int len) |
User-defined callback, which is called when new packet arrives from hw channel. More... | |
int(* | on_frame_send )(void *user_data, const void *data, int len) |
User-defined callback, which is called when the packet is sent to TX channel. More... | |
void * | rx_buf |
Buffer to be used by hdlc level to receive data to. | |
int | rx_buf_size |
size of rx buffer | |
hdlc_crc_t | crc_type |
crc field type to use on hdlc level. More... | |
bool | multithread_mode |
Set this to true, if you want to implements TX data transmission in separate thread from the threads, which call hdlc_send(). | |
void * | user_data |
User data, which will be passed to user-defined callback as first argument. | |
tiny_events_t | events |
Parameters in DOXYGEN_SHOULD_SKIP_THIS section should not be modified by a user. | |
hdlc_ll_handle_t | handle |
int | rx_len |
Structure describes configuration of lowest HDLC level Initialize this structure by 0 before passing to hdlc_init() function.
hdlc_crc_t _hdlc_handle_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.
int(* _hdlc_handle_t::on_frame_read) (void *user_data, void *data, int len) |
User-defined callback, which is called when new packet arrives from hw channel.
The context of this callback is context, where hdlc_run_rx() is called from.
user_data | user-defined data |
data | pointer to received data |
len | size of received data in bytes |
int(* _hdlc_handle_t::on_frame_send) (void *user_data, const void *data, int len) |
User-defined callback, which is called when the packet is sent to TX channel.
The context of this callback is context, where hdlc_run_tx() is called from.
user_data | user-defined data |
data | pointer to sent data |
len | size of sent data in bytes |
write_block_cb_t _hdlc_handle_t::send_tx |
Send bytes callback user-defined function.
This callback must implement physical sending of bytes hw channel.
user_data | user-defined data |
data | buffer with data to send over hw channel |
len | size of data in bytes to send. |