9#ifndef SERIAL_UNPACKER_H
10#define SERIAL_UNPACKER_H
13#include <HardwareSerial.h>
30 const uint8_t start_byte;
93 void allocate_buffer (
const uint8_t len);
105 void put_byte_to_buffer (
const uint8_t data);
115 bool is_start_byte_received ();
Definition HardwareSerial.h:99
HardwareSerial & get_uart()
Gets the UART object to read packets from.
~Serial_unpacker()
Destroys this unpacker.
bool update()
Checks if a new packet is received.
Serial_unpacker(HardwareSerial &init_uart, const uint8_t init_start_byte)
Creates an unpacker.
uint8_t get_packet_len()
Gets the length of the received data.
const uint8_t * get_packet_ptr()
Gets the pointer to the received data.