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_PCA10112_BOARD_H_
14#define BOARD_PCA10112_BOARD_H_
15
16// PCA10112 nRF52840 SoC + nRF21540 FEM
17// NRF_GPIO is mapped to NRF_P0 , for pins P0.00 ... P0.31
18// Use NRF_P1 for pins P1.00 ... P1.15
19// With nrf_gpio.h, use SW_pin (logical pins, port-aware)
20
76// Serial port pins
77#define BOARD_USART_TX_PIN 6
78#define BOARD_USART_RX_PIN 8
79#define BOARD_USART_CTS_PIN 7 /* For USE_USART_HW_FLOW_CONTROL */
80#define BOARD_USART_RTS_PIN 5 /* For USE_USART_HW_FLOW_CONTROL */
81
82// List of GPIO pins
83#define BOARD_GPIO_PIN_LIST {13, /* P0.13 */\
84 14, /* P0.14 */\
85 15, /* P0.15 */\
86 16, /* P0.16 */\
87 11, /* P0.11 */\
88 12, /* P0.12 */\
89 24, /* P0.24 */\
90 25, /* P0.25 */\
91 8} /* P0.08. required by the dual_mcu app. usart wakeup pin (= BOARD_USART_RX) */
92
93// User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table)
94#define BOARD_GPIO_ID_LED1 0 // mapped to pin P0.13
95#define BOARD_GPIO_ID_LED2 1 // mapped to pin P0.14
96#define BOARD_GPIO_ID_LED3 2 // mapped to pin P0.15
97#define BOARD_GPIO_ID_LED4 3 // mapped to pin P0.16
98#define BOARD_GPIO_ID_BUTTON1 4 // mapped to pin P0.11
99#define BOARD_GPIO_ID_BUTTON2 5 // mapped to pin P0.12
100#define BOARD_GPIO_ID_BUTTON3 6 // mapped to pin P0.24
101#define BOARD_GPIO_ID_BUTTON4 7 // mapped to pin P0.25
102#define BOARD_GPIO_ID_USART_WAKEUP 8 // mapped to pin P0.08
103
104// List of LED IDs
105#define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED1, BOARD_GPIO_ID_LED2, BOARD_GPIO_ID_LED3, BOARD_GPIO_ID_LED4}
106
107// Active low polarity for LEDs
108#define BOARD_LED_ACTIVE_LOW true
109
110// List of button IDs
111#define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON1, BOARD_GPIO_ID_BUTTON2, BOARD_GPIO_ID_BUTTON3, BOARD_GPIO_ID_BUTTON4}
112
113// Active low polarity for buttons
114#define BOARD_BUTTON_ACTIVE_LOW true
115
116// The board supports DCDC (#define BOARD_SUPPORT_DCDC)
117// Since SDK v1.2 (bootloader > v7) this option has been move to
118// board/<board_name>/config.mk. Set board_hw_dcdc to yes to enable DCDC.
119#ifdef BOARD_SUPPORT_DCDC
120#error This option has been moved to board/<board_name>/config.mk
121#endif
122
123// FEM control
124#define BOARD_FEM_MODE_PIN 17 // P0.17
125#define BOARD_FEM_RXEN_PIN 19 // P0.19
126#define BOARD_FEM_ANTSEL_PIN 20 // P0.20
127#define BOARD_FEM_CS_PIN 21 // P0.21
128#define BOARD_FEM_TXEN_PIN 22 // P0.22
129#define BOARD_FEM_PDN_PIN 23 // P0.23
130
131// FEM SPI (not used for anything)
132#define BOARD_FEM_SPI_MOSI_PIN 45 // P1.13
133#define BOARD_FEM_SPI_MISO_PIN 46 // P1.14
134#define BOARD_FEM_SPI_CLK_PIN 47 // P1.15
135
136// Initialize FEM
137void Fem_init(void);
138
139
140#endif /* BOARD_PCA10112_BOARD_H_ */
void Fem_init(void)