Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Inria
3 * 2017 OTAKeys
4 * 2018 Freie Universität Berlin
5 *
6 * This file is subject to the terms and conditions of the GNU Lesser
7 * General Public License v2.1. See the file LICENSE in the top level
8 * directory for more details.
9 */
10
11#pragma once
12
27
28#include "arduino_pinmap.h"
29#include "board_nucleo.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
39#if defined(CPU_MODEL_STM32L496ZG) || defined(CPU_MODEL_STM32L4R5ZI) || \
40 defined(CPU_MODEL_STM32L552ZE) || defined(CPU_MODEL_STM32U575ZI)
41#define LED0_PIN_NUM 7
42#define LED0_PORT GPIO_PORT_C
43#define LED0_PORT_NUM PORT_C
44#else
45#define LED0_PIN_NUM 0
46#define LED0_PORT GPIO_PORT_B
47#define LED0_PORT_NUM PORT_B
48#endif
49
50#define LED1_PIN_NUM 7
51#define LED1_PORT GPIO_PORT_B
52#define LED1_PORT_NUM PORT_B
53
54#if defined(CPU_MODEL_STM32L552ZE)
55#define LED2_PIN_NUM 9
56#define LED2_PORT GPIO_PORT_A
57#define LED2_PORT_NUM PORT_A
58#elif defined(CPU_MODEL_STM32U575ZI)
59#define LED2_PIN_NUM 2
60#define LED2_PORT GPIO_PORT_G
61#define LED2_PORT_NUM PORT_G
62#else
63#define LED2_PIN_NUM 14
64#define LED2_PORT GPIO_PORT_B
65#define LED2_PORT_NUM PORT_B
66#endif
68
73#define BTN0_PIN GPIO_PIN(PORT_C, 13)
74#define BTN0_MODE GPIO_IN_PD
76
77#ifdef __cplusplus
78}
79#endif
80
81#include "stm32_leds.h"
82
Compatibility wrapper for arduino_iomap.h.
Global common Nucleo board configuration.
Common LED macros.