-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards/nucleo: use shard board.h and board.c files
- Loading branch information
1 parent
fcdd687
commit 74bd1b5
Showing
96 changed files
with
171 additions
and
2,293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
MODULE = boards_common_nucleo | ||
|
||
include $(RIOTBASE)/Makefile.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright (C) 2014-2017 Freie Universität Berlin | ||
* 2015 Lari Lehtomäki | ||
* 2015 TriaGnoSys GmbH | ||
* 2016-2017 Inria | ||
* 2016-2017 OTA keys | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
/** | ||
* @ingroup boards_nucleo | ||
* @{ | ||
* | ||
* @file | ||
* @brief Board initialization code for all Nucleo boards | ||
* | ||
* @author Hauke Petersen <[email protected]> | ||
* @author Thomas Eichinger <[email protected]> | ||
* @author Lari Lehtomäki <[email protected]> | ||
* @author Alexandre Abadie <[email protected]> | ||
* @author Víctor Ariño <[email protected]> | ||
* @author José Alamos <[email protected]> | ||
* @author Vincent Dupont <[email protected]> | ||
* | ||
* @} | ||
*/ | ||
|
||
#include "board.h" | ||
#include "periph/gpio.h" | ||
|
||
void board_init(void) | ||
{ | ||
/* initialize the CPU */ | ||
cpu_init(); | ||
|
||
/* initialization of on-board LEDs | ||
* NOTE: LED0 must be explicitly enabled as it is also used for SPI_DEV(0) */ | ||
#ifdef AUTO_INIT_LED0 | ||
gpio_init(LED0_PIN, GPIO_OUT); | ||
#endif | ||
#ifdef LED1_PIN | ||
gpio_init(LED1_PIN, GPIO_OUT); | ||
#endif | ||
#ifdef LED2_PIN | ||
gpio_init(LED2_PIN, GPIO_OUT); | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* Copyright (C) 2017 Freie Universität Berlin | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
/** | ||
* @defgroup boards_nucleo STM Nucleo boards | ||
* @ingroup boards | ||
* @brief STM Nucleo boards | ||
* @{ | ||
* | ||
* @file | ||
* @brief Global common Nucleo board configuration | ||
* | ||
* @author Hauke Petersen <[email protected]> | ||
*/ | ||
|
||
#ifndef BOARD_NUCLEO_H | ||
#define BOARD_NUCLEO_H | ||
|
||
#include "cpu.h" | ||
#include "periph_conf.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @name Xtimer configuration | ||
* @{ | ||
*/ | ||
#if defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32L0) && \ | ||
!defined(CPU_MODEL_STM32F042K6) && !defined(CPU_MODEL_STM32F031K6) | ||
#define XTIMER_WIDTH (16) | ||
#endif | ||
|
||
#if defined(CPU_MODEL_STM32F334R8) | ||
#define XTIMER_SHOOT_EARLY (2) | ||
#define XTIMER_OVERHEAD (5) | ||
#endif | ||
|
||
#if defined(CPU_FAM_STM32F1) | ||
#define XTIMER_WIDTH (16) | ||
#define XTIMER_BACKOFF (5) | ||
#endif | ||
|
||
#if defined(CPU_FAM_STM32L1) | ||
#define XTIMER_BACKOFF (3) | ||
#define XTIMER_OVERHEAD (6) | ||
#endif | ||
|
||
#if defined(CPU_FAM_STM32F4) || defined(CPU_MODEL_STM32F303ZE) | ||
#define XTIMER_BACKOFF (5) | ||
#define XTIMER_OVERHEAD (6) | ||
#endif | ||
/** @} */ | ||
|
||
/** | ||
* @brief Initialize board specific hardware, including clock, LEDs and std-IO | ||
*/ | ||
void board_init(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* BOARD_NUCLEO_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,11 +21,10 @@ | |
* @author Sebastian Meiling <[email protected]> | ||
*/ | ||
|
||
#ifndef BOARD_COMMON_H | ||
#define BOARD_COMMON_H | ||
#ifndef BOARD_H | ||
#define BOARD_H | ||
|
||
#include "cpu.h" | ||
#include "periph_conf.h" | ||
#include "board_nucleo.h" | ||
#include "arduino_pinmap.h" | ||
|
||
#ifdef __cplusplus | ||
|
@@ -63,14 +62,9 @@ extern "C" { | |
#define BTN0_MODE GPIO_IN_PD | ||
/** @} */ | ||
|
||
/** | ||
* @brief Initialize board specific hardware, including clock, LEDs and std-IO | ||
*/ | ||
void board_init(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* BOARD_COMMON_H */ | ||
#endif /* BOARD_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
*/ | ||
|
||
/** | ||
* @defgroup boards_nucleo32-common STM Nucleo-32 Common | ||
* @defgroup boards_common_nucleo32 STM Nucleo-32 Common | ||
* @ingroup boards_nucleo | ||
* @brief Common files for STM Nucleo-32 boards | ||
* @{ | ||
|
@@ -18,11 +18,10 @@ | |
* @author Alexandre Abadie <[email protected]> | ||
*/ | ||
|
||
#ifndef BOARD_COMMON_H | ||
#define BOARD_COMMON_H | ||
#ifndef BOARD_H | ||
#define BOARD_H | ||
|
||
#include "cpu.h" | ||
#include "periph_conf.h" | ||
#include "board_nucleo.h" | ||
#include "arduino_pinmap.h" | ||
|
||
#ifdef __cplusplus | ||
|
@@ -40,14 +39,9 @@ extern "C" { | |
#define LED0_TOGGLE (GPIOB->ODR ^= LED0_MASK) | ||
/** @} */ | ||
|
||
/** | ||
* @brief Initialize board specific hardware, including clock, LEDs and std-IO | ||
*/ | ||
void board_init(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* BOARD_COMMON_H */ | ||
#endif /* BOARD_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
/* | ||
* Copyright (C) 2016 Freie Universität Berlin | ||
* Copyright (C) 2016-2017 Freie Universität Berlin | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
/** | ||
* @defgroup boards_nucleo STM Nucleo boards | ||
* @ingroup boards | ||
* @brief STM Nucleo boards | ||
*/ | ||
|
||
/** | ||
* @defgroup boards_nucleo64_common STM Nucleo 64 boards common | ||
* @defgroup boards_nucleo64_common STM Nucleo-64 Common | ||
* @ingroup boards_nucleo | ||
* @brief Common files for STM Nucleo 64 boards | ||
* @brief Common files for STM Nucleo-64 boards | ||
* @{ | ||
* | ||
* @file | ||
|
@@ -25,19 +19,18 @@ | |
* @author Sebastian Meiling <[email protected]> | ||
*/ | ||
|
||
#ifndef BOARD_COMMON_H | ||
#define BOARD_COMMON_H | ||
#ifndef BOARD_H | ||
#define BOARD_H | ||
|
||
#include "cpu.h" | ||
#include "periph_conf.h" | ||
#include "board_nucleo.h" | ||
#include "arduino_pinmap.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief LED pin definitions and handlers | ||
* @name LED pin definitions and handlers | ||
* @{ | ||
*/ | ||
#ifdef CPU_MODEL_STM32F302R8 | ||
|
@@ -63,14 +56,9 @@ extern "C" { | |
#define BTN0_MODE GPIO_IN_PU | ||
/** @} */ | ||
|
||
/** | ||
* @brief Initialize board specific hardware, including clock, LEDs and std-IO | ||
*/ | ||
void board_init(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* BOARD_COMMON_H */ | ||
#endif /* BOARD_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
MODULE = board | ||
DIRS = $(RIOTBOARD)/common/nucleo | ||
|
||
include $(RIOTBASE)/Makefile.base |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
MODULE = board | ||
DIRS = $(RIOTBOARD)/common/nucleo | ||
|
||
include $(RIOTBASE)/Makefile.base |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.