Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016-2017 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include "board_nucleo.h"
20#include "arduino_pinmap.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#if defined(CPU_MODEL_STM32F302R8) || defined(CPU_MODEL_STM32L433RC)
31# define LED0_PIN_NUM 13
32# define LED0_PORT GPIO_PORT_B
33# define LED0_PORT_NUM PORT_B
34#else
35# define LED0_PIN_NUM 5
36# define LED0_PORT GPIO_PORT_A
37# define LED0_PORT_NUM PORT_A
38#endif
40
45#define BTN0_PIN GPIO_PIN(PORT_C, 13)
46#if defined(CPU_MODEL_STM32L433RC) || defined(CPU_MODEL_STM32G431RB) || \
47 defined(CPU_MODEL_STM32G474RE) || defined(CPU_MODEL_STM32G491RE) || \
48 defined(CPU_MODEL_STM32U385RG)
49# define BTN0_MODE GPIO_IN_PD
50#else
51# define BTN0_MODE GPIO_IN_PU
52#endif
54
59#ifndef MRF24J40_PARAM_SPI
60# define MRF24J40_PARAM_SPI SPI_DEV(0)
61#endif
62
63#ifndef MRF24J40_PARAM_SPI_CLK
64# define MRF24J40_PARAM_SPI_CLK SPI_CLK_5MHZ
65#endif
66
67#ifndef MRF24J40_PARAM_CS
68# define MRF24J40_PARAM_CS ARDUINO_PIN_10
69#endif
70
71#ifndef MRF24J40_PARAM_INT
72# define MRF24J40_PARAM_INT ARDUINO_PIN_7
73#endif
74
75#ifndef MRF24J40_PARAM_RESET
76# define MRF24J40_PARAM_RESET ARDUINO_PIN_5
77#endif
79
80#ifdef __cplusplus
81}
82#endif
83
84#include "stm32_leds.h"
85
Compatibility wrapper for arduino_iomap.h.
Global common Nucleo board configuration.
Common LED macros.