Wirepas SDK
board.h
Go to the documentation of this file.
1 /* Copyright 2020 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 
13 #ifndef BOARD_PCA10100_BOARD_H_
14 #define BOARD_PCA10100_BOARD_H_
15 
16 // NRF_GPIO is mapped to NRF_P0 , for pins P0.00 ... P0.31
17 // Use NRF_P1 for pins P1.00 ... P1.09
18 // With nrf_gpio.h, use SW_pin (logical pins, port-aware)
19 
69 // Serial port pins
70 #define BOARD_USART_TX_PIN 6
71 #define BOARD_USART_RX_PIN 8
72 #define BOARD_USART_CTS_PIN 7 /* For USE_USART_HW_FLOW_CONTROL */
73 #define BOARD_USART_RTS_PIN 5 /* For USE_USART_HW_FLOW_CONTROL */
74 
75 // List of GPIO pins
76 #define BOARD_GPIO_PIN_LIST {13, /* P0.13 */\
77  14, /* P0.14 */\
78  15, /* P0.15 */\
79  16, /* P0.16 */\
80  11, /* P0.11 */\
81  12, /* P0.12 */\
82  24, /* P0.24 */\
83  25, /* P0.25 */\
84  8, /* P0.08. required by the dual_mcu app. usart wakeup pin (= BOARD_USART_RX) */\
85  11} /* P0.11. required by the dual_mcu app (indication signal) */
86 
87 // User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table)
88 #define BOARD_GPIO_ID_LED1 0 // mapped to pin P0.13
89 #define BOARD_GPIO_ID_LED2 1 // mapped to pin P0.14
90 #define BOARD_GPIO_ID_LED3 2 // mapped to pin P0.15
91 #define BOARD_GPIO_ID_LED4 3 // mapped to pin P0.16
92 #define BOARD_GPIO_ID_BUTTON1 4 // mapped to pin P0.11
93 #define BOARD_GPIO_ID_BUTTON2 5 // mapped to pin P0.12
94 #define BOARD_GPIO_ID_BUTTON3 6 // mapped to pin P0.24
95 #define BOARD_GPIO_ID_BUTTON4 7 // mapped to pin P0.25
96 #define BOARD_GPIO_ID_USART_WAKEUP 8 // mapped to pin P0.08
97 #define BOARD_GPIO_ID_UART_IRQ 9 // mapped to pin P0.11
98 
99 // List of LED IDs
100 #define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED1, BOARD_GPIO_ID_LED2, BOARD_GPIO_ID_LED3, BOARD_GPIO_ID_LED4}
101 
102 // Active low polarity for LEDs
103 #define BOARD_LED_ACTIVE_LOW true
104 
105 // List of button IDs
106 #define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON1, BOARD_GPIO_ID_BUTTON2, BOARD_GPIO_ID_BUTTON3, BOARD_GPIO_ID_BUTTON4}
107 
108 // Active low polarity for buttons
109 #define BOARD_BUTTON_ACTIVE_LOW true
110 
111 // Active internal pull-up for buttons
112 #define BOARD_BUTTON_INTERNAL_PULL true
113 
114 // The board supports DCDC (#define BOARD_SUPPORT_DCDC)
115 // Since SDK v1.2 (bootloader > v7) this option has been move to
116 // board/<board_name>/config.mk. Set board_hw_dcdc to yes to enable DCDC.
117 #ifdef BOARD_SUPPORT_DCDC
118 #error This option has been moved to board/<board_name>/config.mk
119 #endif
120 
121 
122 #endif /* BOARD_PCA10100_BOARD_H_ */