Allow targets to use 1 or two buttons.
This commit is contained in:
parent
cfba8ca055
commit
282b86c14d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue