mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-19 13:54:23 +01:00
Added serialRead and serialAvailable.
This commit is contained in:
parent
15ae9ab1b0
commit
59adc64ba6
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user