build command parser

This commit is contained in:
Leonetienne
2025-12-14 12:50:48 +01:00
parent 181139aae5
commit 25313b198e
6 changed files with 71 additions and 13 deletions
+4 -3
View File
@@ -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();