Skip to content

Instantly share code, notes, and snippets.

@joric
Created April 17, 2021 16:45
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joric/7226eda8d5fdba44bc64d4520825a11d to your computer and use it in GitHub Desktop.
Save joric/7226eda8d5fdba44bc64d4520825a11d to your computer and use it in GitHub Desktop.
nrfmicro_bootloader.patch
src/boards/pca10056/board.h | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/boards/pca10056/board.h b/src/boards/pca10056/board.h
index 92ce3462..bfe13798 100644
--- a/src/boards/pca10056/board.h
+++ b/src/boards/pca10056/board.h
@@ -25,20 +25,21 @@
#ifndef PCA10056_H
#define PCA10056_H
+#define _PINNUM(port, pin) ((port)*32 + (pin))
+
/*------------------------------------------------------------------*/
/* LED
*------------------------------------------------------------------*/
-#define LEDS_NUMBER 2
-#define LED_PRIMARY_PIN 13
-#define LED_SECONDARY_PIN 14
-#define LED_STATE_ON 0
+#define LEDS_NUMBER 1
+#define LED_PRIMARY_PIN _PINNUM(1, 10) // Blue
+#define LED_STATE_ON 1
/*------------------------------------------------------------------*/
/* BUTTON
*------------------------------------------------------------------*/
#define BUTTONS_NUMBER 2
-#define BUTTON_1 11
-#define BUTTON_2 12
+#define BUTTON_1 _PINNUM(1,2)
+#define BUTTON_2 _PINNUM(0,12)
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
//--------------------------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment