Wirepas SDK
|
Template to be used for EFR32 board definitions
Definition in file board.h.
Go to the source code of this file.
Macros | |
#define | BOARD_USART_ID 0 |
USART ID. More... | |
#define | BOARD_USART_GPIO_PORT GPIOA |
GPIO port used. More... | |
#define | BOARD_USART_ROUTELOC_RXLOC USART_ROUTELOC0_RXLOC_LOC0 |
RX routeloc definition. More... | |
#define | BOARD_USART_ROUTELOC_TXLOC USART_ROUTELOC0_TXLOC_LOC0 |
TX routeloc definition. More... | |
#define | BOARD_USART_TX_PIN 0 |
Transmission pin number. More... | |
#define | BOARD_USART_RX_PIN 1 |
Reception pin number. More... | |
#define | BOARD_UART_INT_PIN 8 |
Interrupt pin for dual mcu app, unread indication. More... | |
#define | BOARD_UART_INT_PORT GPIOD |
#define | BOARD_LED_PIN_LIST {{GPIOF, 4}, {GPIOF, 5}} |
LED definitions. More... | |
#define | BOARD_LED_ACTIVE_LOW false |
LED GPIO polarity. More... | |
#define | BOARD_BUTTON_PIN_LIST {{4, GPIOF, 6}, {6, GPIOF, 7}} |
Button definitions. More... | |
#define | BOARD_BUTTON_ACTIVE_LOW true |
Button GPIO polarity. More... | |
#define | BOARD_BUTTON_INTERNAL_PULL true |
Button GPIO internal pull up/down. More... | |
#define | BOARD_BUTTON_USE_EVEN_INT true |
Button GPIO interrupt even/odd selection. More... | |
#define BOARD_BUTTON_ACTIVE_LOW true |
Button GPIO polarity.
If a button press pulls the GPIO pin low, this setting is true. This is the case for many EFR32 boards, such as the Thunderboard Sense 2 and the BRD4001 Evaluation Board. Otherwise, if a button press pulls the GPIO pin high, this setting should be set to false.
#define BOARD_BUTTON_INTERNAL_PULL true |
Button GPIO internal pull up/down.
Some buttons don't have any pull-up or pull-down resistor installed on the board. They need it to be setup in software. Set BOARD_BUTTON_INTERNAL_PULL to true to enable internal pull-up(down). Pull-up(down) is enabled when BOARD_BUTTON_ACTIVE_LOW is true(false).
#define BOARD_BUTTON_PIN_LIST {{4, GPIOF, 6}, {6, GPIOF, 7}} |
Button definitions.
Any buttons present on the board are defined here. If not defined, a dummy button driver is compiled, so that applications can use the button driver unconditionally.
For Silabs EFR32 family, the list contains GPIO external interrupt numbers, GPIO ports and pins. See BOARD_BUTTON_USE_EVEN_INT below for extra considerations when selecting external interrupt numbers.
#define BOARD_BUTTON_USE_EVEN_INT true |
Button GPIO interrupt even/odd selection.
The EFR32 GPIO block has 16 configurable external interrupt sources. Even and odd numbered interrupt sources are routed to separate interrupt vectors in the processor. If this setting is true, the button interrupts use the even interrupt vector GPIO_EVEN_IRQn, otherwise GPIO_ODD_IRQn.
Not all GPIO pins can be mapped to all even or odd external interrupt sources. Please see the GPIO_EXTIPINSELL and GPIO_EXTIPINSELH register documentation in the EFR32xG12 Wireless Gecko Reference Manual.
The external interrupt source in BOARD_BUTTON_PIN_LIST above should match this definition, otherwise the buttons won't work.
#define BOARD_LED_ACTIVE_LOW false |
#define BOARD_LED_PIN_LIST {{GPIOF, 4}, {GPIOF, 5}} |
LED definitions.
If board contains LEDs, they are defined here. If not defined, a dummy LED driver is compiled, so that applications can use the LED driver unconditionally.
For Silabs EFR32 family, the list contains GPIO port/pin number pairs.
#define BOARD_UART_INT_PIN 8 |
#define BOARD_USART_GPIO_PORT GPIOA |
#define BOARD_USART_ID 0 |
#define BOARD_USART_ROUTELOC_RXLOC USART_ROUTELOC0_RXLOC_LOC0 |
#define BOARD_USART_ROUTELOC_TXLOC USART_ROUTELOC0_TXLOC_LOC0 |