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) 2017 Inria
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
19
#ifndef BOARD_H
20
#define BOARD_H
21
22
#include <stdint.h>
23
24
#include "cpu.h"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
#define LED0_PIN GPIO_PIN(PORT_A, 5)
35
#define LED0_MASK (1 << 5)
36
37
#define LED0_ON (GPIOA->BSRR = LED0_MASK)
38
#define LED0_OFF (GPIOA->BSRR = (LED0_MASK << 16))
39
#define LED0_TOGGLE (GPIOA->ODR ^= LED0_MASK)
40
41
#define LED1_PIN GPIO_PIN(PORT_B, 14)
42
#define LED1_MASK (1 << 14)
43
44
#define LED1_ON (GPIOB->BSRR = LED1_MASK)
45
#define LED1_OFF (GPIOB->BSRR = (LED1_MASK << 16))
46
#define LED1_TOGGLE (GPIOB->ODR ^= LED1_MASK)
47
52
#define BTN_B1_PIN GPIO_PIN(PORT_C, 13)
53
58
#define HTS221_PARAM_I2C I2C_DEV(1)
59
65
#define LIS3MDL_PARAM_I2C I2C_DEV(1)
66
72
#define LPSXXX_PARAM_I2C I2C_DEV(1)
73
79
#define LSM6DSL_PARAM_I2C I2C_DEV(1)
80
#define LSM6DSL_PARAM_ADDR (0x6A)
81
86
void
board_init
(
void
);
87
88
#ifdef __cplusplus
89
}
90
#endif
91
92
#endif
/* BOARD_H */
93
board_init
void board_init(void)
Board level initialization.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17