Add core support for multiple UARTs (#152)

* machine/uart: add core support for multiple UARTs by allowing for multiple RingBuffers
* machine/uart: complete core support for multiple UARTs
* machine/uart: no need to store pointer to UART, better to treat like I2C and SPI
* machine/uart: increase ring buffer size to 128 bytes
* machine/uart: improve godocs comments and use comma-ok idiom for buffer Put/Get methods
This commit is contained in:
Ron Evans
2019-01-25 22:09:13 +01:00
committed by GitHub
parent d820c36c4f
commit 4f4d7976c6
12 changed files with 216 additions and 77 deletions
+6
View File
@@ -25,6 +25,12 @@ func (p GPIO) Get() bool {
return (val > 0)
}
// UART on the AVR is a dummy implementation. UART has not been implemented for ATtiny
// devices.
type UART struct {
Buffer *RingBuffer
}
// Configure is a dummy implementation. UART has not been implemented for ATtiny
// devices.
func (uart UART) Configure(config UARTConfig) {