mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 20:13:40 +00:00
attiny: remove dummy UART
I think it's better not to provide a UART0 global at all than one that does nothing.
This commit is contained in:
committed by
Ron Evans
parent
c60c36f0a8
commit
42088f938e
@@ -4,8 +4,17 @@ package runtime
|
||||
|
||||
import (
|
||||
"device/avr"
|
||||
"machine"
|
||||
)
|
||||
|
||||
func initUART() {
|
||||
machine.UART0.Configure(machine.UARTConfig{})
|
||||
}
|
||||
|
||||
func putchar(c byte) {
|
||||
machine.UART0.WriteByte(c)
|
||||
}
|
||||
|
||||
// Sleep for a given period. The period is defined by the WDT peripheral, and is
|
||||
// on most chips (at least) 3 bits wide, in powers of two from 16ms to 2s
|
||||
// (0=16ms, 1=32ms, 2=64ms...). Note that the WDT is not very accurate: it can
|
||||
|
||||
Reference in New Issue
Block a user