Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
board.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016 UC Berkeley
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
22
#ifndef BOARD_H
23
#define BOARD_H
24
25
#include "cpu.h"
26
#include "
periph_conf.h
"
27
#include "periph_cpu.h"
28
29
#ifdef __cplusplus
30
extern
"C"
{
31
#endif
32
37
#define XTIMER_DEV TIMER_DEV(1)
38
#define XTIMER_CHAN (0)
39
45
#define AT86RF2XX_PARAM_SPI SPI_DEV(0)
46
#define AT86RF2XX_PARAM_SPI_CLK SPI_CLK_5MHZ
47
#define AT86RF2XX_PARAM_CS GPIO_PIN(PB, 31)
48
#define AT86RF2XX_PARAM_INT GPIO_PIN(PB, 0)
49
#define AT86RF2XX_PARAM_SLEEP GPIO_PIN(PA, 20)
50
#define AT86RF2XX_PARAM_RESET GPIO_PIN(PB, 15)
51
57
#define LED0_PIN GPIO_PIN(0, 19)
58
59
#define LED0_PORT PORT->Group[0]
60
#define LED0_MASK (1 << 19)
61
62
#define LED0_ON (LED0_PORT.OUTCLR.reg = LED0_MASK)
63
#define LED0_OFF (LED0_PORT.OUTSET.reg = LED0_MASK)
64
#define LED0_TOGGLE (LED0_PORT.OUTTGL.reg = LED0_MASK)
65
71
#define BTN0_PORT PORT->Group[0]
72
#define BTN0_PIN GPIO_PIN(0, 18)
73
#define BTN0_MODE GPIO_IN_PU
74
82
#define FXOS8700_PARAM_I2C I2C_DEV(0)
83
#define FXOS8700_PARAM_ADDR (0x1E)
84
#define FXOS8700_PARAM_RENEW_INTERVAL (1000000ul)
85
91
#define HDC1000_PARAM_I2C I2C_DEV(0)
92
#define HDC1000_PARAM_ADDR (0x40)
93
#define HDC1000_PARAM_RES HDC1000_14BIT
94
#define HDC1000_PARAM_RENEW_INTERVAL (1000000ul)
95
101
#define PIR_PARAM_GPIO GPIO_PIN(PA, 6)
102
#define PIR_PARAM_ACTIVE_HIGH (1)
103
109
#define PULSE_COUNTER_GPIO BTN0_PIN
110
#define PULSE_COUNTER_GPIO_FLANK GPIO_FALLING
111
119
#define TMP006_PARAM_I2C I2C_DEV(0)
120
#define TMP006_PARAM_ADDR (0x44)
121
#define TMP006_PARAM_RATE TMP006_CONFIG_CR_AS2
122
133
void
board_init
(
void
);
134
135
#ifdef __cplusplus
136
}
137
#endif
138
139
#endif
/* BOARD_H */
140
periph_conf.h
Configuration of CPU peripherals for the Hamilton mote.
board_init
void board_init(void)
Board level initialization.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17