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_STM32G474RE) || \
47 defined(CPU_MODEL_STM32G431RB)
48#define BTN0_MODE GPIO_IN_PD
49#else
50#define BTN0_MODE GPIO_IN_PU
51#endif
53
58#ifndef MRF24J40_PARAM_SPI
59#define MRF24J40_PARAM_SPI SPI_DEV(0)
60#endif
61
62#ifndef MRF24J40_PARAM_SPI_CLK
63#define MRF24J40_PARAM_SPI_CLK SPI_CLK_5MHZ
64#endif
65
66#ifndef MRF24J40_PARAM_CS
67#define MRF24J40_PARAM_CS ARDUINO_PIN_10
68#endif
69
70#ifndef MRF24J40_PARAM_INT
71#define MRF24J40_PARAM_INT ARDUINO_PIN_7
72#endif
73
74#ifndef MRF24J40_PARAM_RESET
75#define MRF24J40_PARAM_RESET ARDUINO_PIN_5
76#endif
77
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.