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

Board specific configuration for the RuuviTag board. More...

Detailed Description

Board specific configuration for the RuuviTag board.

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file board.h.

#include "cpu.h"
+ Include dependency graph for board.h:

Go to the source code of this file.

LED pin configuration

#define LED0_PIN   GPIO_PIN(0, 17)
 
#define LED1_PIN   GPIO_PIN(0, 19)
 
#define CS_PIN_MASK   ((1 << 3) | (1 << 8))
 
#define LED_PORT   NRF_P0
 
#define LED0_MASK   (1 << 17)
 
#define LED1_MASK   (1 << 19)
 
#define LED_MASK   (LED0_MASK | LED1_MASK | CS_PIN_MASK)
 
#define LED0_ON   (LED_PORT->OUTCLR = LED0_MASK)
 
#define LED0_OFF   (LED_PORT->OUTSET = LED0_MASK)
 
#define LED0_TOGGLE   (LED_PORT->OUT ^= LED0_MASK)
 
#define LED1_ON   (LED_PORT->OUTCLR = LED1_MASK)
 
#define LED1_OFF   (LED_PORT->OUTSET = LED1_MASK)
 
#define LED1_TOGGLE   (LED_PORT->OUT ^= LED1_MASK)
 

Button pin configuration

#define BTN0_PIN   GPIO_PIN(0, 13)
 
#define BTN0_MODE   GPIO_IN_PU
 

Environmental sensor configuration (Bosch BMX280)

#define BMX280_PARAM_CS   GPIO_PIN(0, 3)
 

Accelerometer configuration

#define LIS2DH12_PARAM_CS   GPIO_PIN(0, 8)
 
#define LIS2DH12_PARAM_INT_PIN1   GPIO_PIN(0, 2)
 
#define LIS2DH12_PARAM_INT_PIN2   GPIO_PIN(0, 6)
 

Macro Definition Documentation

◆ BMX280_PARAM_CS

#define BMX280_PARAM_CS   GPIO_PIN(0, 3)

Definition at line 69 of file board.h.

◆ BTN0_MODE

#define BTN0_MODE   GPIO_IN_PU

Definition at line 62 of file board.h.

◆ BTN0_PIN

#define BTN0_PIN   GPIO_PIN(0, 13)

Definition at line 61 of file board.h.

◆ CS_PIN_MASK

#define CS_PIN_MASK   ((1 << 3) | (1 << 8))

Definition at line 39 of file board.h.

◆ LED0_MASK

#define LED0_MASK   (1 << 17)

Definition at line 42 of file board.h.

◆ LED0_OFF

#define LED0_OFF   (LED_PORT->OUTSET = LED0_MASK)

Definition at line 49 of file board.h.

◆ LED0_ON

#define LED0_ON   (LED_PORT->OUTCLR = LED0_MASK)

Definition at line 48 of file board.h.

◆ LED0_PIN

#define LED0_PIN   GPIO_PIN(0, 17)

Definition at line 32 of file board.h.

◆ LED0_TOGGLE

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

Definition at line 50 of file board.h.

◆ LED1_MASK

#define LED1_MASK   (1 << 19)

Definition at line 43 of file board.h.

◆ LED1_OFF

#define LED1_OFF   (LED_PORT->OUTSET = LED1_MASK)

Definition at line 53 of file board.h.

◆ LED1_ON

#define LED1_ON   (LED_PORT->OUTCLR = LED1_MASK)

Definition at line 52 of file board.h.

◆ LED1_PIN

#define LED1_PIN   GPIO_PIN(0, 19)

Definition at line 33 of file board.h.

◆ LED1_TOGGLE

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

Definition at line 54 of file board.h.

◆ LED_MASK

#define LED_MASK   (LED0_MASK | LED1_MASK | CS_PIN_MASK)

Definition at line 46 of file board.h.

◆ LED_PORT

#define LED_PORT   NRF_P0

Definition at line 41 of file board.h.

◆ LIS2DH12_PARAM_CS

#define LIS2DH12_PARAM_CS   GPIO_PIN(0, 8)

Definition at line 76 of file board.h.

◆ LIS2DH12_PARAM_INT_PIN1

#define LIS2DH12_PARAM_INT_PIN1   GPIO_PIN(0, 2)

Definition at line 77 of file board.h.

◆ LIS2DH12_PARAM_INT_PIN2

#define LIS2DH12_PARAM_INT_PIN2   GPIO_PIN(0, 6)

Definition at line 78 of file board.h.