Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Inria
3 * SPDX-FileCopyrightText: 2017 OTAKeys
4 * SPDX-FileCopyrightText: 2018 Freie Universität Berlin
5 * SPDX-License-Identifier: LGPL-2.1-only
6 */
7
8#pragma once
9
22
23#include "arduino_pinmap.h"
24#include "board_nucleo.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#if defined(CPU_MODEL_STM32L496ZG) || defined(CPU_MODEL_STM32L4R5ZI) || \
35 defined(CPU_MODEL_STM32L552ZE) || defined(CPU_MODEL_STM32U575ZI)
36#define LED0_PIN_NUM 7
37#define LED0_PORT GPIO_PORT_C
38#define LED0_PORT_NUM PORT_C
39#else
40#define LED0_PIN_NUM 0
41#define LED0_PORT GPIO_PORT_B
42#define LED0_PORT_NUM PORT_B
43#endif
44
45#if defined(CPU_MODEL_STM32H753ZI)
46# define LED1_PIN_NUM 1
47# define LED1_PORT GPIO_PORT_E
48# define LED1_PORT_NUM PORT_E
49#else
50# define LED1_PIN_NUM 7
51# define LED1_PORT GPIO_PORT_B
52# define LED1_PORT_NUM PORT_B
53#endif
54
55#if defined(CPU_MODEL_STM32L552ZE)
56#define LED2_PIN_NUM 9
57#define LED2_PORT GPIO_PORT_A
58#define LED2_PORT_NUM PORT_A
59#elif defined(CPU_MODEL_STM32U575ZI)
60#define LED2_PIN_NUM 2
61#define LED2_PORT GPIO_PORT_G
62#define LED2_PORT_NUM PORT_G
63#else
64#define LED2_PIN_NUM 14
65#define LED2_PORT GPIO_PORT_B
66#define LED2_PORT_NUM PORT_B
67#endif
69
74#define BTN0_PIN GPIO_PIN(PORT_C, 13)
75#define BTN0_MODE GPIO_IN_PD
77
78#ifdef __cplusplus
79}
80#endif
81
82#include "stm32_leds.h"
83
Compatibility wrapper for arduino_iomap.h.
Global common Nucleo board configuration.
Common LED macros.