build command parser
This commit is contained in:
+4
-3
@@ -1,9 +1,6 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
||||
constexpr uint8_t PACKET_SIZE = 16;
|
||||
constexpr uint8_t PACKET_RINGBUF_SIZE = 16;
|
||||
|
||||
// Will parse serial messages using the serial interface supplied by the dev board
|
||||
// Expects packets of at max 16 bytes.
|
||||
// Terminating byte must be 0x0A.
|
||||
@@ -30,6 +27,10 @@ class UartHandler
|
||||
|
||||
bool isOpen() const noexcept;
|
||||
|
||||
static constexpr uint8_t TERMINATOR_BYTE = 0x0A;
|
||||
static constexpr uint8_t PACKET_SIZE = 16;
|
||||
static constexpr uint8_t PACKET_RINGBUF_SIZE = 16;
|
||||
|
||||
private:
|
||||
// Will move the current contents of inBuf into packetRingBuf. Does NOT reset inBufPos!
|
||||
void pushPacket();
|
||||
|
||||
Reference in New Issue
Block a user