Wirepas SDK
board.h
Go to the documentation of this file.
1 /* Copyright 2024 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 
12 #ifndef BOARD_PCA10156_BOARD_H_
13 #define BOARD_PCA10156_BOARD_H_
14 
15 /* NRF_GPIO is mapped to NRF_P1. */
16 
17 /* Pins P0.00 - P0.04 are used via the NRF_P0 peripheral.
18  With nrf_gpio.h, use SW_pin (logical pins, port-aware).
19 
20  These pins belong to the low-power domain. The maximum speed is 8 MHz. */
21 
32 /* Pins P1.00 - P1.14 are used via the NRF_P1 peripheral.
33  With nrf_gpio.h, use SW_pin (logical pins, port-aware).
34 
35  These pins belong to the peripheral domain. The maximum speed is 8 MHz.
36 
37  Some pins are not connected to the headers on board. These are indicated
38  with "n.c." in the Notes column. */
39 
60 /* Pins P2.00 - P2.10 are used via the NRF_P2 peripheral.
61  With nrf_gpio.h, use SW_pin (logical pins, port-aware).
62 
63  These pins belong to the MCU domain. The maximum speed is 64 MHz.
64 
65  Some pins are not connected to the headers on board. These are indicated
66  with "n.c." in the Notes column. */
83 /* Serial port pins for UART1 */
84 #define BOARD_USART_TX_PIN 36 /* P1.04 */
85 #define BOARD_USART_RX_PIN 37 /* P1.05 */
86 #define BOARD_USART_CTS_PIN 39 /* P1.07, for USE_USART_HW_FLOW_CONTROL */
87 #define BOARD_USART_RTS_PIN 38 /* P1.06, for USE_USART_HW_FLOW_CONTROL */
88 #define BOARD_USART_IRQ_PIN 43 /* P1.11, required by dualmcu_app */
89 
90 /* GPIO pin list for pca10156 */
91 #define BOARD_GPIO_PIN_LIST {73, /* LED0 */ \
92  42, /* LED1 */ \
93  71, /* LED2 */ \
94  46, /* LED3 */ \
95  45, /* BUTTON0 */ \
96  41, /* BUTTON1 */ \
97  40, /* BUTTON2 */ \
98  /* Required by dualmcu_app, \
99  * USART wakeup pin (= BOARD_USART_RX) */ \
100  BOARD_USART_RX_PIN, \
101  /* Required by dualmcu_app, \
102  * indication signal */ \
103  BOARD_USART_IRQ_PIN}
104 
105 
106 /* User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table) */
107 #define BOARD_GPIO_ID_LED0 0 /* P2.09 */
108 #define BOARD_GPIO_ID_LED1 1 /* P1.10 */
109 #define BOARD_GPIO_ID_LED2 2 /* P2.07 */
110 #define BOARD_GPIO_ID_LED3 3 /* P1.14 */
111 
112 #define BOARD_GPIO_ID_BUTTON0 4 /* P1.13 */
113 #define BOARD_GPIO_ID_BUTTON1 5 /* P1.09 */
114 #define BOARD_GPIO_ID_BUTTON2 6 /* P1.08 */
115 
116 #define BOARD_GPIO_ID_USART_WAKEUP 7 /* P1.05 */
117 #define BOARD_GPIO_ID_UART_IRQ 8 /* P1.11 */
118 
119 /* List of LED IDs */
120 #define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED0, \
121  BOARD_GPIO_ID_LED1, \
122  BOARD_GPIO_ID_LED2, \
123  BOARD_GPIO_ID_LED3}
124 
125 /* List of button IDs mapped to GPIO IDs */
126 #define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON0, \
127  BOARD_GPIO_ID_BUTTON1, \
128  BOARD_GPIO_ID_BUTTON2}
129 
130 /* Active low polarity for LEDs */
131 #define BOARD_LED_ACTIVE_LOW false
132 
133 /* Active low polarity for buttons */
134 #define BOARD_BUTTON_ACTIVE_LOW true
135 
136 /* Active internal pull-up for buttons */
137 #define BOARD_BUTTON_INTERNAL_PULL true
138 
139 
140 
141 
142 #endif /* BOARD_PCA10156_BOARD_H_ */