From 282b86c14d43d30b7284c776fb17863a5d8fe296 Mon Sep 17 00:00:00 2001 From: Hydra Date: Wed, 21 Dec 2016 22:09:35 +0000 Subject: [PATCH] Allow targets to use 1 or two buttons. --- src/main/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/main.c b/src/main/main.c index 5fdebc012..7b40976ee 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -196,13 +196,17 @@ void init(void) #endif #if defined(BUTTONS) +#ifdef BUTTON_A_PIN IO_t buttonAPin = IOGetByTag(IO_TAG(BUTTON_A_PIN)); IOInit(buttonAPin, OWNER_SYSTEM, 0); IOConfigGPIO(buttonAPin, IOCFG_IPU); +#endif +#ifdef BUTTON_B_PIN IO_t buttonBPin = IOGetByTag(IO_TAG(BUTTON_B_PIN)); IOInit(buttonBPin, OWNER_SYSTEM, 0); IOConfigGPIO(buttonBPin, IOCFG_IPU); +#endif // Check status of bind plug and exit if not active delayMicroseconds(10); // allow configuration to settle