Tiny protocol
0.7.0
Tiny communication protocol for microcontrollers
|
#include <tiny_hdlc.h>
Public Attributes | |
int(* | send_tx )(void *user_data, const void *data, int len) |
int(* | on_frame_read )(void *user_data, void *data, int len) |
int(* | on_frame_sent )(void *user_data, const void *data, int len) |
void * | rx_buf |
int | rx_buf_size |
hdlc_crc_t | crc_type |
void * | user_data |
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.
user_data | user-defined data data pointer to received data |
len | size of received data in bytes |
void* _hdlc_handle_t::rx_buf |
Buffer to be used by hdlc level to receive data to
int _hdlc_handle_t::rx_buf_size |
size of rx buffer
int(* _hdlc_handle_t::send_tx) (void *user_data, const void *data, int len) |
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. |
void* _hdlc_handle_t::user_data |
User data, which will be passed to user-defined callback as first argument