mirror of
https://github.com/markqvist/OpenModem.git
synced 2025-08-21 21:19:27 -04:00
Direct serial line in/out. P-persistent CSMA. SLIP compatibility.
This commit is contained in:
parent
74542aa87a
commit
bd11c5ee83
9 changed files with 180 additions and 52 deletions
|
@ -189,6 +189,14 @@ int ser_getchar_nowait(struct Serial *fd)
|
|||
return (int)(unsigned char)fifo_pop_locked(&fd->rxfifo);
|
||||
}
|
||||
|
||||
bool ser_available(struct Serial *fd) {
|
||||
if (fifo_isempty_locked(&fd->rxfifo)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue