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 OTA keys S.A.
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
20
#ifndef BOARD_H
21
#define BOARD_H
22
23
#include "cpu.h"
24
#include "
periph_conf.h
"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
#define LED0_PIN GPIO_PIN(PORT_J, 13)
35
#define LED1_PIN GPIO_PIN(PORT_J, 5)
36
#define LED2_PIN GPIO_PIN(PORT_A, 12)
37
#define LED3_PIN GPIO_PIN(PORT_D, 4)
38
39
#define LED0_PORT GPIOJ
40
#define LED1_PORT GPIOJ
41
#define LED2_PORT GPIOA
42
#define LED3_PORT GPIOD
43
#define LED0_MASK (1 << 13)
44
#define LED1_MASK (1 << 5)
45
#define LED2_MASK (1 << 12)
46
#define LED3_MASK (1 << 4)
47
48
#define LED0_ON (LED0_PORT->BSRR = LED0_MASK)
49
#define LED0_OFF (LED0_PORT->BSRR = (LED0_MASK << 16))
50
#define LED0_TOGGLE (LED0_PORT->ODR ^= LED0_MASK)
51
52
#define LED1_ON (LED1_PORT->BSRR = LED1_MASK)
53
#define LED1_OFF (LED1_PORT->BSRR = (LED1_MASK << 16))
54
#define LED1_TOGGLE (LED1_PORT->ODR ^= LED1_MASK)
55
56
#define LED2_ON (LED2_PORT->BSRR = LED2_MASK)
57
#define LED2_OFF (LED2_PORT->BSRR = (LED2_MASK << 16))
58
#define LED2_TOGGLE (LED2_PORT->ODR ^= LED2_MASK)
59
60
#define LED3_ON (LED3_PORT->BSRR = LED3_MASK)
61
#define LED3_OFF (LED3_PORT->BSRR = (LED3_MASK << 16))
62
#define LED3_TOGGLE (LED3_PORT->ODR ^= LED3_MASK)
63
69
#define BTN0_PIN GPIO_PIN(PORT_A, 0)
70
#define BTN0_MODE GPIO_IN
71
77
void
board_init
(
void
);
78
79
#ifdef __cplusplus
80
}
81
#endif
82
83
#endif
/* BOARD_H */
84
periph_conf.h
Peripheral MCU configuration for the STM32F769I-DISCO board.
board_init
void board_init(void)
Board level initialization.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17