Only record front button state at init time
This commit is contained in:
parent
a7f2014309
commit
0ab44ef10a
|
@ -7,7 +7,7 @@
|
||||||
namespace {
|
namespace {
|
||||||
struct Badger2040_WakeUpInit {
|
struct Badger2040_WakeUpInit {
|
||||||
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_function(pimoroni::Badger2040::ENABLE_3V3, GPIO_FUNC_SIO);
|
||||||
gpio_set_dir(pimoroni::Badger2040::ENABLE_3V3, GPIO_OUT);
|
gpio_set_dir(pimoroni::Badger2040::ENABLE_3V3, GPIO_OUT);
|
||||||
|
|
Loading…
Reference in New Issue