Tiny protocol
0.7.0
Tiny communication protocol for microcontrollers
|
Functions | |
int | tiny_hd_init (STinyHdData *handle, STinyHdInit *init) |
Initialized communication for Tiny Half Duplex protocol. More... | |
void | tiny_hd_close (STinyHdData *handle) |
stops Tiny Half Duplex state machine More... | |
int | tiny_hd_run (STinyHdData *handle) |
runs receive functions of Tiny Half Duplex protocol. More... | |
int | tiny_send_wait_ack (STinyHdData *handle, void *buf, uint16_t len) |
Sends userdata and waits for acknowledgement from remote side. More... | |
void tiny_hd_close | ( | STinyHdData * | handle | ) |
stops Tiny Half Duplex state machine
stops Tiny Half Duplex state machine.
handle | - pointer to STinyHdData |
int tiny_hd_init | ( | STinyHdData * | handle, |
STinyHdInit * | init | ||
) |
Initialized communication for Tiny Half Duplex protocol.
The function initializes internal structures for Tiny Half Duplex state machine.
handle | - pointer to Tiny Half Duplex data |
init | - pointer to STinyHdInit data. |
int tiny_hd_run | ( | STinyHdData * | handle | ) |
runs receive functions of Tiny Half Duplex protocol.
Runs receive functions of Tiny Half Duplex protocol. This function must be called all the time in the loop if send operation is not performed. For atmega controllers this means to call tiny_hd_run() in loop() routine. If user packet is received during execution of the function, it wil call on_frame_cb_t callback to process received packet.
handle | - pointer to STinyHdData |
int tiny_send_wait_ack | ( | STinyHdData * | handle, |
void * | buf, | ||
uint16_t | len | ||
) |
Sends userdata and waits for acknowledgement from remote side.
Sends userdata and waits for acknowledgement from remote side.
handle | - pointer to STinyHdData |
buf | - data to send |
len | - length of data to send |