UART: Implement a system of flow control
authorMichel Pollet <buserror@gmail.com>
Wed, 23 Dec 2009 22:27:31 +0000 (22:27 +0000)
committerMichel Pollet <buserror@gmail.com>
Wed, 23 Dec 2009 22:27:31 +0000 (22:27 +0000)
commit90d3defe5aae8bbc85d9f71c4b788f98d6666f77
tree756ba06ec3dcf692b148e86b10dd09a88dcf4e5a
parentf93ae3d0b1d2c92859ffb1838c4b6edbaaa1b828
UART: Implement a system of flow control

+ The uart now signals (using IRQs) when it's fifo is full and
empty. This allow controling code to send new bytes, or to pause.
+ The uart also now understand the Baud rate and prints it.
+ Added new IOCTL to get/set the UART emulation flags

A new mode of the UART was made specialy for code that spinloops
waiting to get/send a byte. Now if the uart detects that, it will
insert a usleep() when the uart is idle, this will prevent
code from eating 100% cpu doing nothing.

Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/sim/avr_uart.c
simavr/sim/avr_uart.h