Skip to content
Snippets Groups Projects
Commit 42dd310a authored by Arturo Guadalupi's avatar Arturo Guadalupi
Browse files

Merge pull request #146 from sandeepmistry/serial-availableForWrite

Add Uart::availableForWrite()
parents f3a29a7d 76ca382f
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