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 
13 #ifndef BOARD_SILABSBRD4184A_BOARD_H_
14 #define BOARD_SILABSBRD4184A_BOARD_H_
15 
16 // VCOM port only supports 115200 baudrate
17 // This speed will be used independently of UART_BAUDRATE flag value
18 #define BOARD_USART_FORCE_BAUDRATE 115200
19 
20 // Serial port
21 #define BOARD_USART_ID 0
22 #define BOARD_USART_TX_PORT GPIO_PORTA
23 #define BOARD_USART_TX_PIN 5
24 #define BOARD_USART_RX_PORT GPIO_PORTA
25 #define BOARD_USART_RX_PIN 6
26 
27 // List of GPIO pins
28 #define BOARD_GPIO_PIN_LIST {{GPIO_PORTB, 0}, /* PB00 */\
29  {GPIO_PORTB, 1}, /* PB01 */\
30  {GPIO_PORTA, 6}, /* PA06. required by the dual_mcu app. usart wakeup pin (= BOARD_USART_RX) */\
31  {GPIO_PORTC, 3}} /* PC03 SPI CS */
32 
33 // User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table)
34 #define BOARD_GPIO_ID_LED0 0 // mapped to pin PB00
35 #define BOARD_GPIO_ID_BUTTON0 1 // mapped to pin PB01
36 #define BOARD_GPIO_ID_USART_WAKEUP 2 // mapped to pin PA06
37 #define BOARD_GPIO_ID_SPI_CS 3 // mapped to pin PC03
38 
39 // List of LED IDs
40 #define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED0}
41 
42 // Active high polarity for LEDs
43 #define BOARD_LED_ACTIVE_LOW false
44 
45 // List of button IDs
46 #define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON0}
47 
48 // Active low polarity for buttons
49 #define BOARD_BUTTON_ACTIVE_LOW true
50 
51 // Board has external pull-up for buttons
52 #define BOARD_BUTTON_INTERNAL_PULL false
53 
54 
55 #endif /* BOARD_SILABSBRD4184A_BOARD_H_ */