mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +00:00
42088f938e
I think it's better not to provide a UART0 global at all than one that does nothing.
24 lines
314 B
Go
24 lines
314 B
Go
// +build avr,attiny
|
|
|
|
package runtime
|
|
|
|
import (
|
|
"device/avr"
|
|
)
|
|
|
|
func initUART() {
|
|
}
|
|
|
|
func putchar(c byte) {
|
|
// UART is not supported.
|
|
}
|
|
|
|
func sleepWDT(period uint8) {
|
|
// TODO: use the watchdog timer instead of a busy loop.
|
|
for i := 0x45; i != 0; i-- {
|
|
for i := 0xff; i != 0; i-- {
|
|
avr.Asm("nop")
|
|
}
|
|
}
|
|
}
|