Wirepas SDK
board.h File Reference

Detailed Description

Board definition for a board composed of a

Definition in file board.h.

Go to the source code of this file.

Macros

#define BOARD_USART_FORCE_BAUDRATE   115200
 
#define BOARD_SPI   USART0
 
#define BOARD_SPIROUTE   GPIO->USARTROUTE[0]
 
#define BOARD_SPI_MOSI_PORT   GPIO_PORTC
 
#define BOARD_SPI_MISO_PORT   GPIO_PORTC
 
#define BOARD_SPI_SCKL_PORT   GPIO_PORTC
 
#define BOARD_SPI_MOSI_PIN   3
 
#define BOARD_SPI_MISO_PIN   2
 
#define BOARD_SPI_SCKL_PIN   1
 
#define USE_I2C1
 
#define BOARD_I2C_GPIO_PORT   GPIOC
 
#define BOARD_I2C_SDA_PIN   4
 
#define BOARD_I2C_SCL_PIN   5
 
#define BOARD_I2C_ROUTELOC_SDALOC   I2C_ROUTELOC0_SDALOC_LOC17
 
#define BOARD_I2C_ROUTELOC_SCLLOC   I2C_ROUTELOC0_SCLLOC_LOC17
 
#define BOARD_USART_ID   0
 
#define BOARD_USART_TX_PORT   GPIO_PORTA
 
#define BOARD_USART_TX_PIN   5
 
#define BOARD_USART_RX_PORT   GPIO_PORTA
 
#define BOARD_USART_RX_PIN   6
 
#define BOARD_GPIO_PIN_LIST
 
#define BOARD_GPIO_ID_LED_RED   0
 
#define BOARD_GPIO_ID_LED_GREEN   1
 
#define BOARD_GPIO_ID_LED_BLUE   2
 
#define BOARD_GPIO_ID_BUTTON0   3
 
#define BOARD_GPIO_ID_BUTTON1   4
 
#define BOARD_SPI_CS_IMU   5
 
#define BOARD_GPIO_ID_USART_WAKEUP   6
 
#define BOARD_SPI_FLASH_CS   7
 
#define BOARD_I2C_MICS_ENABLE   8
 
#define BOARD_I2C_WSE   9
 
#define BOARD_SENSOR_ENABLE   10
 
#define BOARD_ADC_VREF_ENABLE   11
 
#define BOARD_LED_ID_LIST   {BOARD_GPIO_ID_LED_RED, BOARD_GPIO_ID_LED_GREEN, BOARD_GPIO_ID_LED_BLUE}
 
#define BOARD_LED_ACTIVE_LOW   false
 
#define BOARD_BUTTON_ID_LIST   {BOARD_GPIO_ID_BUTTON0, BOARD_GPIO_ID_BUTTON1}
 
#define BOARD_BUTTON_ACTIVE_LOW   true
 
#define BOARD_BUTTON_INTERNAL_PULL   false
 

Macro Definition Documentation

◆ BOARD_ADC_VREF_ENABLE

#define BOARD_ADC_VREF_ENABLE   11

Definition at line 84 of file board.h.

◆ BOARD_BUTTON_ACTIVE_LOW

#define BOARD_BUTTON_ACTIVE_LOW   true

Definition at line 96 of file board.h.

◆ BOARD_BUTTON_ID_LIST

#define BOARD_BUTTON_ID_LIST   {BOARD_GPIO_ID_BUTTON0, BOARD_GPIO_ID_BUTTON1}

Definition at line 93 of file board.h.

◆ BOARD_BUTTON_INTERNAL_PULL

#define BOARD_BUTTON_INTERNAL_PULL   false

Definition at line 99 of file board.h.

◆ BOARD_GPIO_ID_BUTTON0

#define BOARD_GPIO_ID_BUTTON0   3

Definition at line 70 of file board.h.

◆ BOARD_GPIO_ID_BUTTON1

#define BOARD_GPIO_ID_BUTTON1   4

Definition at line 71 of file board.h.

◆ BOARD_GPIO_ID_LED_BLUE

#define BOARD_GPIO_ID_LED_BLUE   2

Definition at line 68 of file board.h.

◆ BOARD_GPIO_ID_LED_GREEN

#define BOARD_GPIO_ID_LED_GREEN   1

Definition at line 67 of file board.h.

◆ BOARD_GPIO_ID_LED_RED

#define BOARD_GPIO_ID_LED_RED   0

Definition at line 66 of file board.h.

◆ BOARD_GPIO_ID_USART_WAKEUP

#define BOARD_GPIO_ID_USART_WAKEUP   6

Definition at line 74 of file board.h.

◆ BOARD_GPIO_PIN_LIST

#define BOARD_GPIO_PIN_LIST
Value:
{{GPIO_PORTD, 2}, /* PD02 Red LED */ \
{GPIO_PORTA, 3}, /* PA04 Green LED */ \
{GPIO_PORTB, 0}, /* PB00 BLue LED */\
{GPIO_PORTB, 2}, /* PB01 Button0 */\
{GPIO_PORTB, 3}, /* PB01 Button1 */ \
{GPIO_PORTA, 7}, /* PA07. IMU CS, needs SENSOR_ENABLE to be set true to work */\
{GPIO_PORTA, 6}, /* PA06 USART wake-up */\
{GPIO_PORTC, 0}, /* PD04. SPI_FLASH_CS */ \
{GPIO_PORTC, 8}, /* PC08. I2C_MICS_ENABLE */ \
{GPIO_PORTD, 5}, /* PD05. I2C_WSE */ \
{GPIO_PORTC, 9}, /* PC09. SENSOR_ENABLE */ \
{GPIO_PORTA, 0}} /* PA00. ADC_VREF_ENABLE */ \

Definition at line 49 of file board.h.

◆ BOARD_I2C_GPIO_PORT

#define BOARD_I2C_GPIO_PORT   GPIOC

Definition at line 33 of file board.h.

◆ BOARD_I2C_MICS_ENABLE

#define BOARD_I2C_MICS_ENABLE   8

Definition at line 77 of file board.h.

◆ BOARD_I2C_ROUTELOC_SCLLOC

#define BOARD_I2C_ROUTELOC_SCLLOC   I2C_ROUTELOC0_SCLLOC_LOC17

Definition at line 37 of file board.h.

◆ BOARD_I2C_ROUTELOC_SDALOC

#define BOARD_I2C_ROUTELOC_SDALOC   I2C_ROUTELOC0_SDALOC_LOC17

Definition at line 36 of file board.h.

◆ BOARD_I2C_SCL_PIN

#define BOARD_I2C_SCL_PIN   5

Definition at line 35 of file board.h.

◆ BOARD_I2C_SDA_PIN

#define BOARD_I2C_SDA_PIN   4

Definition at line 34 of file board.h.

◆ BOARD_I2C_WSE

#define BOARD_I2C_WSE   9

Definition at line 78 of file board.h.

◆ BOARD_LED_ACTIVE_LOW

#define BOARD_LED_ACTIVE_LOW   false

Definition at line 90 of file board.h.

◆ BOARD_LED_ID_LIST

Definition at line 87 of file board.h.

◆ BOARD_SENSOR_ENABLE

#define BOARD_SENSOR_ENABLE   10

Definition at line 80 of file board.h.

◆ BOARD_SPI

#define BOARD_SPI   USART0

Definition at line 21 of file board.h.

◆ BOARD_SPI_CS_IMU

#define BOARD_SPI_CS_IMU   5

Definition at line 73 of file board.h.

◆ BOARD_SPI_FLASH_CS

#define BOARD_SPI_FLASH_CS   7

Definition at line 75 of file board.h.

◆ BOARD_SPI_MISO_PIN

#define BOARD_SPI_MISO_PIN   2

Definition at line 27 of file board.h.

◆ BOARD_SPI_MISO_PORT

#define BOARD_SPI_MISO_PORT   GPIO_PORTC

Definition at line 24 of file board.h.

◆ BOARD_SPI_MOSI_PIN

#define BOARD_SPI_MOSI_PIN   3

Definition at line 26 of file board.h.

◆ BOARD_SPI_MOSI_PORT

#define BOARD_SPI_MOSI_PORT   GPIO_PORTC

Definition at line 23 of file board.h.

◆ BOARD_SPI_SCKL_PIN

#define BOARD_SPI_SCKL_PIN   1

Definition at line 28 of file board.h.

◆ BOARD_SPI_SCKL_PORT

#define BOARD_SPI_SCKL_PORT   GPIO_PORTC

Definition at line 25 of file board.h.

◆ BOARD_SPIROUTE

#define BOARD_SPIROUTE   GPIO->USARTROUTE[0]

Definition at line 22 of file board.h.

◆ BOARD_USART_FORCE_BAUDRATE

#define BOARD_USART_FORCE_BAUDRATE   115200

Definition at line 19 of file board.h.

◆ BOARD_USART_ID

#define BOARD_USART_ID   0

Definition at line 42 of file board.h.

◆ BOARD_USART_RX_PIN

#define BOARD_USART_RX_PIN   6

Definition at line 46 of file board.h.

◆ BOARD_USART_RX_PORT

#define BOARD_USART_RX_PORT   GPIO_PORTA

Definition at line 45 of file board.h.

◆ BOARD_USART_TX_PIN

#define BOARD_USART_TX_PIN   5

Definition at line 44 of file board.h.

◆ BOARD_USART_TX_PORT

#define BOARD_USART_TX_PORT   GPIO_PORTA

Definition at line 43 of file board.h.

◆ USE_I2C1

#define USE_I2C1

Definition at line 32 of file board.h.