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_PCA10153_BOARD_H_
13 #define BOARD_PCA10153_BOARD_H_
14 
15 
16 
17 // NRF_GPIO is mapped to NRF_P0 , for pins P0.00 ... P0.31
18 // With nrf_gpio.h, use SW_pin (logical pins, port-aware)
19 
57 // Serial port pins for UART1
58 #define BOARD_USART_TX_PIN 27
59 #define BOARD_USART_RX_PIN 26
60 #define BOARD_USART_CTS_PIN 15 /* For USE_USART_HW_FLOW_CONTROL */
61 #define BOARD_USART_RTS_PIN 14 /* For USE_USART_HW_FLOW_CONTROL */
62 
63 // List of GPIO pins
64 #define BOARD_GPIO_PIN_LIST {0, /* P0.00 LED-1 */\
65  1, /* P0.01 LED-2 */\
66  4, /* P0.04 LED-3 */\
67  5, /* P0.05 LED-4 */\
68  8, /* P0.08 BUTTON-1 */\
69  9, /* P0.09 BUTTON-2 */\
70  18, /* P0.18 BUTTON-3 */\
71  19, /* P0.19 BUTTON-4 */\
72  26, /* P0.26 required by the dual_mcu app. usart wakeup pin (= BOARD_USART_RX) */\
73  10} /* P0.10 required by the dual_mcu app (indication signal) */
74 
75 // User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table)
76 #define BOARD_GPIO_ID_LED1 0 // mapped to pin P0.00
77 #define BOARD_GPIO_ID_LED2 1 // mapped to pin P0.01
78 #define BOARD_GPIO_ID_LED3 2 // mapped to pin P0.04
79 #define BOARD_GPIO_ID_LED4 3 // mapped to pin P0.05
80 #define BOARD_GPIO_ID_BUTTON1 4 // mapped to pin P0.08
81 #define BOARD_GPIO_ID_BUTTON2 5 // mapped to pin P0.09
82 #define BOARD_GPIO_ID_BUTTON3 6 // mapped to pin P0.18
83 #define BOARD_GPIO_ID_BUTTON4 7 // mapped to pin P0.19
84 #define BOARD_GPIO_ID_USART_WAKEUP 8 // mapped to pin P0.26
85 #define BOARD_GPIO_ID_UART_IRQ 9 // mapped to pin P0.10
86 
87 // List of LED IDs
88 #define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED1, BOARD_GPIO_ID_LED2, BOARD_GPIO_ID_LED3, BOARD_GPIO_ID_LED4}
89 
90 // List of button IDs mapped to GPIO IDs
91 #define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON1, BOARD_GPIO_ID_BUTTON2, BOARD_GPIO_ID_BUTTON3, BOARD_GPIO_ID_BUTTON4}
92 
93 // Active low polarity for LEDs
94 #define BOARD_LED_ACTIVE_LOW false
95 
96 // Active low polarity for buttons
97 #define BOARD_BUTTON_ACTIVE_LOW true
98 
99 // Active internal pull-up for buttons
100 #define BOARD_BUTTON_INTERNAL_PULL true
101 
102 // The board supports DCDC (#define BOARD_SUPPORT_DCDC)
103 // Since SDK v1.2 (bootloader > v7) this option has been moved to
104 // board/<board_name>/config.mk. Set board_hw_dcdc to yes to enable DCDC.
105 #ifdef BOARD_SUPPORT_DCDC
106 #error This option has been moved to board/<board_name>/config.mk
107 #endif
108 
109 // External Flash Memory
110 #define EXT_FLASH_SPI_MOSI 11 // P0.11
111 #define EXT_FLASH_SPI_MISO 12 // P0.12
112 #define EXT_FLASH_SPI_SCK 13 // P0.13
113 #define EXT_FLASH_CS 20 // P0.20
114 #define EXT_FLASH_SPIM_P NRF_SPIM1
115 // Enable external flash memory debugging using LEDs.
116 #define EXT_FLASH_DRIVER_DEBUG_LED
117 
118 #endif /* BOARD_PCA10153_BOARD_H_ */