Skip to content
Snippets Groups Projects
Commit 76ca382f authored by Sandeep Mistry's avatar Sandeep Mistry
Browse files

Add Uart::availableForWrite()

parent 2df644e6
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,11 @@ int Uart::available()
return rxBuffer.available();
}
int Uart::availableForWrite()
{
return (sercom->isDataRegisterEmptyUART() ? 1 : 0);
}
int Uart::peek()
{
return rxBuffer.peek();
......
......@@ -32,6 +32,7 @@ class Uart : public HardwareSerial
void begin(unsigned long baudrate, uint16_t config);
void end();
int available();
int availableForWrite();
int peek();
int read();
void flush();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment