Wirepas SDK
board.h
Go to the documentation of this file.
1/* Copyright 2017 Wirepas Ltd. All Rights Reserved.
2 *
3 * See file LICENSE.txt for full license details.
4 *
5 */
6
13#ifndef BOARD_PCA10040_BOARD_H_
14#define BOARD_PCA10040_BOARD_H_
15
16// Serial port pins
17#define BOARD_USART_TX_PIN 6
18#define BOARD_USART_RX_PIN 8
19#define BOARD_USART_CTS_PIN 7 /* For USE_USART_HW_FLOW_CONTROL */
20#define BOARD_USART_RTS_PIN 5 /* For USE_USART_HW_FLOW_CONTROL */
21
22// List of GPIO pins
23#define BOARD_GPIO_PIN_LIST {17, /* P0.17 */\
24 18, /* P0.18 */\
25 19, /* P0.19 */\
26 20, /* P0.20 */\
27 13, /* P0.13 */\
28 14, /* P0.14 */\
29 15, /* P0.15 */\
30 16, /* P0.16 */\
31 8, /* P0.08. required by the dual_mcu app. usart wakeup pin (= BOARD_USART_RX) */\
32 11} /* P0.11. required by the dual_mcu app (indication signal) */
33
34// User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table)
35#define BOARD_GPIO_ID_LED0 0 // mapped to pin P0.17
36#define BOARD_GPIO_ID_LED1 1 // mapped to pin P0.18
37#define BOARD_GPIO_ID_LED2 2 // mapped to pin P0.19
38#define BOARD_GPIO_ID_LED3 3 // mapped to pin P0.20
39#define BOARD_GPIO_ID_BUTTON0 4 // mapped to pin P0.13
40#define BOARD_GPIO_ID_BUTTON1 5 // mapped to pin P0.14
41#define BOARD_GPIO_ID_BUTTON2 6 // mapped to pin P0.15
42#define BOARD_GPIO_ID_BUTTON3 7 // mapped to pin P0.16
43#define BOARD_GPIO_ID_USART_WAKEUP 8 // mapped to pin P0.08
44#define BOARD_GPIO_ID_UART_IRQ 9 // mapped to pin P0.11
45
46// List of LED IDs
47#define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED0, BOARD_GPIO_ID_LED1, BOARD_GPIO_ID_LED2, BOARD_GPIO_ID_LED3}
48
49// Active low polarity for LEDs
50#define BOARD_LED_ACTIVE_LOW true
51
52// List of button IDs
53#define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON0, BOARD_GPIO_ID_BUTTON1, BOARD_GPIO_ID_BUTTON2, BOARD_GPIO_ID_BUTTON3}
54
55// Active low polarity for buttons
56#define BOARD_BUTTON_ACTIVE_LOW true
57
58// Active internal pull-up for buttons
59#define BOARD_BUTTON_INTERNAL_PULL true
60
61// The board supports DCDC (#define BOARD_SUPPORT_DCDC)
62// Since SDK v1.2 (bootloader > v7) this option has been move to
63// board/<board_name>/config.mk. Set board_hw_dcdc to yes to enable DCDC.
64#ifdef BOARD_SUPPORT_DCDC
65#error This option has been moved to board/<board_name>/config.mk
66#endif
67
68
69#endif /* BOARD_PCA10040_BOARD_H_ */