Badger2040: Make wake state access methods static

This commit is contained in:
Mike Bell 2022-03-26 12:51:55 +00:00
parent 7720bbe602
commit 4061b446b3
1 changed files with 3 additions and 3 deletions

View File

@ -11,15 +11,15 @@ extern "C" {
extern uint32_t badger_buttons_on_wake;
bool Badger2040_wake_state_any() {
static bool Badger2040_wake_state_any() {
return badger_buttons_on_wake > 0;
}
bool Badger2040_wake_state_get(uint32_t pin) {
static bool Badger2040_wake_state_get(uint32_t pin) {
return badger_buttons_on_wake & (0b1 << pin);
}
bool Badger2040_wake_state_get_once(uint32_t pin) {
static bool Badger2040_wake_state_get_once(uint32_t pin) {
uint32_t mask = 0b1 << pin;
bool value = badger_buttons_on_wake & mask;
badger_buttons_on_wake &= ~mask;