Wirepas SDK
board.h
Go to the documentation of this file.
1/* Copyright 2018 Wirepas Ltd. All Rights Reserved.
2 *
3 * See file LICENSE.txt for full license details.
4 *
5 */
6
14#ifndef BOARD_SILABSEFR32KIT_BOARD_H_
15#define BOARD_SILABSEFR32KIT_BOARD_H_
16
17// NOTE! The VCOM on the kit board supports ONLY the standart baud rates
18// e.g. 125000 is not working.
19
20// Serial port
21#define BOARD_USART_ID 0
22#define BOARD_USART_TX_PORT GPIOA
23#define BOARD_USART_TX_PIN 0
24#define BOARD_USART_RX_PORT GPIOA
25#define BOARD_USART_RX_PIN 1
26
27// ROUTELOC are dependent on GPIO defined above and mapping
28// can be founded chip datasheet from Silabs
29#define BOARD_USART_ROUTELOC_RXLOC USART_ROUTELOC0_RXLOC_LOC0
30#define BOARD_USART_ROUTELOC_TXLOC USART_ROUTELOC0_TXLOC_LOC0
31
32// For further information about Silicon Labs Kit board pin configuration see:
33// UG265: EFR32FG12 2400/868 MHz 10 dBm Wireless Starter Kit User's Guide
34
35// List of GPIO pins
36#define BOARD_GPIO_PIN_LIST {{GPIOF, 4}, /* PF04 */\
37 {GPIOF, 5}, /* PF05 */\
38 {GPIOF, 6}, /* PF06 */\
39 {GPIOF, 7}, /* PF07 */\
40 {GPIOA, 1}, /* PA01. required by the dual_mcu app. usart wakeup pin (= BOARD_USART_RX) */\
41 {GPIOD, 8}, /* PD08. required by the dual_mcu app (indication signal) */\
42 {GPIOA, 5}} /* PA05. usart vcom pin */
43
44// User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table)
45#define BOARD_GPIO_ID_LED0 0 // mapped to pin PF04
46#define BOARD_GPIO_ID_LED1 1 // mapped to pin PF05
47#define BOARD_GPIO_ID_BUTTON0 2 // mapped to pin PF06
48#define BOARD_GPIO_ID_BUTTON1 3 // mapped to pin PF07
49#define BOARD_GPIO_ID_USART_WAKEUP 4 // mapped to pin PA01
50#define BOARD_GPIO_ID_UART_IRQ 5 // mapped to pin PD08
51#define BOARD_GPIO_ID_VCOM_ENABLE 6 // mapped to pin PA05
52
53// List of LED IDs
54#define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED0, BOARD_GPIO_ID_LED1}
55
56// Active high polarity for LEDs
57#define BOARD_LED_ACTIVE_LOW false
58
59// List of button IDs
60#define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON0, BOARD_GPIO_ID_BUTTON1}
61
62// Active low polarity for buttons
63#define BOARD_BUTTON_ACTIVE_LOW true
64
65// Board has external pull-up for buttons
66#define BOARD_BUTTON_INTERNAL_PULL false
67
68
69#endif /* BOARD_SILABSEFR32KIT_BOARD_H_ */