27 #ifndef _TINY_LIGHT_PROTOCOL_H_ 28 #define _TINY_LIGHT_PROTOCOL_H_ 34 # include <HardwareSerial.h> 83 begin([](
void *p,
const void *b,
int s)->
int {
return Serial1.write((
const uint8_t *)b, s); },
84 [](
void *p,
void *b,
int s)->
int {
return Serial1.readBytes((uint8_t *)b, s); });
96 begin([](
void *p,
const void *b,
int s)->
int {
return Serial2.write((
const uint8_t *)b, s); },
97 [](
void *p,
void *b,
int s)->
int {
return Serial2.readBytes((uint8_t *)b, s); });
116 int write (
char* buf,
int size);
126 int read (
char* buf,
int size);
hdlc_crc_t
Definition: tiny_hdlc.h:33
Tiny protocol Arduino API.
If default is specified HDLC will auto select CRC option.
Definition: tiny_hdlc.h:35
Definition: TinyLightProtocol.h:39
int read(char *buf, int size)
void beginToSerial2()
Definition: TinyLightProtocol.h:94
void begin(write_block_cb_t writecb, read_block_cb_t readcb)
int(* read_block_cb_t)(void *pdata, void *buffer, int size)
Definition: tiny_types.h:139
int write(char *buf, int size)
Definition: tiny_light.h:51
Definition: TinyPacket.h:46
Definition: TinyLightProtocol.h:51
int(* write_block_cb_t)(void *pdata, const void *buffer, int size)
Definition: tiny_types.h:128
void beginToSerial1()
Definition: TinyLightProtocol.h:81