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) 2014 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
19
#ifndef BOARD_H
20
#define BOARD_H
21
22
#include "cpu.h"
23
#include "
periph_conf.h
"
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
33
#define CC110X_PARAM_SPI SPI_DEV(0)
34
#define CC110X_PARAM_CS GPIO_PIN(PORT_B, 12)
35
#define CC110X_PARAM_GDO0 GPIO_PIN(PORT_C, 4)
36
#define CC110X_PARAM_GDO2 GPIO_PIN(PORT_C, 5)
37
#define CC110X_PARAM_SPI_CLOCK SPI_CLK_1MHZ
44
#define MPU9150_PARAM_COMP_ADDR (0x0E)
51
#define LED0_PIN GPIO_PIN(PORT_B, 8)
52
#define LED1_PIN GPIO_PIN(PORT_B, 14)
53
#define LED2_PIN GPIO_PIN(PORT_B, 15)
55
#define LED_PORT GPIOB
56
#define LED0_MASK (1 << 8)
57
#define LED1_MASK (1 << 14)
58
#define LED2_MASK (1 << 15)
60
#define LED0_ON (LED_PORT->BSRR = LED0_MASK)
61
#define LED0_OFF (LED_PORT->BSRR = (LED0_MASK << 16))
62
#define LED0_TOGGLE (LED_PORT->ODR ^= LED0_MASK)
64
#define LED1_ON (LED_PORT->BSRR = LED1_MASK)
65
#define LED1_OFF (LED_PORT->BSRR = (LED1_MASK << 16))
66
#define LED1_TOGGLE (LED_PORT->ODR ^= LED1_MASK)
68
#define LED2_ON (LED_PORT->BSRR = LED2_MASK)
69
#define LED2_OFF (LED_PORT->BSRR = (LED2_MASK << 16))
70
#define LED2_TOGGLE (LED_PORT->ODR ^= LED2_MASK)
77
#define BUTTON0_PIN GPIO_PIN(PORT_B, 13)
78
#define BUTTON1_PIN GPIO_PIN(PORT_A, 0)
84
void board_init(void);
85
86
#ifdef __cplusplus
87
}
88
#endif
89
90
#endif
/* BOARD_H */
91
periph_conf.h
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17