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) 2019 Benjamin Valentin
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
21
#ifndef BOARD_H
22
#define BOARD_H
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
28
#include "mtd.h"
29
#include "periph_cpu.h"
30
35
#define XTIMER_BACKOFF (8)
36
#define XTIMER_OVERHEAD (6)
37
44
#define INTERNAL_PERIPHERAL_VID (0x0483)
45
#define INTERNAL_PERIPHERAL_PID (0x5740)
46
52
#define LED0_PORT GPIOC
53
#define LED0_PIN GPIO_PIN(PORT_C, 13)
54
#define LED0_MASK (1 << 13)
55
56
#define LED0_ON (LED0_PORT->BSRR = (LED0_MASK << 16))
57
#define LED0_OFF (LED0_PORT->BSRR = (LED0_MASK << 0))
58
#define LED0_TOGGLE (LED0_PORT->ODR ^= LED0_MASK)
59
65
#define BTN0_PIN GPIO_PIN(PORT_A, 0)
66
#define BTN0_MODE GPIO_IN_PU
67
76
#define WEACT_411CE_NOR_PAGE_SIZE (256)
77
#define WEACT_411CE_NOR_PAGES_PER_SECTOR (16)
78
#define WEACT_411CE_NOR_FLAGS (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K)
79
#define WEACT_411CE_NOR_SPI_DEV SPI_DEV(0)
80
#define WEACT_411CE_NOR_SPI_CLK SPI_CLK_10MHZ
81
#define WEACT_411CE_NOR_SPI_CS GPIO_PIN(PORT_A, 4)
82
#define WEACT_411CE_NOR_SPI_MODE SPI_MODE_0
83
89
extern
mtd_dev_t
*
mtd0
;
90
#define MTD_0 mtd0
91
96
void
board_init
(
void
);
97
98
#ifdef __cplusplus
99
}
100
#endif
101
102
#endif
/* BOARD_H */
103
mtd_dev_t
MTD device descriptor.
Definition:
mtd.h:58
mtd0
mtd_dev_t * mtd0
mtd flash emulation device
board_init
void board_init(void)
Board level initialization.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17