Skip to content

Commit 4b8d5e0

Browse files
committed
TARGET_NRF5: Corrected gpio_api to make P0.31 usable on NRF52.
1 parent 1f208f6 commit 4b8d5e0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ typedef enum {
120120
P0_28 = p28,
121121
P0_29 = p29,
122122
P0_30 = p30,
123+
P0_31 = p31,
123124

124125
LED1 = p17,
125126
LED2 = p18,

hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/gpio_api.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020
#include "nrf_drv_gpiote.h"
2121

2222

23-
#define GPIO_PIN_COUNT 31
23+
#if defined(TARGET_MCU_NRF51822)
24+
#define GPIO_PIN_COUNT 31
25+
#else
26+
#define GPIO_PIN_COUNT 32
27+
#endif
2428

2529
typedef struct {
2630
bool used_as_gpio : 1;

0 commit comments

Comments
 (0)