mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 05:53:39 +00:00
4f4d7976c6
* 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
25 lines
306 B
Go
25 lines
306 B
Go
// +build avr,arduino
|
|
|
|
package machine
|
|
|
|
const CPU_FREQUENCY = 16000000
|
|
|
|
// LED on the Arduino
|
|
const LED = 13
|
|
|
|
// ADC on the Arduino
|
|
const (
|
|
ADC0 = 0
|
|
ADC1 = 1
|
|
ADC2 = 2
|
|
ADC3 = 3
|
|
ADC4 = 4 // Used by TWI for SDA
|
|
ADC5 = 5 // Used by TWI for SCL
|
|
)
|
|
|
|
// UART pins
|
|
const (
|
|
UART_TX_PIN = 1
|
|
UART_RX_PIN = 0
|
|
)
|