diff --git a/src/boards/pca10059.h b/src/boards/pca10059.h index cfa3cb3..30c2998 100644 --- a/src/boards/pca10059.h +++ b/src/boards/pca10059.h @@ -37,6 +37,8 @@ #ifndef PCA10059_H #define PCA10059_H +#define _PINNUM(port, pin) ((port)*32 + (pin)) + /*------------------------------------------------------------------*/ /* LED *------------------------------------------------------------------*/ @@ -50,8 +52,8 @@ *------------------------------------------------------------------*/ #define BUTTONS_NUMBER 2 -#define BUTTON_1 (1 << 5 | 6) -#define BUTTON_2 (1 << 5 | 10) +#define BUTTON_1 _PINNUM(1, 6) +#define BUTTON_2 _PINNUM(1, 10) #define BUTTON_PULL NRF_GPIO_PIN_PULLUP /*------------------------------------------------------------------*/