minor clean up for pca10059

This commit is contained in:
hathach 2019-01-11 11:36:42 +07:00
parent 95cbe3b129
commit 3611a0579e
No known key found for this signature in database
GPG Key ID: 2FA891220FBFD581

View File

@ -37,6 +37,8 @@
#ifndef PCA10059_H #ifndef PCA10059_H
#define PCA10059_H #define PCA10059_H
#define _PINNUM(port, pin) ((port)*32 + (pin))
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* LED /* LED
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
@ -50,8 +52,8 @@
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
#define BUTTONS_NUMBER 2 #define BUTTONS_NUMBER 2
#define BUTTON_1 (1 << 5 | 6) #define BUTTON_1 _PINNUM(1, 6)
#define BUTTON_2 (1 << 5 | 10) #define BUTTON_2 _PINNUM(1, 10)
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP #define BUTTON_PULL NRF_GPIO_PIN_PULLUP
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/