Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024 ML!PA Consulting GmbH
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 "arduino_iomap.h"
23#include "cpu.h"
24#include "periph/gpio.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
35#define LED0_PIN GPIO_PIN(PA, 16)
36#define LED1_PIN GPIO_PIN(PA, 27)
37#define LED2_PIN GPIO_PIN(PB, 6)
39#define LED0_PORT PORT->Group[PA]
40#define LED0_MASK (1U << 16)
41#define LED1_PORT PORT->Group[PA]
42#define LED1_MASK (1U << 27)
43#define LED2_PORT PORT->Group[PB]
44#define LED2_MASK (1U << 6)
46#define LED0_ON (LED0_PORT.OUTSET.reg = LED0_MASK)
47#define LED0_OFF (LED0_PORT.OUTCLR.reg = LED0_MASK)
48#define LED0_TOGGLE (LED0_PORT.OUTTGL.reg = LED0_MASK)
50#define LED1_ON (LED1_PORT.OUTCLR.reg = LED1_MASK)
51#define LED1_OFF (LED1_PORT.OUTSET.reg = LED1_MASK)
52#define LED1_TOGGLE (LED1_PORT.OUTTGL.reg = LED1_MASK)
54#define LED2_ON (LED2_PORT.OUTCLR.reg = LED2_MASK)
55#define LED2_OFF (LED2_PORT.OUTSET.reg = LED2_MASK)
56#define LED2_TOGGLE (LED2_PORT.OUTTGL.reg = LED2_MASK)
58#ifndef WS281X_PARAM_PIN
59#define WS281X_PARAM_PIN GPIO_PIN(PB, 22)
60#endif
61#ifndef WS281X_PARAM_NUMOF
62#define WS281X_PARAM_NUMOF (1U)
63#endif
70#define MTD_0 mtd_dev_get(0)
73#ifdef __cplusplus
74}
75#endif
76
77#endif /* BOARD_H */
Low-level GPIO peripheral driver interface definitions.
Mapping from MCU pins to Arduino pins.