Direct serial line in/out. P-persistent CSMA. SLIP compatibility.

This commit is contained in:
Mark Qvist 2014-04-27 18:54:01 +02:00
parent 74542aa87a
commit bd11c5ee83
9 changed files with 180 additions and 52 deletions

View file

@ -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;
}
}
/**