Wirepas SDK
board.h File Reference

Detailed Description

Template to be used for nRF52 board definitions

Definition in file board.h.

Go to the source code of this file.

Macros

#define BOARD_USART_TX_PIN   6
 Transmission pin number. More...
 
#define BOARD_USART_RX_PIN   8
 Reception pin number. More...
 
#define BOARD_USART_CTS_PIN   7
 CTS pin number, for USE_USART_HW_FLOW_CONTROL. More...
 
#define BOARD_USART_RTS_PIN   5
 RTS pin number, for USE_USART_HW_FLOW_CONTROL. More...
 
#define BOARD_UART_IRQ_PIN   11
 Interrupt pin for dual mcu app, unread indication. More...
 
#define BOARD_LED_PIN_LIST   {17, 18, 19, 20}
 LED definitions. More...
 
#define BOARD_LED_ACTIVE_LOW   true
 LED GPIO polarity. More...
 
#define BOARD_BUTTON_PIN_LIST   {13, 14, 15, 16}
 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...
 

Macro Definition Documentation

◆ BOARD_BUTTON_ACTIVE_LOW

#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 nRF52 boards, such as the PCA10040 and PCA10056. Otherwise, if a button press pulls the GPIO pin high, this setting should be set to false.

Definition at line 93 of file board.h.

◆ BOARD_BUTTON_INTERNAL_PULL

#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).

Definition at line 103 of file board.h.

◆ BOARD_BUTTON_PIN_LIST

#define BOARD_BUTTON_PIN_LIST   {13, 14, 15, 16}

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 Nordic nRF52 family, buttons are defined simply by the GPIO numbers.

Note
in order for application to use buttons, see here.

Definition at line 84 of file board.h.

◆ BOARD_LED_ACTIVE_LOW

#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.

Definition at line 70 of file board.h.

◆ BOARD_LED_PIN_LIST

#define BOARD_LED_PIN_LIST   {17, 18, 19, 20}

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 Nordic nRF52 family, LEDs are defined as list of GPIO pin numbers

Note
in order for application to use LEDs, see here.

Definition at line 60 of file board.h.

◆ BOARD_UART_IRQ_PIN

#define BOARD_UART_IRQ_PIN   11

Interrupt pin for dual mcu app, unread indication.

This only used in dualmcu_app application to announce with GPIO pin that there is incoming indication to be read from device.

It is optional definition. If not present, no irq pin is present

Definition at line 46 of file board.h.

◆ BOARD_USART_CTS_PIN

#define BOARD_USART_CTS_PIN   7

CTS pin number, for USE_USART_HW_FLOW_CONTROL.

Definition at line 31 of file board.h.

◆ BOARD_USART_RTS_PIN

#define BOARD_USART_RTS_PIN   5

RTS pin number, for USE_USART_HW_FLOW_CONTROL.

Definition at line 35 of file board.h.

◆ BOARD_USART_RX_PIN

#define BOARD_USART_RX_PIN   8

Reception pin number.

Definition at line 27 of file board.h.

◆ BOARD_USART_TX_PIN

#define BOARD_USART_TX_PIN   6

Transmission pin number.

Note
in order for application to use USART, see here.

Definition at line 23 of file board.h.