error message transmission now happens via uarthandler
This commit is contained in:
+7
-4
@@ -7,7 +7,7 @@
|
||||
class UartHandler
|
||||
{
|
||||
public:
|
||||
static UartHandler& getInstance();
|
||||
static UartHandler& getInstance() noexcept;
|
||||
|
||||
// Will attempt to initialize the serial port, returns status.
|
||||
// May block up to 1000ms.
|
||||
@@ -15,14 +15,17 @@ class UartHandler
|
||||
|
||||
void close();
|
||||
|
||||
void poll();
|
||||
void poll() noexcept;
|
||||
// Will write the next available whole line into char* (provide at least 16 bytes!)
|
||||
// Returns whether any data was written.
|
||||
// If data available is longer than 16 bytes, an error will be raised.
|
||||
bool getNextPacket(char* dest);
|
||||
bool getNextPacket(char* dest) noexcept;
|
||||
|
||||
size_t send(const char* buf, size_t nbytes);
|
||||
size_t send(const String& str);
|
||||
|
||||
// Returns how many packets are ready for reading
|
||||
uint8_t getNumAvailablePackets() const;
|
||||
uint8_t getNumAvailablePackets() const noexcept;
|
||||
|
||||
bool isOpen() const noexcept;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user