main (test): run tests on AVR

This commit is contained in:
Nia
2022-01-01 09:58:03 -05:00
committed by GitHub
parent 342c438586
commit e536676a67
3 changed files with 103 additions and 9 deletions
+5 -1
View File
@@ -1,3 +1,4 @@
//go:build avr
// +build avr
package runtime
@@ -111,7 +112,10 @@ func exit(code int) {
}
func abort() {
// Disable interrupts and go to sleep.
// This can never be awoken except for reset, and is recogized as termination by simavr.
avr.Asm("cli")
for {
sleepWDT(WDT_PERIOD_2S)
avr.Asm("sleep")
}
}