github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/runtime/runtime_attiny.go (about) 1 //go:build avr && attiny 2 3 package runtime 4 5 import ( 6 "device/avr" 7 ) 8 9 func initUART() { 10 } 11 12 func putchar(c byte) { 13 // UART is not supported. 14 } 15 16 func getchar() byte { 17 // UART is not supported. 18 return 0 19 } 20 21 func buffered() int { 22 // UART is not supported. 23 return 0 24 } 25 26 func sleepWDT(period uint8) { 27 // TODO: use the watchdog timer instead of a busy loop. 28 for i := 0x45; i != 0; i-- { 29 for i := 0xff; i != 0; i-- { 30 avr.Asm("nop") 31 } 32 } 33 }