mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Added serialRead and serialAvailable.
This commit is contained in:
@ -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.
|
||||
|
@ -67,6 +67,8 @@ void setup(void);
|
||||
void loop(void);
|
||||
void beginSerial(int);
|
||||
void serialWrite(unsigned char);
|
||||
int serialAvailable();
|
||||
int serialRead();
|
||||
void print(const char *, ...);
|
||||
void printMode(int);
|
||||
|
||||
|
Reference in New Issue
Block a user