31 #include "link/TinyLinkLayer.h" 32 #include "interface/TinySerial.h" 54 bool result = BASE::begin(onReadCb, onSendCb, udata);
55 m_serial.setTimeout( this->getTimeout() );
56 return result && m_serial.begin(m_speed);
70 int len = m_serial.readBytes(p, BSIZE);
73 int temp = BASE::parseData( p, len);
86 int len = BASE::getData( buf, BSIZE );
90 int sent = m_serial.write(ptr, len);
100 void setSpeed( uint32_t speed )
106 uint32_t m_speed = 115200;
Template class for Serial-based communication for any of TinyProto Links.
Definition: TinySerialLinkLayer.h:43
void(* on_frame_send_cb_t)(void *udata, uint8_t address, const uint8_t *pdata, int size)
on_frame_send_cb_t is a callback function, which is called every time new frame is sent...
Definition: tiny_types.h:223
Definition: TinySerial.h:42
void(* on_frame_read_cb_t)(void *udata, uint8_t address, uint8_t *pdata, int size)
on_frame_read_cb_t is a callback function, which is called every time new frame is received...
Definition: tiny_types.h:213
Definition: TinySerial.cpp:22