From cb6b7539f4b9abfd6c26ff0d6dcf6f279809bf83 Mon Sep 17 00:00:00 2001
From: Gunar Schorcht <gunar@schorcht.net>
Date: Wed, 9 Jan 2019 13:04:28 +0100
Subject: [PATCH] boards/esp32*: cleanup of SPI interfaces

SPI0_DEV and SPI1_DEV configuration parameters are renamed SPI0_CTRL and SPI1_CTRL to better describe what they define and to avoid confusion with SPI_DEV (0) and SPI_DEV (1).
---
 boards/esp32-mh-et-live-minikit/include/periph_conf.h  | 4 ++--
 boards/esp32-olimex-evb/include/periph_conf.h          | 4 ++--
 boards/esp32-wemos-lolin-d32-pro/include/periph_conf.h | 4 ++--
 boards/esp32-wroom-32/include/periph_conf.h            | 8 ++++----
 boards/esp32-wrover-kit/include/periph_conf.h          | 8 ++++----
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/boards/esp32-mh-et-live-minikit/include/periph_conf.h b/boards/esp32-mh-et-live-minikit/include/periph_conf.h
index 9238d2b39e..2135017411 100644
--- a/boards/esp32-mh-et-live-minikit/include/periph_conf.h
+++ b/boards/esp32-mh-et-live-minikit/include/periph_conf.h
@@ -120,8 +120,8 @@
  *
  * @{
  */
-#ifndef SPI0_DEV
-#define SPI0_DEV    VSPI    /**< VSPI is used as SPI_DEV(0) */
+#ifndef SPI0_CTRL
+#define SPI0_CTRL   VSPI    /**< VSPI is used as SPI_DEV(0) */
 #endif
 #ifndef SPI0_SCK
 #define SPI0_SCK    GPIO18  /**< VSPI SCK */
diff --git a/boards/esp32-olimex-evb/include/periph_conf.h b/boards/esp32-olimex-evb/include/periph_conf.h
index 7df3b12c67..c38f6ca7a4 100644
--- a/boards/esp32-olimex-evb/include/periph_conf.h
+++ b/boards/esp32-olimex-evb/include/periph_conf.h
@@ -165,8 +165,8 @@ extern "C" {
  * function. That is, they are not allocated as SPI signals before and can
  * be used for other purposes as long as the SPI interface is not used.
  */
-#ifndef SPI0_DEV
-#define SPI0_DEV    HSPI
+#ifndef SPI0_CTRL
+#define SPI0_CTRL   HSPI
 #endif
 
 #ifndef SPI0_SCK
diff --git a/boards/esp32-wemos-lolin-d32-pro/include/periph_conf.h b/boards/esp32-wemos-lolin-d32-pro/include/periph_conf.h
index 0724047463..e3d0812c79 100644
--- a/boards/esp32-wemos-lolin-d32-pro/include/periph_conf.h
+++ b/boards/esp32-wemos-lolin-d32-pro/include/periph_conf.h
@@ -140,8 +140,8 @@
  *
  * @{
  */
-#ifndef SPI0_DEV
-#define SPI0_DEV    VSPI    /**< VSPI is used as SPI_DEV(0) */
+#ifndef SPI0_CTRL
+#define SPI0_CTRL   VSPI    /**< VSPI is used as SPI_DEV(0) */
 #endif
 #ifndef SPI0_SCK
 #define SPI0_SCK    GPIO18  /**< VSPI SCK */
diff --git a/boards/esp32-wroom-32/include/periph_conf.h b/boards/esp32-wroom-32/include/periph_conf.h
index b61b128abf..5f63968e26 100644
--- a/boards/esp32-wroom-32/include/periph_conf.h
+++ b/boards/esp32-wroom-32/include/periph_conf.h
@@ -135,8 +135,8 @@ extern "C" {
  * be used for other purposes as long as the SPI interface is not used.
  * @{
  */
-#ifndef SPI0_DEV
-#define SPI0_DEV    VSPI    /**< VSPI is used as SPI_DEV(0) */
+#ifndef SPI0_CTRL
+#define SPI0_CTRL   VSPI    /**< VSPI is used as SPI_DEV(0) */
 #endif
 #ifndef SPI0_SCK
 #define SPI0_SCK    GPIO18  /**< VSPI SCK */
@@ -151,8 +151,8 @@ extern "C" {
 #define SPI0_CS0    GPIO5   /**< VSPI CS0 */
 #endif
 
-#ifndef SPI1_DEV
-#define SPI1_DEV    HSPI    /**< HSPI is used as SPI_DEV(1) */
+#ifndef SPI1_CTRL
+#define SPI1_CTRL   HSPI    /**< HSPI is used as SPI_DEV(1) */
 #endif
 #ifndef SPI1_SCK
 #define SPI1_SCK    GPIO14  /**< HSPI SCK */
diff --git a/boards/esp32-wrover-kit/include/periph_conf.h b/boards/esp32-wrover-kit/include/periph_conf.h
index ccb208d270..71da070629 100644
--- a/boards/esp32-wrover-kit/include/periph_conf.h
+++ b/boards/esp32-wrover-kit/include/periph_conf.h
@@ -146,8 +146,8 @@
  * @{
  */
 
-#ifndef SPI0_DEV
-#define SPI0_DEV    HSPI    /**< HSPI is configured as SPI_DEV(0) */
+#ifndef SPI0_CTRL
+#define SPI0_CTRL   HSPI    /**< HSPI is configured as SPI_DEV(0) */
 #endif
 
 #ifndef SPI0_SCK
@@ -174,8 +174,8 @@
  * be used for other purposes as long as the SPI interface is not used.
  *
  */
-#ifndef SPI1_DEV
-#define SPI1_DEV    VSPI
+#ifndef SPI1_CTRL
+#define SPI1_CTRL   VSPI
 #endif
 
 #ifndef SPI1_SCK
-- 
GitLab