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
#include "
periph/gpio.h
"
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
36
#define LED_PORT PORT->Group[PA]
37
38
#define LED0_PIN GPIO_PIN(PA, 22)
39
#define LED0_MASK (1 << 22)
40
#define LED0_NAME "LED(Red)"
41
42
#define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
43
#define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
44
#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
45
46
#define LED1_PIN GPIO_PIN(PA, 19)
47
#define LED1_MASK (1 << 19)
48
#define LED1_NAME "LED(Green)"
49
50
#define LED1_OFF (LED_PORT.OUTSET.reg = LED1_MASK)
51
#define LED1_ON (LED_PORT.OUTCLR.reg = LED1_MASK)
52
#define LED1_TOGGLE (LED_PORT.OUTTGL.reg = LED1_MASK)
53
54
#define LED2_PIN GPIO_PIN(PA, 23)
55
#define LED2_MASK (1 << 23)
56
#define LED2_NAME "LED(Blue)"
57
58
#define LED2_OFF (LED_PORT.OUTSET.reg = LED2_MASK)
59
#define LED2_ON (LED_PORT.OUTCLR.reg = LED2_MASK)
60
#define LED2_TOGGLE (LED_PORT.OUTTGL.reg = LED2_MASK)
67
#define SERPENTE_NOR_PAGE_SIZE (256)
68
#define SERPENTE_NOR_PAGES_PER_SECTOR (16)
69
#define SERPENTE_NOR_SECTOR_COUNT (1024)
70
#define SERPENTE_NOR_FLAGS (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K)
71
#define SERPENTE_NOR_SPI_DEV SPI_DEV(0)
72
#define SERPENTE_NOR_SPI_CLK SPI_CLK_10MHZ
73
#define SERPENTE_NOR_SPI_CS GPIO_PIN(PA, 15)
74
#define SERPENTE_NOR_SPI_MODE SPI_MODE_3
81
#define MTD_0 mtd_dev_get(0)
88
#define INTERNAL_PERIPHERAL_VID (0x239A)
89
#define INTERNAL_PERIPHERAL_PID (0x0057)
92
#ifdef __cplusplus
93
}
94
#endif
95
96
#endif
/* BOARD_H */
periph_conf.h
Native CPU peripheral configuration.
gpio.h
Low-level GPIO peripheral driver interface definitions.
Generated on Sat Dec 21 2024 20:58:01 by
1.9.8