tinygo-org / tinygo

Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
https://tinygo.org
Other
14.71k stars 858 forks source link

AtMega328p sleep mode #1459

Open Houtmann opened 3 years ago

Houtmann commented 3 years ago

are the differents sleep mod are implemented for the AtMega328p ? Because is useful for low consumption project

Thanks for the anwser

aykevl commented 3 years ago

Not yet. Right now the chip will go to idle mode when sleeping using time.Sleep to reduce power consumption because it looks like lower sleep modes mess with the UART.

For such a change, it's important to consider what that means in Go. For example, one goroutine might want to go into standby mode but another might want to remain responsive. Especially as some peripherals might be disabled in some power modes.