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