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// I2C
28#define USE_I2C0
29#define BOARD_I2C_SCL_GPIO_PORT GPIOD
30#define BOARD_I2C_SCL_PIN 3
31#define BOARD_I2C_SDA_GPIO_PORT GPIOD
32#define BOARD_I2C_SDA_PIN 2
33#define BOARD_I2C_PIN_PULLUP false
34
35// List of GPIO pins
36#define BOARD_GPIO_PIN_LIST {{GPIO_PORTB, 0}, /* PB00 */\
37 {GPIO_PORTB, 1}, /* PB01 */\
38 {GPIO_PORTA, 6}, /* PA06. required by the dual_mcu app. usart wakeup pin (= BOARD_USART_RX) */\
39 {GPIO_PORTC, 3}, /* PC03 SPI CS */\
40 {GPIO_PORTA, 4}} /* PA04. EFR32_SENSOR_ENABLE */
41
42// User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table)
43#define BOARD_GPIO_ID_LED0 0 // mapped to pin PB00
44#define BOARD_GPIO_ID_BUTTON0 1 // mapped to pin PB01
45#define BOARD_GPIO_ID_USART_WAKEUP 2 // mapped to pin PA06
46#define BOARD_GPIO_ID_SPI_CS 3 // mapped to pin PC03
47#define BOARD_GPIO_ID_I2C_SENSOR_ENABLE 4 // mapped to pin PA04
48
49// List of LED IDs
50#define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED0}
51
52// Active high polarity for LEDs
53#define BOARD_LED_ACTIVE_LOW false
54
55// List of button IDs
56#define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON0}
57
58// Active low polarity for buttons
59#define BOARD_BUTTON_ACTIVE_LOW true
60
61// Board has external pull-up for buttons
62#define BOARD_BUTTON_INTERNAL_PULL false
63
64
65#endif /* BOARD_SILABSBRD4184A_BOARD_H_ */