aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-05-17 17:23:36 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-05-17 17:23:36 +0000
commit3b594010647c02ae336d77e168ab9b23a6aa5c09 (patch)
treef99c968213eed532e606d5296c6769c0602fc6d9
parent1bfe4857677be78771c63a113f5c0b3fdfa92a2f (diff)
downloadChibiOS-3b594010647c02ae336d77e168ab9b23a6aa5c09.tar.gz
ChibiOS-3b594010647c02ae336d77e168ab9b23a6aa5c09.tar.bz2
ChibiOS-3b594010647c02ae336d77e168ab9b23a6aa5c09.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9494 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/ex/Micron/m25q.c2
-rw-r--r--os/ex/Micron/m25q.h21
2 files changed, 18 insertions, 5 deletions
diff --git a/os/ex/Micron/m25q.c b/os/ex/Micron/m25q.c
index 09965fe53..b94542051 100644
--- a/os/ex/Micron/m25q.c
+++ b/os/ex/Micron/m25q.c
@@ -1,5 +1,5 @@
/*
- N25Q128 Flash Driver - Copyright (C) 2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2016 Giovanni Di Sirio
This file is part of ChibiOS.
diff --git a/os/ex/Micron/m25q.h b/os/ex/Micron/m25q.h
index 049ee7ff6..4a1677d0d 100644
--- a/os/ex/Micron/m25q.h
+++ b/os/ex/Micron/m25q.h
@@ -1,5 +1,5 @@
/*
- N25Q128 Flash Driver - Copyright (C) 2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2016 Giovanni Di Sirio
This file is part of ChibiOS.
@@ -108,14 +108,27 @@
* @brief Physical transport interface.
*/
#if !defined(M25Q_USE_SPI) || defined(__DOXYGEN__)
-#define M25Q_BUS_MODE M25Q_BUS_MODE_QSPI4L
+#define M25Q_BUS_MODE M25Q_BUS_MODE_QSPI4L
#endif
/**
- * @brief N25Q128 shared SPI switch.
+ * @brief Switch QSPI bus width on initialization.
+ * @details A bus width initialization is performed by writing the
+ * Enhanced Volatile Configuration Register. If the flash
+ * device is configured using the Non Volatile Configuration
+ * Register then this option is not required.
+ * @note This option is only valid in QSPI bus modes.
+ */
+#if !defined(M25Q_SWITCH_WIDTH) || defined(__DOXYGEN__)
+#define M25Q_SWITCH_WIDTH TRUE
+#endif
+
+/**
+ * @brief Shared SPI switch.
* @details If set to @p TRUE the device acquires SPI bus ownership
* on each transaction.
- * @note The default is @p FALSE. Requires SPI_USE_MUTUAL_EXCLUSION
+ * @note This option is only valid in QSPI bus modes.
+ * @note Requires @p SPI_USE_MUTUAL_EXCLUSION.
*/
#if !defined(M25Q_SHARED_SPI) || defined(__DOXYGEN__)
#define M25Q_SHARED_SPI TRUE