1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards: remove extern mtd_dev_t* Declarations

This commit is contained in:
Gunar Schorcht 2023-11-23 17:46:10 +01:00
parent 9410ec705e
commit 26030e28af
26 changed files with 33 additions and 105 deletions

View File

@ -20,7 +20,6 @@
#define BOARD_H
#include "cpu.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -66,12 +65,10 @@ extern "C" {
* @name MTD configuration
* @{
*/
extern mtd_dev_t *mtd0; /**< Flash MTD device pointer */
#define MTD_0 mtd0 /**< Flash MTD device */
extern mtd_dev_t *mtd1; /**< MTD device pointer for SD Card */
#define MTD_1 mtd1 /**< MTD device for SD Card */
#define MTD_0 mtd_dev_get(0) /**< MTD device for the 8 MByte QSPI Flash */
#define MTD_1 mtd_dev_get(1) /**< MTD device for the SD Card */
#define CONFIG_SDCARD_GENERIC_MTD_OFFSET 1 /**< mtd1 is used for SD Card */
#define CONFIG_SDCARD_GENERIC_MTD_OFFSET 1 /**< MTD_1 is used for SD Card */
/** @} */
/**

View File

@ -20,7 +20,6 @@
#define BOARD_H
#include "cpu.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -53,8 +52,7 @@ extern "C" {
* @name MTD configuration
* @{
*/
extern mtd_dev_t *mtd0;
#define MTD_0 mtd0
#define MTD_0 mtd_dev_get(0)
/** @} */
/**

View File

@ -20,7 +20,6 @@
#define BOARD_H
#include "cpu.h"
#include "mtd.h"
#include "periph/gpio.h"
#ifdef __cplusplus
@ -101,8 +100,7 @@ extern "C" {
* @name MTD configuration
* @{
*/
extern mtd_dev_t *mtd0; /**< pointer to mtd0 */
#define MTD_0 mtd0 /**< mtd0 constant */
#define MTD_0 mtd_dev_get(0) /**< MTD_0 constant */
/** @} */
/**

View File

@ -34,10 +34,6 @@
#include "periph/gpio.h"
#include "sdkconfig.h"
#if MODULE_MTD
#include "mtd.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
@ -103,14 +99,10 @@ extern "C" {
#define SPI_FLASH_DRIVE_START 0
#endif
#define MTD_0 mtd0 /**< Flash MTD device */
extern mtd_dev_t *mtd0; /**< Flash MTD device pointer */
#define MTD_0 mtd_dev_get(0) /**< MTD device for the internal Flash */
#if MODULE_MTD_SDCARD_DEFAULT || DOXYGEN
#define MTD_1 mtd1 /**< SD Card MTD device */
extern mtd_dev_t *mtd1; /**< SD Card MTD device pointer */
#define MTD_1 mtd_dev_get(1) /**< MTD device for the SD Card */
#endif /* MODULE_MTD_SDCARD_DEFAULT || DOXYGEN */
/**

View File

@ -87,13 +87,9 @@ extern "C" {
* a system MTD device has to be defined.
* @{
*/
#include "mtd.h"
/** Default MTD device definition */
#define MTD_0 mtd0
/** Pointer to the default MTD device structure */
extern mtd_dev_t *mtd0;
#define MTD_0 mtd_dev_get(0)
/**
* @brief MTD offset for SD Card interfaces

View File

@ -25,7 +25,6 @@
extern "C" {
#endif
#include "mtd.h"
#include "periph_cpu.h"
/**
@ -73,8 +72,7 @@ extern "C" {
* @name MTD configuration
* @{
*/
extern mtd_dev_t *mtd0;
#define MTD_0 mtd0
#define MTD_0 mtd_dev_get(0)
/** @} */
#ifdef __cplusplus

View File

@ -25,8 +25,6 @@
#include "periph/gpio.h"
#include "periph/spi.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
#endif
@ -100,8 +98,7 @@ extern "C" {
* @name MTD configuration
*/
/** @{ */
extern mtd_dev_t *mtd0;
#define MTD_0 mtd0
#define MTD_0 mtd_dev_get(0)
/** @} */
#ifdef __cplusplus

View File

@ -27,7 +27,6 @@
#include "cpu.h"
#include "periph_conf.h"
#include "board_common.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -70,8 +69,7 @@ extern "C" {
* @name MTD configuration
* @{
*/
extern mtd_dev_t *mtd0; /**< SPI NOR Flash device */
#define MTD_0 mtd0 /**< Indicate presence of MTD device */
#define MTD_0 mtd_dev_get(0) /**< SPI NOR Flash device */
/** @} */
#ifdef __cplusplus

View File

@ -20,7 +20,6 @@
#define BOARD_H
#include "lpc23xx.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -110,8 +109,7 @@ extern "C" {
* @{
*/
#ifdef MODULE_MTD_MCI
extern mtd_dev_t *mtd0;
#define MTD_0 mtd0
#define MTD_0 mtd_dev_get(0)
#endif
/** @} */

View File

@ -20,7 +20,6 @@
#define BOARD_H
#include "lpc23xx.h"
#include "mtd.h"
#include "bitarithm.h"
#ifdef __cplusplus
@ -51,8 +50,7 @@ extern "C" {
* @{
*/
#ifdef MODULE_MTD_MCI
extern mtd_dev_t *mtd0;
#define MTD_0 mtd0
#define MTD_0 mtd_dev_get(0)
#endif
/** @} */

View File

@ -22,7 +22,6 @@
#include "cpu.h"
#include "periph_conf.h"
#include "mulle-nvram.h"
#include "mtd.h"
/* Use the on board RTC 32kHz clock for LPTMR clocking. */
#undef LPTIMER_CLKSRC
@ -150,8 +149,7 @@ extern "C" {
* @name MTD configuration
*/
/** @{ */
extern mtd_dev_t *mtd0;
#define MTD_0 mtd0
#define MTD_0 mtd_dev_get(0)
/** @} */
/**

View File

@ -31,10 +31,6 @@
extern "C" {
#endif
#ifdef MODULE_MTD
#include "mtd_native.h"
#endif
/**
* @name LED handlers
* @{
@ -90,11 +86,8 @@ void _native_LED_RED_TOGGLE(void);
#endif
/** @} */
/** Default MTD device */
#define MTD_0 mtd0
/** mtd flash emulation device */
extern mtd_dev_t *mtd0;
/** Default MTD device (mtd flash emulation device) */
#define MTD_0 mtd_dev_get(0)
#endif
/**

View File

@ -21,7 +21,6 @@
#define BOARD_H
#include "board_common.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -77,10 +76,7 @@ extern "C" {
/** @} */
/** Default MTD device */
#define MTD_0 mtd0
/** mtd flash emulation device */
extern mtd_dev_t *mtd0;
#define MTD_0 mtd_dev_get(0)
/**
* @name Button pin configuration

View File

@ -20,7 +20,6 @@
#define BOARD_H
#include "cpu.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -100,8 +99,7 @@ extern "C" {
* @name MTD configuration
* @{
*/
extern mtd_dev_t *mtd0;
#define MTD_0 mtd0
#define MTD_0 mtd_dev_get(0)
#define BOARD_QSPI_PIN_CS GPIO_PIN(0, 18) /**< SPI Flash Chip Select */
#define BOARD_QSPI_PIN_WP GPIO_PIN(0, 15) /**< SPI Flash Write Protect */

View File

@ -23,7 +23,6 @@
#include "cpu.h"
#include "board_common.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -97,8 +96,7 @@ extern "C" {
* @name MTD configuration
* @{
*/
extern mtd_dev_t *mtd0;
#define MTD_0 mtd0
#define MTD_0 mtd_dev_get(0)
/** @} */
/**

View File

@ -20,7 +20,6 @@
#define BOARD_H
#include "cpu.h"
#include "mtd.h"
#include "periph_conf.h"
#include "periph_cpu.h"
@ -63,8 +62,7 @@ extern "C" {
* @name MTD configuration
* @{
*/
extern mtd_dev_t *mtd0;
#define MTD_0 mtd0
#define MTD_0 mtd_dev_get(0)
/** @} */
#ifdef __cplusplus

View File

@ -23,7 +23,6 @@
#define BOARD_H
#include "cpu.h"
#include "mtd.h"
#include "board_common.h"
#ifdef __cplusplus
@ -124,10 +123,7 @@
/** @} */
/** Default MTD device */
#define MTD_0 mtd0
/** mtd flash emulation device */
extern mtd_dev_t *mtd0;
#define MTD_0 mtd_dev_get(0)
#ifdef __cplusplus
} /* end extern "C" */

View File

@ -21,7 +21,6 @@
#define BOARD_H
#include "cpu.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -71,12 +70,11 @@ extern "C" {
* @name MTD configuration
* @{
*/
extern mtd_dev_t *mtd0, *mtd1, *mtd2;
#define MTD_0 mtd0
#define MTD_1 mtd1
#define MTD_2 mtd2
#define MTD_0 mtd_dev_get(0) /**< MTD device for the QSPI Flash */
#define MTD_1 mtd_dev_get(1) /**< MTD device for the AT24MAC402 serial EEPROM */
#define MTD_2 mtd_dev_get(2) /**< MTD device for the SD/MMC Card */
#define CONFIG_SDMMC_GENERIC_MTD_OFFSET 2 /**< mtd2 is used for SD Card */
#define CONFIG_SDMMC_GENERIC_MTD_OFFSET 2 /**< MTD_2 is used for the SD Card */
/** @} */
/**

View File

@ -21,7 +21,6 @@
#define BOARD_H
#include "cpu.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -80,8 +79,7 @@ extern "C" {
* @name MTD configuration
* @{
*/
extern mtd_dev_t *mtd0; /**< First memory type device */
#define MTD_0 mtd0 /**< First memory type device */
#define MTD_0 mtd_dev_get(0) /**< First memory type device */
/** @} */
#ifdef __cplusplus

View File

@ -22,7 +22,6 @@
#define BOARD_H
#include "board_common.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -72,8 +71,7 @@ extern "C" {
* @name MTD configuration
* @{
*/
#define MTD_0 mtd0 /**< MTD device for SD Card */
extern mtd_dev_t *mtd0; /**< MTD device pointer for SD Card */
#define MTD_0 mtd_dev_get(0) /**< MTD device for the SD Card */
/** @} */
/**

View File

@ -25,7 +25,6 @@
#include "cpu.h"
#include "periph_conf.h"
#include "periph_cpu.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -164,11 +163,10 @@ extern "C" {
#if defined(MODULE_MTD_SDCARD) || defined(DOXYGEN)
/**
* @brief MTD device 0 (SD Card) definition. mtd0 is defined in board.c
* @brief MTD device 0 (SD Card) definition. mtd_dev_get(0) is defined in board.c
* @{
*/
extern mtd_dev_t *mtd0;
#define MTD_0 mtd0
#define MTD_0 mtd_dev_get(0)
/** @} */
#endif /* MODULE_MTD_SDCARD || DOXYGEN */

View File

@ -23,7 +23,6 @@
#include "cpu.h"
#include "periph_conf.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -78,8 +77,7 @@ extern "C" {
* @name MTD configuration
* @{
*/
extern mtd_dev_t *mtd0;
#define MTD_0 mtd0
#define MTD_0 mtd_dev_get(0)
/** @} */
/**

View File

@ -21,7 +21,6 @@
#define BOARD_H
#include "board_common.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -67,8 +66,7 @@ extern "C" {
* @name MTD configuration
* @{
*/
#define MTD_0 mtd0 /**< MTD device for SD Card */
extern mtd_dev_t *mtd0; /**< MTD device pointer for SD Card */
#define MTD_0 mtd_dev_get(0) /**< MTD device for the SD Card */
/** @} */
/**

View File

@ -21,7 +21,6 @@
#include "cpu.h"
#include "periph_conf.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {

View File

@ -21,7 +21,6 @@
#define BOARD_H
#include "cpu.h"
#include "mtd.h"
#include "waspmote_pinmap.h"
#ifdef __cplusplus
@ -197,10 +196,7 @@ extern "C" {
/** @} */
/** Default MTD device */
#define MTD_0 mtd0
/** mtd flash emulation device */
extern mtd_dev_t *mtd0;
#define MTD_0 mtd_dev_get(0)
#ifdef __cplusplus
}

View File

@ -20,7 +20,6 @@
#define BOARD_H
#include "board_common.h"
#include "mtd.h"
#ifdef __cplusplus
extern "C" {
@ -87,8 +86,7 @@ extern "C" {
* @name MTD configuration
* @{
*/
#define MTD_0 mtd0 /**< MTD device for SD Card */
extern mtd_dev_t *mtd0; /**< MTD device pointer for SD Card */
#define MTD_0 mtd_dev_get(0) /**< MTD device for the SD Card */
/** @} */
#ifdef __cplusplus