Loading...
Searching...
No Matches
board.h File Reference

Board specific configuration for the Waveshare nRF52840 Eval Kit. More...

Detailed Description

Board specific configuration for the Waveshare nRF52840 Eval Kit.

Author
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file board.h.

#include "board_common.h"
+ Include dependency graph for board.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

LED pin configuration

#define LED0_PIN   GPIO_PIN(0, 13)
 
#define LED1_PIN   GPIO_PIN(0, 14)
 
#define LED2_PIN   GPIO_PIN(1, 9)
 
#define LED3_PIN   GPIO_PIN(0, 16)
 
#define LED0_PORT   (NRF_P0)
 
#define LED1_PORT   (NRF_P0)
 
#define LED2_PORT   (NRF_P1)
 
#define LED3_PORT   (NRF_P0)
 
#define LED0_MASK   (1 << 13)
 
#define LED1_MASK   (1 << 14)
 
#define LED2_MASK   (1 << 9)
 
#define LED3_MASK   (1 << 16)
 
#define LED0_ON   (LED0_PORT->OUTCLR = LED0_MASK)
 
#define LED0_OFF   (LED0_PORT->OUTSET = LED0_MASK)
 
#define LED0_TOGGLE   (LED0_PORT->OUT ^= LED0_MASK)
 
#define LED1_ON   (LED1_PORT->OUTCLR = LED1_MASK)
 
#define LED1_OFF   (LED1_PORT->OUTSET = LED1_MASK)
 
#define LED1_TOGGLE   (LED1_PORT->OUT ^= LED1_MASK)
 
#define LED2_ON   (LED2_PORT->OUTCLR = LED2_MASK)
 
#define LED2_OFF   (LED2_PORT->OUTSET = LED2_MASK)
 
#define LED2_TOGGLE   (LED2_PORT->OUT ^= LED2_MASK)
 
#define LED3_ON   (LED3_PORT->OUTCLR = LED3_MASK)
 
#define LED3_OFF   (LED3_PORT->OUTSET = LED3_MASK)
 
#define LED3_TOGGLE   (LED3_PORT->OUT ^= LED3_MASK)
 

Button pin configuration

#define BTN0_PIN   GPIO_PIN(0, 11)
 
#define BTN0_MODE   GPIO_IN_PU
 
#define BTN1_PIN   GPIO_PIN(0, 18)
 
#define BTN1_MODE   GPIO_IN_PU
 

SD Card configuration

#define SDCARD_SPI_PARAM_SPI   SPI_DEV(1)
 
#define SDCARD_SPI_PARAM_CS   GPIO_PIN(0, 12)
 
#define SDCARD_SPI_PARAM_CLK   GPIO_PIN(0, 17)
 
#define SDCARD_SPI_PARAM_MOSI   GPIO_PIN(0, 24)
 
#define SDCARD_SPI_PARAM_MISO   GPIO_PIN(0, 20)
 

MTD configuration

#define MTD_0   mtd_dev_get(0)
 MTD device for the SD Card.
 

Macro Definition Documentation

◆ BTN0_MODE

#define BTN0_MODE   GPIO_IN_PU

Definition at line 69 of file board.h.

◆ BTN0_PIN

#define BTN0_PIN   GPIO_PIN(0, 11)

Definition at line 68 of file board.h.

◆ BTN1_MODE

#define BTN1_MODE   GPIO_IN_PU

Definition at line 71 of file board.h.

◆ BTN1_PIN

#define BTN1_PIN   GPIO_PIN(0, 18)

Definition at line 70 of file board.h.

◆ LED0_MASK

#define LED0_MASK   (1 << 13)

Definition at line 42 of file board.h.

◆ LED0_OFF

#define LED0_OFF   (LED0_PORT->OUTSET = LED0_MASK)

Definition at line 48 of file board.h.

◆ LED0_ON

#define LED0_ON   (LED0_PORT->OUTCLR = LED0_MASK)

Definition at line 47 of file board.h.

◆ LED0_PIN

#define LED0_PIN   GPIO_PIN(0, 13)

Definition at line 32 of file board.h.

◆ LED0_PORT

#define LED0_PORT   (NRF_P0)

Definition at line 37 of file board.h.

◆ LED0_TOGGLE

#define LED0_TOGGLE   (LED0_PORT->OUT ^= LED0_MASK)

Definition at line 49 of file board.h.

◆ LED1_MASK

#define LED1_MASK   (1 << 14)

Definition at line 43 of file board.h.

◆ LED1_OFF

#define LED1_OFF   (LED1_PORT->OUTSET = LED1_MASK)

Definition at line 52 of file board.h.

◆ LED1_ON

#define LED1_ON   (LED1_PORT->OUTCLR = LED1_MASK)

Definition at line 51 of file board.h.

◆ LED1_PIN

#define LED1_PIN   GPIO_PIN(0, 14)

Definition at line 33 of file board.h.

◆ LED1_PORT

#define LED1_PORT   (NRF_P0)

Definition at line 38 of file board.h.

◆ LED1_TOGGLE

#define LED1_TOGGLE   (LED1_PORT->OUT ^= LED1_MASK)

Definition at line 53 of file board.h.

◆ LED2_MASK

#define LED2_MASK   (1 << 9)

Definition at line 44 of file board.h.

◆ LED2_OFF

#define LED2_OFF   (LED2_PORT->OUTSET = LED2_MASK)

Definition at line 56 of file board.h.

◆ LED2_ON

#define LED2_ON   (LED2_PORT->OUTCLR = LED2_MASK)

Definition at line 55 of file board.h.

◆ LED2_PIN

#define LED2_PIN   GPIO_PIN(1, 9)

Definition at line 34 of file board.h.

◆ LED2_PORT

#define LED2_PORT   (NRF_P1)

Definition at line 39 of file board.h.

◆ LED2_TOGGLE

#define LED2_TOGGLE   (LED2_PORT->OUT ^= LED2_MASK)

Definition at line 57 of file board.h.

◆ LED3_MASK

#define LED3_MASK   (1 << 16)

Definition at line 45 of file board.h.

◆ LED3_OFF

#define LED3_OFF   (LED3_PORT->OUTSET = LED3_MASK)

Definition at line 60 of file board.h.

◆ LED3_ON

#define LED3_ON   (LED3_PORT->OUTCLR = LED3_MASK)

Definition at line 59 of file board.h.

◆ LED3_PIN

#define LED3_PIN   GPIO_PIN(0, 16)

Definition at line 35 of file board.h.

◆ LED3_PORT

#define LED3_PORT   (NRF_P0)

Definition at line 40 of file board.h.

◆ LED3_TOGGLE

#define LED3_TOGGLE   (LED3_PORT->OUT ^= LED3_MASK)

Definition at line 61 of file board.h.

◆ MTD_0

#define MTD_0   mtd_dev_get(0)

MTD device for the SD Card.

Definition at line 89 of file board.h.

◆ SDCARD_SPI_PARAM_CLK

#define SDCARD_SPI_PARAM_CLK   GPIO_PIN(0, 17)

Definition at line 80 of file board.h.

◆ SDCARD_SPI_PARAM_CS

#define SDCARD_SPI_PARAM_CS   GPIO_PIN(0, 12)

Definition at line 79 of file board.h.

◆ SDCARD_SPI_PARAM_MISO

#define SDCARD_SPI_PARAM_MISO   GPIO_PIN(0, 20)

Definition at line 82 of file board.h.

◆ SDCARD_SPI_PARAM_MOSI

#define SDCARD_SPI_PARAM_MOSI   GPIO_PIN(0, 24)

Definition at line 81 of file board.h.

◆ SDCARD_SPI_PARAM_SPI

#define SDCARD_SPI_PARAM_SPI   SPI_DEV(1)

Definition at line 78 of file board.h.