Merge pull request #10424 from gebart/frdm-k22f/btn-macros
frdm-k22f: Define BTNx macros for user pushbuttons
This commit is contained in:
commit
c699eef9cb
@ -52,6 +52,20 @@ extern "C"
|
|||||||
#define LED2_TOGGLE (GPIOD->PTOR = LED2_MASK)
|
#define LED2_TOGGLE (GPIOD->PTOR = LED2_MASK)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Button pin definitions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* SW2, SW3 will short these pins to ground when pushed. Both pins have external
|
||||||
|
* pull-up resistors to VDD */
|
||||||
|
/* BTN0 is mapped to SW2 */
|
||||||
|
#define BTN0_PIN GPIO_PIN(PORT_C, 1)
|
||||||
|
#define BTN0_MODE GPIO_IN
|
||||||
|
/* BTN1 is mapped to SW3 */
|
||||||
|
#define BTN1_PIN GPIO_PIN(PORT_B, 17)
|
||||||
|
#define BTN1_MODE GPIO_IN
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name FXOS8700CQ 3-axis accelerometer and magnetometer bus configuration
|
* @name FXOS8700CQ 3-axis accelerometer and magnetometer bus configuration
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user