1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-01 03:47:23 +03:00

Added serialRead and serialAvailable.

This commit is contained in:
David A. Mellis
2005-09-19 10:57:06 +00:00
parent 15ae9ab1b0
commit 59adc64ba6
2 changed files with 12 additions and 0 deletions

View File

@ -220,6 +220,16 @@ void serialWrite(unsigned char c)
uartSendByte(c);
}
int serialAvailable()
{
return uartGetRxBuffer()->datalength;
}
int serialRead()
{
return uartGetByte();
}
void printMode(int mode)
{
// do nothing, we only support serial printing, not lcd.