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) 2020 Scallog
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 "cpu.h"
23
#include "
periph_conf.h
"
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
33
#define XTIMER_WIDTH (16)
34
#define XTIMER_BACKOFF (19)
35
41
#define LED0_PORT GPIOA
42
#define LED0_PIN GPIO_PIN(PORT_A, 1)
43
#define LED0_MASK (1 << 1)
44
45
#define LED1_PORT GPIOA
46
#define LED1_PIN GPIO_PIN(PORT_A, 5)
47
#define LED1_MASK (1 << 5)
48
49
#define LED0_ON (LED0_PORT->BSRR = LED0_MASK)
50
#define LED0_OFF (LED0_PORT->BSRR = (LED0_MASK << 16))
51
#define LED0_TOGGLE (LED0_PORT->ODR ^= LED0_MASK)
52
53
#define LED1_ON (LED1_PORT->BSRR = LED1_MASK)
54
#define LED1_OFF (LED1_PORT->BSRR = (LED1_MASK << 16))
55
#define LED1_TOGGLE (LED1_PORT->ODR ^= LED1_MASK)
56
57
#define LED_PANIC LED0_ON
58
64
#define BTN0_PIN GPIO_PIN(PORT_C, 9)
65
#define BTN0_MODE GPIO_IN
66
71
void
board_init
(
void
);
72
73
#ifdef __cplusplus
74
}
75
#endif
76
77
#endif
/* BOARD_H */
78
periph_conf.h
Peripheral MCU configuration for the OLIMEXINO STM32 board.
board_init
void board_init(void)
Board level initialization.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17