32 #ifndef SERIAL_CLASS_H 33 #define SERIAL_CLASS_H 39 #define RX_BUFFER_SIZE 512 40 #define TX_BUFFER_SIZE 512 60 virtual void write(
const uint8_t *ch, uint8_t len) = 0;
65 virtual void put_byte(uint8_t ch) = 0;
66 virtual bool flush() = 0;
80 #endif // SERIAL CLASS_H virtual bool tx_buffer_empty()=0
std::function< void(uint8_t)> receive_CB_
virtual uint8_t read_byte()=0
virtual void put_byte(uint8_t ch)=0
virtual void write(const uint8_t *ch, uint8_t len)=0
virtual void unregister_rx_callback()=0
virtual uint32_t rx_bytes_waiting()=0
virtual void register_rx_callback(void(*cb)(uint8_t data))=0
virtual uint32_t tx_bytes_free()=0