fox/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-2015 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for more
6  * details.
7  */
8 
24 #ifndef BOARD_H
25 #define BOARD_H
26 
27 #include <stdint.h>
28 
29 #include "cpu.h"
30 #include "periph_conf.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
42 #define XTIMER_WIDTH (16)
43 
50 #define AT86RF2XX_PARAMS_BOARD {.spi = SPI_DEV(0), \
51  .spi_clk = SPI_CLK_5MHZ, \
52  .cs_pin = GPIO_PIN(PORT_A, 1), \
53  .int_pin = GPIO_PIN(PORT_C, 2), \
54  .sleep_pin = GPIO_PIN(PORT_A, 0), \
55  .reset_pin = GPIO_PIN(PORT_C, 1)}
56 
61 #define LPS331AP_I2C I2C_0
62 #define LPS331AP_ADDR 0x5c
63 
69 #define L3G4200D_I2C I2C_0
70 #define L3G4200D_ADDR 0x68
71 #define L3G4200D_DRDY GPIO_PIN(PORT_B,8)
72 #define L3G4200D_INT GPIO_PIN(PORT_B,11)
73 
79 #define LSM303DLHC_I2C I2C_0
80 #define LSM303DLHC_ACC_ADDR (25)
81 #define LSM303DLHC_MAG_ADDR (30)
82 #define LSM303DLHC_INT1 GPIO_PIN(PORT_B,9)
83 #define LSM303DLHC_INT2 GPIO_PIN(PORT_B,5)
84 #define LSM303DLHC_DRDY GPIO_PIN(PORT_A,9)
85 
91 #define LED0_PIN GPIO_PIN(PORT_B, 10)
92 #define LED1_PIN GPIO_PIN(PORT_B, 12)
93 
94 #define LED0_MASK (1 << 10)
95 #define LED1_MASK (1 << 12)
96 
97 #define LED0_ON (GPIOB->ODR &= ~LED0_MASK)
98 #define LED0_OFF (GPIOB->ODR |= LED0_MASK)
99 #define LED0_TOGGLE (GPIOB->ODR ^= LED0_MASK)
100 
101 #define LED1_ON (GPIOB->ODR &= ~LED1_MASK)
102 #define LED1_OFF (GPIOB->ODR |= LED1_MASK)
103 #define LED1_TOGGLE (GPIOB->ODR ^= LED1_MASK)
104 
109 void board_init(void);
110 
111 #ifdef __cplusplus
112 }
113 #endif
114 
115 #endif /* BOARD_H */
116 
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.
Peripheral MCU configuration for the fox board.