From f15ad4221765448513be754f2d31e9b6d2607f98 Mon Sep 17 00:00:00 2001 From: Crsarmv7l <85343771+Crsarmv7l@users.noreply.github.com> Date: Mon, 29 Apr 2024 19:59:41 -0400 Subject: [PATCH] Drop sync bool and getter for the buffer --- src/protocols/PhysicalLayer/PhysicalLayer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/protocols/PhysicalLayer/PhysicalLayer.cpp b/src/protocols/PhysicalLayer/PhysicalLayer.cpp index b9782afe..f8fbd651 100644 --- a/src/protocols/PhysicalLayer/PhysicalLayer.cpp +++ b/src/protocols/PhysicalLayer/PhysicalLayer.cpp @@ -206,6 +206,13 @@ int16_t PhysicalLayer::readData(String& str, size_t len) { } #endif +uint8_t* PhysicalLayer::getDirectBuffer(bool drop) { + if(drop) { + dropsync(); + } + return (this->buffer); +} + int16_t PhysicalLayer::readData(uint8_t* data, size_t len) { (void)data; (void)len;