Wirepas SDK
board.h
Go to the documentation of this file.
1 /* Copyright 2021 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 
14 #ifndef BOARD_SILABS_BRD4312A_BOARD_H_
15 #define BOARD_SILABS_BRD4312A_BOARD_H_
16 
17 // Serial port
18 #define BOARD_USART_ID 0
19 #define BOARD_USART_TX_PORT GPIO_PORTA
20 #define BOARD_USART_TX_PIN 5
21 #define BOARD_USART_RX_PORT GPIO_PORTA
22 #define BOARD_USART_RX_PIN 6
23 
24 // List of GPIO pins
25 #define BOARD_GPIO_PIN_LIST {{GPIO_PORTB, 0}, /* PB00 */\
26  {GPIO_PORTB, 1}, /* PB01 */\
27  {GPIO_PORTA, 6}, /* PA06. required by the dual_mcu app. usart wakeup pin (= BOARD_USART_RX) */\
28  {GPIO_PORTB, 4}} /* PB04. usart vcom pin */
29 
30 // User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table)
31 #define BOARD_GPIO_ID_LED0 0 // mapped to pin PB00
32 #define BOARD_GPIO_ID_BUTTON0 1 // mapped to pin PB01
33 #define BOARD_GPIO_ID_USART_WAKEUP 2 // mapped to pin PA06
34 #define BOARD_GPIO_ID_VCOM_ENABLE 3 // mapped to pin PB04
35 
36 // List of LED IDs
37 #define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED0}
38 
39 // Active high polarity for LEDs
40 #define BOARD_LED_ACTIVE_LOW true
41 
42 // List of button IDs
43 #define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON0}
44 
45 // Active low polarity for buttons
46 #define BOARD_BUTTON_ACTIVE_LOW true
47 
48 // Board has external pull-up for buttons
49 #define BOARD_BUTTON_INTERNAL_PULL false
50 
51 #endif /* BOARD_SILABS_BRD4312A_BOARD_H_ */