Wirepas SDK
board.h
Go to the documentation of this file.
1 /* Copyright 2018 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 
13 #ifndef BOARD_PCA10059_BOARD_H_
14 #define BOARD_PCA10059_BOARD_H_
15 
16 // PCA10059 nRF52840 USB Dongle
17 // Note: This board is powered by USB +5V directly to MCU VDDH.
18 // Do not try to use the new VDDH-related DCDC0 converter without understanding
19 // the chip errata 197 and 202 (i.e. prefer to use REG0 in default LDO mode).
20 // The default I/O voltage (VDD) is 1.8V in this configuration. To change that,
21 // use first_boot() to set the correct I/O voltage (UICR->REGOUT0).
22 // The old nrf52832-style DCDC can still be used.
23 
24 // NRF_GPIO is mapped to NRF_P0 , for pins P0.00 ... P0.31
25 // Use NRF_P1 for pins P1.00 ... P1.15
26 // With nrf_gpio.h, use SW_pin (logical pins, port-aware)
27 
83 // Serial port pins
84 #define BOARD_USART_TX_PIN 29
85 #define BOARD_USART_RX_PIN 31
86 #define BOARD_USART_CTS_PIN 7 /* For USE_USART_HW_FLOW_CONTROL */
87 #define BOARD_USART_RTS_PIN 5 /* For USE_USART_HW_FLOW_CONTROL */
88 
89 // List of GPIO pins
90 #define BOARD_GPIO_PIN_LIST {6, /* P0.06 */\
91  8, /* P0.08 */\
92  41, /* P1.09 */\
93  12, /* P0.12 */\
94  38, /* P1.06 */\
95  31} /* P0.31. required by the dual_mcu app. usart wakeup pin (= BOARD_USART_RX) */
96 
97 // User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table)
98 #define BOARD_GPIO_ID_LED1 0 // mapped to pin P0.06
99 #define BOARD_GPIO_ID_LED2 1 // mapped to pin P0.08
100 #define BOARD_GPIO_ID_LED_G 2 // mapped to pin P1.09
101 #define BOARD_GPIO_ID_LED_B 3 // mapped to pin P0.12
102 #define BOARD_GPIO_ID_BUTTON0 4 // mapped to pin P1.06
103 #define BOARD_GPIO_ID_USART_WAKEUP 5 // mapped to pin P0.31
104 
105 // List of LED IDs
106 #define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED1, BOARD_GPIO_ID_LED2, BOARD_GPIO_ID_LED_G, BOARD_GPIO_ID_LED_B}
107 
108 // Active low polarity for LEDs
109 #define BOARD_LED_ACTIVE_LOW true
110 
111 // List of button IDs mapped to GPIO IDs: SW1
112 #define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON0}
113 
114 // Active low polarity for buttons
115 #define BOARD_BUTTON_ACTIVE_LOW true
116 
117 // Active internal pull-up for buttons
118 #define BOARD_BUTTON_INTERNAL_PULL true
119 
120 // The board supports DCDC (#define BOARD_SUPPORT_DCDC)
121 // Since SDK v1.2 (bootloader > v7) this option has been move to
122 // board/<board_name>/config.mk. Set board_hw_dcdc to yes to enable DCDC.
123 #ifdef BOARD_SUPPORT_DCDC
124 #error This option has been moved to board/<board_name>/config.mk
125 #endif
126 
127 
128 #endif /* BOARD_PCA10059_BOARD_H_ */