All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
board.h File Reference

Board specific configuration for the Adafruit Clue board. More...

Detailed Description

Board specific configuration for the Adafruit Clue board.

Author
Alexandre Abadie alexa.nosp@m.ndre.nosp@m..abad.nosp@m.ie@i.nosp@m.nria..nosp@m.fr

Definition in file board.h.

#include "cpu.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.

LEDs pin configuration

#define LED0_PIN   GPIO_PIN(1, 1)
 LED0 pin.
 
#define LED0_MASK   (1 << 1)
 LED0 mask.
 
#define LED0_ON   (NRF_P1->OUTSET = LED0_MASK)
 Turn LED0 on.
 
#define LED0_OFF   (NRF_P1->OUTCLR = LED0_MASK)
 Turn LED0 off.
 
#define LED0_TOGGLE   (NRF_P1->OUT ^= LED0_MASK)
 Toggle LED0.
 

Buttons pin configuration

#define BTN0_PIN   GPIO_PIN(1, 2)
 Button A pin.
 
#define BTN0_MODE   GPIO_IN_PU
 Button A mode.
 
#define BTN1_PIN   GPIO_PIN(1, 10)
 Button B pin.
 
#define BTN1_MODE   GPIO_IN_PU
 Button B mode.
 

APDS9960 sensor configuration

#define APDS99XX_PARAM_DEV   I2C_DEV(1)
 I2C device.
 
#define APDS99XX_PARAM_INT_PIN   GPIO_PIN(0, 9)
 Interrupt pin.
 

BMP280 sensor configuration

#define BMX280_PARAM_I2C_DEV   I2C_DEV(1)
 I2C device.
 

LIS3MDL 3-axis magnetometer

#define LIS3MDL_PARAM_I2C   I2C_DEV(1)
 I2C device.
 
#define LIS3MDL_PARAM_ADDR   (0x1C)
 I2C address.
 

STH31 temperature and humidity sensor

#define SHT3X_PARAM_I2C_DEV   I2C_DEV(1)
 I2C device.
 
#define SHT3X_PARAM_I2C_ADDR   (SHT3X_I2C_ADDR_1)
 I2C address.
 

Speaker pin

#define SPKR_PIN   GPIO_PIN(1, 0)
 Speaker pin.
 

Backlight control defines, default uses LCD_BACKLIGHT_LOW values

#define BACKLIGHT_PIN   GPIO_PIN(1, 5)
 Backlight pin.
 
#define BACKLIGHT_MASK   (1 << 5)
 Backlight pin mask.
 
#define BACKLIGHT_ON   (NRF_P1->OUTSET = BACKLIGHT_MASK)
 Turn backlight on.
 
#define BACKLIGHT_OFF   (NRF_P1->OUTCLR = BACKLIGHT_MASK)
 Turn backlight off.
 

Display configuration

#define ILI9341_PARAM_SPI   SPI_DEV(1)
 SPI device.
 
#define ILI9341_PARAM_CS   GPIO_PIN(0, 12)
 Chip select pin.
 
#define ILI9341_PARAM_DCX   GPIO_PIN(0, 13)
 DCX pin.
 
#define ILI9341_PARAM_RST   GPIO_PIN(1, 3)
 Reset pin.
 
#define ILI9341_PARAM_NUM_LINES   (240U)
 Number of screen lines.
 
#define ILI9341_PARAM_RGB   (1)
 RGB configuration.
 
#define ILI9341_PARAM_INVERTED   (1)
 Inversion configuration.
 
#define ILI9341_PARAM_ROTATION   (ILI9341_ROTATION_VERT)
 Rotation mode.
 
#define ILI9341_PARAM_OFFSET_X   (80)
 Vertical rotation requires a 80 pixel offset.
 

Macro Definition Documentation

◆ APDS99XX_PARAM_DEV

#define APDS99XX_PARAM_DEV   I2C_DEV(1)

I2C device.

Definition at line 55 of file board.h.

◆ APDS99XX_PARAM_INT_PIN

#define APDS99XX_PARAM_INT_PIN   GPIO_PIN(0, 9)

Interrupt pin.

Definition at line 56 of file board.h.

◆ BACKLIGHT_MASK

#define BACKLIGHT_MASK   (1 << 5)

Backlight pin mask.

Definition at line 94 of file board.h.

◆ BACKLIGHT_OFF

#define BACKLIGHT_OFF   (NRF_P1->OUTCLR = BACKLIGHT_MASK)

Turn backlight off.

Definition at line 96 of file board.h.

◆ BACKLIGHT_ON

#define BACKLIGHT_ON   (NRF_P1->OUTSET = BACKLIGHT_MASK)

Turn backlight on.

Definition at line 95 of file board.h.

◆ BACKLIGHT_PIN

#define BACKLIGHT_PIN   GPIO_PIN(1, 5)

Backlight pin.

Definition at line 93 of file board.h.

◆ BMX280_PARAM_I2C_DEV

#define BMX280_PARAM_I2C_DEV   I2C_DEV(1)

I2C device.

Definition at line 63 of file board.h.

◆ BTN0_MODE

#define BTN0_MODE   GPIO_IN_PU

Button A mode.

Definition at line 45 of file board.h.

◆ BTN0_PIN

#define BTN0_PIN   GPIO_PIN(1, 2)

Button A pin.

Definition at line 44 of file board.h.

◆ BTN1_MODE

#define BTN1_MODE   GPIO_IN_PU

Button B mode.

Definition at line 48 of file board.h.

◆ BTN1_PIN

#define BTN1_PIN   GPIO_PIN(1, 10)

Button B pin.

Definition at line 47 of file board.h.

◆ ILI9341_PARAM_CS

#define ILI9341_PARAM_CS   GPIO_PIN(0, 12)

Chip select pin.

Definition at line 104 of file board.h.

◆ ILI9341_PARAM_DCX

#define ILI9341_PARAM_DCX   GPIO_PIN(0, 13)

DCX pin.

Definition at line 105 of file board.h.

◆ ILI9341_PARAM_INVERTED

#define ILI9341_PARAM_INVERTED   (1)

Inversion configuration.

Definition at line 109 of file board.h.

◆ ILI9341_PARAM_NUM_LINES

#define ILI9341_PARAM_NUM_LINES   (240U)

Number of screen lines.

Definition at line 107 of file board.h.

◆ ILI9341_PARAM_OFFSET_X

#define ILI9341_PARAM_OFFSET_X   (80)

Vertical rotation requires a 80 pixel offset.

Definition at line 111 of file board.h.

◆ ILI9341_PARAM_RGB

#define ILI9341_PARAM_RGB   (1)

RGB configuration.

Definition at line 108 of file board.h.

◆ ILI9341_PARAM_ROTATION

#define ILI9341_PARAM_ROTATION   (ILI9341_ROTATION_VERT)

Rotation mode.

Definition at line 110 of file board.h.

◆ ILI9341_PARAM_RST

#define ILI9341_PARAM_RST   GPIO_PIN(1, 3)

Reset pin.

Definition at line 106 of file board.h.

◆ ILI9341_PARAM_SPI

#define ILI9341_PARAM_SPI   SPI_DEV(1)

SPI device.

Definition at line 103 of file board.h.

◆ LED0_MASK

#define LED0_MASK   (1 << 1)

LED0 mask.

Definition at line 34 of file board.h.

◆ LED0_OFF

#define LED0_OFF   (NRF_P1->OUTCLR = LED0_MASK)

Turn LED0 off.

Definition at line 36 of file board.h.

◆ LED0_ON

#define LED0_ON   (NRF_P1->OUTSET = LED0_MASK)

Turn LED0 on.

Definition at line 35 of file board.h.

◆ LED0_PIN

#define LED0_PIN   GPIO_PIN(1, 1)

LED0 pin.

Definition at line 33 of file board.h.

◆ LED0_TOGGLE

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

Toggle LED0.

Definition at line 37 of file board.h.

◆ LIS3MDL_PARAM_ADDR

#define LIS3MDL_PARAM_ADDR   (0x1C)

I2C address.

Definition at line 71 of file board.h.

◆ LIS3MDL_PARAM_I2C

#define LIS3MDL_PARAM_I2C   I2C_DEV(1)

I2C device.

Definition at line 70 of file board.h.

◆ SHT3X_PARAM_I2C_ADDR

#define SHT3X_PARAM_I2C_ADDR   (SHT3X_I2C_ADDR_1)

I2C address.

Definition at line 79 of file board.h.

◆ SHT3X_PARAM_I2C_DEV

#define SHT3X_PARAM_I2C_DEV   I2C_DEV(1)

I2C device.

Definition at line 78 of file board.h.

◆ SPKR_PIN

#define SPKR_PIN   GPIO_PIN(1, 0)

Speaker pin.

Definition at line 86 of file board.h.