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) 2018 Inria
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 LED0_PIN GPIO_PIN(PORT_G, 13)
34
#define LED1_PIN GPIO_PIN(PORT_G, 14)
35
36
#define LED0_MASK (1 << 13)
37
#define LED1_MASK (1 << 14)
38
39
#define LED0_ON (GPIOG->BSRR = LED0_MASK)
40
#define LED0_OFF (GPIOG->BSRR = (LED0_MASK << 16))
41
#define LED0_TOGGLE (GPIOG->ODR ^= LED0_MASK)
42
43
#define LED1_ON (GPIOG->BSRR = LED1_MASK)
44
#define LED1_OFF (GPIOG->BSRR = (LED1_MASK << 16))
45
#define LED1_TOGGLE (GPIOG->ODR ^= LED1_MASK)
46
52
#define BTN0_PIN GPIO_PIN(PORT_A, 0)
53
#define BTN0_MODE GPIO_IN
54
60
void
board_init
(
void
);
61
62
#ifdef __cplusplus
63
}
64
#endif
65
66
#endif
/* BOARD_H */
67
periph_conf.h
board_init
void board_init(void)
Board level initialization.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17