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
24
25#include "arduino_pinmap.h"
26#include "board_nucleo.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
36#if defined(CPU_MODEL_STM32L496ZG) || defined(CPU_MODEL_STM32L4R5ZI) || \
37 defined(CPU_MODEL_STM32L552ZE) || defined(CPU_MODEL_STM32U575ZI)
38#define LED0_PIN_NUM 7
39#define LED0_PORT GPIO_PORT_C
40#define LED0_PORT_NUM PORT_C
41#else
42#define LED0_PIN_NUM 0
43#define LED0_PORT GPIO_PORT_B
44#define LED0_PORT_NUM PORT_B
45#endif
46
47#define LED1_PIN_NUM 7
48#define LED1_PORT GPIO_PORT_B
49#define LED1_PORT_NUM PORT_B
50
51#if defined(CPU_MODEL_STM32L552ZE)
52#define LED2_PIN_NUM 9
53#define LED2_PORT GPIO_PORT_A
54#define LED2_PORT_NUM PORT_A
55#elif defined(CPU_MODEL_STM32U575ZI)
56#define LED2_PIN_NUM 2
57#define LED2_PORT GPIO_PORT_G
58#define LED2_PORT_NUM PORT_G
59#else
60#define LED2_PIN_NUM 14
61#define LED2_PORT GPIO_PORT_B
62#define LED2_PORT_NUM PORT_B
63#endif
65
70#define BTN0_PIN GPIO_PIN(PORT_C, 13)
71#define BTN0_MODE GPIO_IN_PD
73
74#ifdef __cplusplus
75}
76#endif
77
78#include "stm32_leds.h"
79
Compatibility wrapper for arduino_iomap.h.
Global common Nucleo board configuration.
Common LED macros.