board.h File Reference

Board specific definitions for the fox board. More...

Detailed Description

#include <stdint.h>
#include "cpu.h"
#include "periph_conf.h"
+ Include dependency graph for board.h:

Go to the source code of this file.

Functions

void board_init (void)
 Initialize board specific hardware, including clock, LEDs and std-IO.
 

Xtimer configuration

Tell the xtimer that we use a 16-bit peripheral timer

#define XTIMER_WIDTH   (16)
 

Define the interface to the AT86RF231 radio

{spi bus, spi speed, cs pin, int pin, reset pin, sleep pin}

#define AT86RF2XX_PARAM_CS   GPIO_PIN(PORT_A, 1)
 
#define AT86RF2XX_PARAM_INT   GPIO_PIN(PORT_C, 2)
 
#define AT86RF2XX_PARAM_SLEEP   GPIO_PIN(PORT_A, 0)
 
#define AT86RF2XX_PARAM_RESET   GPIO_PIN(PORT_C, 1)
 

Define the interface to the LPS331AP pressure sensor

#define LPSXXX_PARAM_ADDR   (0x5C)
 

Define the interface for the L3G4200D gyroscope

#define L3G4200D_PARAM_INT2   GPIO_PIN(PORT_B, 8)
 
#define L3G4200D_PARAM_INT1   GPIO_PIN(PORT_B, 11)
 

Define the interface to the LSM303DLHC accelerometer and magnetometer

#define LSM303DLHC_PARAM_ACC_ADDR   (0x25)
 
#define LSM303DLHC_PARAM_MAG_ADDR   (0x30)
 
#define LSM303DLHC_PARAM_ACC_PIN   GPIO_PIN(PORT_B, 9)
 
#define LSM303DLHC_PARAM_MAG_PIN   GPIO_PIN(PORT_A, 9)
 

LED pin definitions and handlers

#define LED0_PIN   GPIO_PIN(PORT_B, 10)
 
#define LED1_PIN   GPIO_PIN(PORT_B, 12)
 
#define LED0_MASK   (1 << 10)
 
#define LED1_MASK   (1 << 12)
 
#define LED0_ON   (GPIOB->ODR &= ~LED0_MASK)
 
#define LED0_OFF   (GPIOB->ODR |= LED0_MASK)
 
#define LED0_TOGGLE   (GPIOB->ODR ^= LED0_MASK)
 
#define LED1_ON   (GPIOB->ODR &= ~LED1_MASK)
 
#define LED1_OFF   (GPIOB->ODR |= LED1_MASK)
 
#define LED1_TOGGLE   (GPIOB->ODR ^= LED1_MASK)