Only record front button state at init time

This commit is contained in:
Mike Bell 2022-03-24 22:01:10 +00:00
parent a7f2014309
commit 0ab44ef10a
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@
namespace {
struct Badger2040_WakeUpInit {
Badger2040_WakeUpInit()
: state(gpio_get_all())
: state(gpio_get_all() & (0x1f << 11)) // Record state of all the front buttons
{
gpio_set_function(pimoroni::Badger2040::ENABLE_3V3, GPIO_FUNC_SIO);
gpio_set_dir(pimoroni::Badger2040::ENABLE_3V3, GPIO_OUT);