31 #include "proto/hdlc/low_level/hdlc.h" 32 #include "proto/crc/tiny_crc.h" 120 #ifndef DOXYGEN_SHOULD_SKIP_THIS 184 int hdlc_run_rx(hdlc_handle_t handle,
const void *data,
int len,
int *error);
256 int hdlc_send(hdlc_handle_t handle,
const void *data,
int len, uint32_t timeout);
int rx_buf_size
size of rx buffer
Definition: hdlc.h:102
write_block_cb_t send_tx
Send bytes callback user-defined function.
Definition: hdlc.h:68
struct _hdlc_handle_t * hdlc_handle_t
hdlc handle
int(* on_frame_read)(void *user_data, void *data, int len)
User-defined callback, which is called when new packet arrives from hw channel.
Definition: hdlc.h:80
bool multithread_mode
Set this to true, if you want to implements TX data transmission in separate thread from the threads...
Definition: hdlc.h:115
tiny_events_t events
Parameters in DOXYGEN_SHOULD_SKIP_THIS section should not be modified by a user.
Definition: hdlc.h:122
int hdlc_run_tx(hdlc_handle_t handle)
Runs transmission at hdlc level.
Definition: hdlc.c:136
hdlc_crc_t crc_type
crc field type to use on hdlc level.
Definition: hdlc.h:109
hdlc_handle_t hdlc_init(hdlc_struct_t *hdlc_info)
Initializes hdlc level and returns hdlc handle or NULL in case of error.
Definition: hdlc.c:64
void hdlc_reset(hdlc_handle_t handle)
Resets hdlc state.
Definition: hdlc.c:101
Structure describes configuration of lowest HDLC level Initialize this structure by 0 before passing ...
Definition: hdlc_int.h:65
void * rx_buf
Buffer to be used by hdlc level to receive data to.
Definition: hdlc.h:97
struct _hdlc_handle_t hdlc_struct_t
Structure describes configuration of lowest HDLC level Initialize this structure by 0 before passing ...
This is Tiny HAL implementation for microcontrollers.
int hdlc_send(hdlc_handle_t handle, const void *data, int len, uint32_t timeout)
Puts next frame for sending.
Definition: hdlc.c:254
Structure describes configuration of lowest HDLC level Initialize this structure by 0 before passing ...
Definition: hdlc.h:56
int hdlc_close(hdlc_handle_t handle)
Shutdowns all hdlc activity.
Definition: hdlc.c:88
int(* write_block_cb_t)(void *pdata, const void *buffer, int size)
The function writes data to communication channel port.
Definition: tiny_types.h:174
void * user_data
User data, which will be passed to user-defined callback as first argument.
Definition: hdlc.h:118
int hdlc_run_rx(hdlc_handle_t handle, const void *data, int len, int *error)
Processes incoming data.
Definition: hdlc.c:314
Events group type used by Tiny Protocol implementation.
Definition: cpp_hal.h:60
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.
Definition: hdlc.h:92
int hdlc_get_tx_data(hdlc_handle_t handle, void *data, int len)
If hdlc protocol has some data to send it will full data with This function returns either if no more...
Definition: hdlc.c:171