mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 19:17:47 +00:00
9392ef900d
Blinking the on-board LED works. Nothing else has been tested yet.
17 lines
240 B
Go
17 lines
240 B
Go
// +build avr,attiny
|
|
|
|
package runtime
|
|
|
|
import (
|
|
"device/avr"
|
|
)
|
|
|
|
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")
|
|
}
|
|
}
|
|
}
|