mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-21 15:54:39 +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);
|
uartSendByte(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int serialAvailable()
|
||||||
|
{
|
||||||
|
return uartGetRxBuffer()->datalength;
|
||||||
|
}
|
||||||
|
|
||||||
|
int serialRead()
|
||||||
|
{
|
||||||
|
return uartGetByte();
|
||||||
|
}
|
||||||
|
|
||||||
void printMode(int mode)
|
void printMode(int mode)
|
||||||
{
|
{
|
||||||
// do nothing, we only support serial printing, not lcd.
|
// do nothing, we only support serial printing, not lcd.
|
||||||
|
@ -67,6 +67,8 @@ void setup(void);
|
|||||||
void loop(void);
|
void loop(void);
|
||||||
void beginSerial(int);
|
void beginSerial(int);
|
||||||
void serialWrite(unsigned char);
|
void serialWrite(unsigned char);
|
||||||
|
int serialAvailable();
|
||||||
|
int serialRead();
|
||||||
void print(const char *, ...);
|
void print(const char *, ...);
|
||||||
void printMode(int);
|
void printMode(int);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user