board.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016 UC Berkeley
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
20 #include "cpu.h"
21 #include "periph_conf.h"
22 #include "periph_cpu.h"
23 #include "periph/gpio.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #define XTIMER_DEV TIMER_DEV(1)
34 #define XTIMER_CHAN (0)
41 #define AT86RF2XX_PARAM_SPI SPI_DEV(0)
42 #define AT86RF2XX_PARAM_SPI_CLK SPI_CLK_5MHZ
43 #define AT86RF2XX_PARAM_CS GPIO_PIN(PB, 31)
44 #define AT86RF2XX_PARAM_INT GPIO_PIN(PB, 0)
45 #define AT86RF2XX_PARAM_SLEEP GPIO_PIN(PA, 20)
46 #define AT86RF2XX_PARAM_RESET GPIO_PIN(PB, 15)
53 #define LED0_PIN GPIO_PIN(0, 19)
54 
55 #define LED0_PORT PORT->Group[0]
56 #define LED0_MASK (1 << 19)
57 
58 #define LED0_ON (LED0_PORT.OUTCLR.reg = LED0_MASK)
59 #define LED0_OFF (LED0_PORT.OUTSET.reg = LED0_MASK)
60 #define LED0_TOGGLE (LED0_PORT.OUTTGL.reg = LED0_MASK)
67 #define BTN0_PIN GPIO_PIN(0, 18)
68 #define BTN0_MODE GPIO_IN_PU
77 #define FXOS8700_PARAM_I2C I2C_DEV(0)
78 #define FXOS8700_PARAM_ADDR (0x1E)
79 #define FXOS8700_PARAM_RENEW_INTERVAL (1000000ul)
86 #define HDC1000_PARAM_I2C I2C_DEV(0)
87 #define HDC1000_PARAM_ADDR (0x40)
88 #define HDC1000_PARAM_RES HDC1000_14BIT
89 #define HDC1000_PARAM_RENEW_INTERVAL (1000000ul)
96 #define PIR_PARAM_GPIO GPIO_PIN(PA, 6)
97 #define PIR_PARAM_ACTIVE_HIGH (1)
104 #define PULSE_COUNTER_GPIO BTN0_PIN
105 #define PULSE_COUNTER_GPIO_FLANK GPIO_FALLING
114 #define TMP00X_PARAM_I2C I2C_DEV(0)
115 #define TMP00X_PARAM_ADDR (0x44)
116 #define TMP00X_PARAM_RATE TMP00X_CONFIG_CR_AS2
125 #ifdef __cplusplus
126 }
127 #endif
128 
Peripheral MCU configuration for the Zigduino board.
Low-level GPIO peripheral driver interface definitions.