Wirepas SDK
|
Template to be used for nRF52 board definitions
Definition in file board.h.
Go to the source code of this file.
#define BOARD_BUTTON_ACTIVE_LOW true |
#define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON0, BOARD_GPIO_ID_BUTTON1, BOARD_GPIO_ID_BUTTON2, BOARD_GPIO_ID_BUTTON3} |
Button definitions.
If board contains buttons, The button IDs list is defined here. The button IDs are mapped to GPIO IDs. If not defined, a dummy button driver is compiled, so that applications can use the button driver unconditionally.
#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_GPIO_ID_LED0 0 |
#define BOARD_GPIO_PIN_LIST |
GPIO definitions.
If board needs GPIOs, they are defined here. If not defined, a dummy GPIO driver is compiled, so that applications can use the GPIO driver unconditionally.
For Nordic nRF52 family, GPIOs are defined as list of GPIO pin numbers
#define BOARD_LED_ACTIVE_LOW true |
LED GPIO polarity.
If LEDs turn on when the GPIO pin is driven low, this setting is true. This is the case for many nRF52 boards, such as the PCA10040 and PCA10056. Otherwise, if a LED is lit when the the GPIO pin is driven high, this setting should be set to false.
#define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED0, BOARD_GPIO_ID_LED1, BOARD_GPIO_ID_LED2, BOARD_GPIO_ID_LED3} |
LED definitions.
If board contains LEDs, The LED IDs list is defined here. The LED IDs are mapped to GPIO IDs. If not defined, a dummy LED driver is compiled, so that applications can use the LED driver unconditionally.
#define BOARD_USART_CTS_PIN 7 |
#define BOARD_USART_RTS_PIN 5 |