Tiny protocol
0.11.0
Tiny communication protocol for microcontrollers
|
#include <TinyProtocolFd.h>
Public Member Functions | |
ProtoFdD (int size) | |
![]() | |
IProtoFd (void *buffer, int bufferSize) | |
void | begin (write_block_cb_t writecb, read_block_cb_t readcb) |
void | begin () |
void | beginToSerial () |
void | beginToSerial1 () |
void | beginToSerial2 () |
void | beginToSerial3 () |
void | end () |
int | write (char *buf, int size) |
int | write (IPacket &pkt) |
int | run_rx (uint16_t timeout=0) |
int | run_rx (const void *data, int len) |
int | run_tx (uint16_t timeout=0) |
int | run_tx (void *data, int max_size) |
void | disableCrc () |
void | enableCrc (hdlc_crc_t crc) |
bool | enableCheckSum () |
bool | enableCrc16 () |
bool | enableCrc32 () |
void | setReceiveCallback (void(*on_receive)(IPacket &pkt)=nullptr) |
void | setSendCallback (void(*on_send)(IPacket &pkt)=nullptr) |
void | setWindowSize (uint8_t window) |
void | setSendTimeout (uint16_t timeout) |
Additional Inherited Members | |
![]() | |
virtual void | onReceive (uint8_t *pdata, int size) |
virtual void | onSend (uint8_t *pdata, int size) |
This is special class for Full duplex protocol, which allocates buffers dynamically. We need to have separate class for this, as on small microcontrollers dynamic allocation in basic class increases flash consumption, even if dynamic memory is not used.
|
inline |
Creates instance of Full duplex protocol with dynamically allocated buffer. Use this class only on powerful microcontrollers.