27 #ifndef _TINY_HALF_DUPLEX_H_ 28 #define _TINY_HALF_DUPLEX_H_ 35 #include "proto/hdlc/tiny_hdlc.h" 45 #ifndef DOXYGEN_SHOULD_SKIP_THIS 176 return &handle->handle;
int(* write_block_cb_t)(void *pdata, const void *buffer, int size)
Definition: tiny_proto_types.h:114
int tiny_hd_init(STinyHdData *handle, STinyHdInit *init)
Initialized communication for Tiny Half Duplex protocol.
Definition: tiny_hd.c:174
uint8_t multithread_mode
Multithread mode. Should be zero.
Definition: tiny_hd.h:64
read_block_cb_t read_func
callback function to read bytes from the physical channel
Definition: tiny_hd.h:78
uint16_t timeout
timeout. Can be set to 0 during initialization. In this case timeout will be set to default ...
Definition: tiny_hd.h:88
void tiny_hd_close(STinyHdData *handle)
stops Tiny Half Duplex state machine
Definition: tiny_hd.c:204
Definition: tiny_layer2.h:110
on_frame_cb_t on_frame_cb
Callback to process received frames.
Definition: tiny_hd.h:54
read_block_cb_t read_func
callback function to read bytes from the physical channel
Definition: tiny_hd.h:52
int tiny_send_wait_ack(STinyHdData *handle, void *buf, uint16_t len)
Sends userdata and waits for acknowledgement from remote side.
Definition: tiny_hd.c:71
on_frame_cb_t on_frame_cb
callback function to process incoming frames
Definition: tiny_hd.h:82
write_block_cb_t write_func
callback function to write bytes to the physical channel
Definition: tiny_hd.h:76
hdlc_crc_t crc_type
Definition: tiny_hd.h:96
struct STinyHdInit_ STinyHdInit
uint16_t inbuf_size
maximum input buffer size
Definition: tiny_hd.h:86
void * inbuf
buffer to store input bytes being received. Must be at least maximum packet size over communication c...
Definition: tiny_hd.h:84
struct STinyHdData_ STinyHdData
int(* read_block_cb_t)(void *pdata, void *buffer, int size)
Definition: tiny_proto_types.h:125
uint8_t multithread_mode
multithread mode. At present should be 0
Definition: tiny_hd.h:90
Definition: tiny_hdlc.h:38
uint16_t timeout
Timeout for operations with acknowledge.
Definition: tiny_hd.h:56
int tiny_hd_run(STinyHdData *handle)
runs receive functions of Tiny Half Duplex protocol.
Definition: tiny_hd.c:218
void(* on_frame_cb_t)(void *handle, uint16_t uid, uint8_t *pdata, int size)
Definition: tiny_proto_types.h:138
uint16_t uid
field used to store temporary uid
Definition: tiny_hd.h:58
void * user_data
user specific data
Definition: tiny_hd.h:66
write_block_cb_t write_func
callback function to write bytes to the physical channel
Definition: tiny_hd.h:50
void * pdata
user data for block read/write functions
Definition: tiny_hd.h:80