Wirepas SDK
board.h
Go to the documentation of this file.
1 /* Copyright 2020 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 
14 #ifndef BOARD_SILABS_BRD4180B_BOARD_H_
15 #define BOARD_SILABS_BRD4180B_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_PORTD, 2}, /* PD02 */\
26  {GPIO_PORTD, 3}, /* PD03 */\
27  {GPIO_PORTB, 0}, /* PB00 */\
28  {GPIO_PORTB, 1}, /* PB01 */\
29  {GPIO_PORTA, 6}, /* PA06. required by the dual_mcu app. usart wakeup pin (= BOARD_USART_RX) */\
30  {GPIO_PORTD, 4}} /* PD04. usart vcom pin */
31 
32 // User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table)
33 #define BOARD_GPIO_ID_LED0 0 // mapped to pin PD02
34 #define BOARD_GPIO_ID_LED1 1 // mapped to pin PD03
35 #define BOARD_GPIO_ID_BUTTON0 2 // mapped to pin PB00
36 #define BOARD_GPIO_ID_BUTTON1 3 // mapped to pin PB01
37 #define BOARD_GPIO_ID_USART_WAKEUP 4 // mapped to pin PA06
38 #define BOARD_GPIO_ID_VCOM_ENABLE 5 // mapped to pin PD04
39 
40 // List of LED IDs
41 #define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED0, BOARD_GPIO_ID_LED1}
42 
43 // Active high polarity for LEDs
44 #define BOARD_LED_ACTIVE_LOW false
45 
46 // List of button IDs
47 #define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON0, BOARD_GPIO_ID_BUTTON1}
48 
49 // Active low polarity for buttons
50 #define BOARD_BUTTON_ACTIVE_LOW true
51 
52 // Board has external pull-up for buttons
53 #define BOARD_BUTTON_INTERNAL_PULL false
54 
55 #endif /* BOARD_SILABS_BRD4180B_BOARD_H_ */