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) 2023 Gunar Schorcht
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
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
33
#define LED0_PIN GPIO_PIN(PB, 1)
34
#define LED1_PIN GPIO_PIN(PC, 30)
35
#define LED2_PIN GPIO_PIN(PC, 31)
37
#define LED0_PORT PORT->Group[PB]
38
#define LED0_MASK (1 << 1)
39
#define LED1_PORT PORT->Group[PC]
40
#define LED1_MASK (1 << 30)
41
#define LED2_PORT PORT->Group[PC]
42
#define LED2_MASK (1 << 31)
44
#define LED0_ON (LED0_PORT.OUTSET.reg = LED0_MASK)
45
#define LED0_OFF (LED0_PORT.OUTCLR.reg = LED0_MASK)
46
#define LED0_TOGGLE (LED0_PORT.OUTTGL.reg = LED0_MASK)
48
#define LED1_ON (LED1_PORT.OUTCLR.reg = LED1_MASK)
49
#define LED1_OFF (LED1_PORT.OUTSET.reg = LED1_MASK)
50
#define LED1_TOGGLE (LED1_PORT.OUTTGL.reg = LED1_MASK)
52
#define LED2_ON (LED2_PORT.OUTCLR.reg = LED2_MASK)
53
#define LED2_OFF (LED2_PORT.OUTSET.reg = LED2_MASK)
54
#define LED2_TOGGLE (LED2_PORT.OUTTGL.reg = LED2_MASK)
56
#ifndef WS281X_PARAM_PIN
57
#define WS281X_PARAM_PIN GPIO_PIN(PC, 24)
58
#endif
59
#ifndef WS281X_PARAM_NUMOF
60
#define WS281X_PARAM_NUMOF (1U)
61
#endif
68
#define MTD_0 mtd_dev_get(0)
69
#define MTD_1 mtd_dev_get(1)
71
#define CONFIG_SDCARD_GENERIC_MTD_OFFSET 1
81
#if MODULE_SDCARD_SPI || DOXYGEN
82
#define SDCARD_SPI_PARAM_SPI SPI_DEV(1)
83
#define SDCARD_SPI_PARAM_CLK GPIO_PIN(PB, 27)
84
#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(PB, 26)
85
#define SDCARD_SPI_PARAM_MISO GPIO_PIN(PB, 29)
86
#define SDCARD_SPI_PARAM_CS GPIO_PIN(PB, 28)
87
#define SDCARD_SPI_PARAM_POWER GPIO_UNDEF
88
#endif
91
#ifdef __cplusplus
92
}
93
#endif
94
95
#endif
/* BOARD_H */
Generated on Fri Apr 26 2024 20:03:16 by
1.9.8