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.

Functions

void board_init (void)
 Initialize board specific hardware.
 

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)