Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2020 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
#include "cpu.h"
25
#include "
periph_conf.h
"
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
35
#define LED_PORT PORT->Group[PA]
36
37
#define LED0_PIN GPIO_PIN(PA, 22)
38
#define LED0_MASK (1 << 22)
39
#define LED0_NAME "LED(Red)"
40
41
#define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
42
#define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
43
#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
44
45
#define LED1_PIN GPIO_PIN(PA, 19)
46
#define LED1_MASK (1 << 19)
47
#define LED1_NAME "LED(Green)"
48
49
#define LED1_OFF (LED_PORT.OUTSET.reg = LED1_MASK)
50
#define LED1_ON (LED_PORT.OUTCLR.reg = LED1_MASK)
51
#define LED1_TOGGLE (LED_PORT.OUTTGL.reg = LED1_MASK)
52
53
#define LED2_PIN GPIO_PIN(PA, 23)
54
#define LED2_MASK (1 << 23)
55
#define LED2_NAME "LED(Blue)"
56
57
#define LED2_OFF (LED_PORT.OUTSET.reg = LED2_MASK)
58
#define LED2_ON (LED_PORT.OUTCLR.reg = LED2_MASK)
59
#define LED2_TOGGLE (LED_PORT.OUTTGL.reg = LED2_MASK)
66
#define SERPENTE_NOR_PAGE_SIZE (256)
67
#define SERPENTE_NOR_PAGES_PER_SECTOR (16)
68
#define SERPENTE_NOR_SECTOR_COUNT (1024)
69
#define SERPENTE_NOR_FLAGS (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K)
70
#define SERPENTE_NOR_SPI_DEV SPI_DEV(0)
71
#define SERPENTE_NOR_SPI_CLK SPI_CLK_10MHZ
72
#define SERPENTE_NOR_SPI_CS GPIO_PIN(PA, 15)
73
#define SERPENTE_NOR_SPI_MODE SPI_MODE_3
80
#define MTD_0 mtd_dev_get(0)
87
#define INTERNAL_PERIPHERAL_VID (0x239A)
88
#define INTERNAL_PERIPHERAL_PID (0x0057)
91
#ifdef __cplusplus
92
}
93
#endif
94
95
#endif
/* BOARD_H */
periph_conf.h
Native CPU peripheral configuration.
Generated on Wed Apr 24 2024 16:34:23 by
1.9.8