Wirepas SDK
board.h
Go to the documentation of this file.
1 /* Copyright 2025 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 
12 #ifndef BOARD_PCA10171_BOARD_H_
13 #define BOARD_PCA10171_BOARD_H_
14 
15 
16 // NRF_GPIO is mapped to NRF_P0 , for pins P0.00 ... P0.31
17 // With nrf_gpio.h, use SW_pin (logical pins, port-aware)
18 
56 // Serial port pins for UART1
57 #define BOARD_USART_TX_PIN 27
58 #define BOARD_USART_RX_PIN 26
59 #define BOARD_USART_CTS_PIN 15 /* For USE_USART_HW_FLOW_CONTROL */
60 #define BOARD_USART_RTS_PIN 14 /* For USE_USART_HW_FLOW_CONTROL */
61 
62 // List of GPIO pins
63 #define BOARD_GPIO_PIN_LIST {0, /* P0.00 LED-1 */\
64  1, /* P0.01 LED-2 */\
65  4, /* P0.04 LED-3 */\
66  5, /* P0.05 LED-4 */\
67  8, /* P0.08 BUTTON-1 */\
68  9, /* P0.09 BUTTON-2 */\
69  18, /* P0.18 BUTTON-3 */\
70  19, /* P0.19 BUTTON-4 */\
71  26, /* P0.26 required by the dual_mcu app. usart wakeup pin (= BOARD_USART_RX) */\
72  10} /* P0.10 required by the dual_mcu app (indication signal) */
73 
74 // User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table)
75 #define BOARD_GPIO_ID_LED1 0 // mapped to pin P0.00
76 #define BOARD_GPIO_ID_LED2 1 // mapped to pin P0.01
77 #define BOARD_GPIO_ID_LED3 2 // mapped to pin P0.04
78 #define BOARD_GPIO_ID_LED4 3 // mapped to pin P0.05
79 #define BOARD_GPIO_ID_BUTTON1 4 // mapped to pin P0.08
80 #define BOARD_GPIO_ID_BUTTON2 5 // mapped to pin P0.09
81 #define BOARD_GPIO_ID_BUTTON3 6 // mapped to pin P0.18
82 #define BOARD_GPIO_ID_BUTTON4 7 // mapped to pin P0.19
83 #define BOARD_GPIO_ID_USART_WAKEUP 8 // mapped to pin P0.26
84 #define BOARD_GPIO_ID_UART_IRQ 9 // mapped to pin P0.10
85 
86 // List of LED IDs
87 #define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED1, BOARD_GPIO_ID_LED2, BOARD_GPIO_ID_LED3, BOARD_GPIO_ID_LED4}
88 
89 // List of button IDs mapped to GPIO IDs
90 #define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON1, BOARD_GPIO_ID_BUTTON2, BOARD_GPIO_ID_BUTTON3, BOARD_GPIO_ID_BUTTON4}
91 
92 // Active low polarity for LEDs
93 #define BOARD_LED_ACTIVE_LOW false
94 
95 // Active low polarity for buttons
96 #define BOARD_BUTTON_ACTIVE_LOW true
97 
98 // Active internal pull-up for buttons
99 #define BOARD_BUTTON_INTERNAL_PULL true
100 
101 // The board supports DCDC (#define BOARD_SUPPORT_DCDC)
102 // Since SDK v1.2 (bootloader > v7) this option has been moved to
103 // board/<board_name>/config.mk. Set board_hw_dcdc to yes to enable DCDC.
104 #ifdef BOARD_SUPPORT_DCDC
105 #error This option has been moved to board/<board_name>/config.mk
106 #endif
107 
108 // External Flash Memory
109 #define EXT_FLASH_SPI_MOSI 11 // P0.11
110 #define EXT_FLASH_SPI_MISO 12 // P0.12
111 #define EXT_FLASH_SPI_SCK 13 // P0.13
112 #define EXT_FLASH_CS 20 // P0.20
113 #define EXT_FLASH_SPIM_P NRF_SPIM1
114 // Enable external flash memory debugging using LEDs.
115 #define EXT_FLASH_DRIVER_DEBUG_LED
116 
117 
118 #endif /* BOARD_PCA10171_BOARD_H_ */