aboutsummaryrefslogtreecommitdiffstats
path: root/os/ex/Micron/m25q.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-05-26 08:54:46 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-05-26 08:54:46 +0000
commit96f3718cc7e228e4b365cb2cba3d15f6451a8e19 (patch)
tree52d1ef6f92edfcea4f6d0618805c54f753d03b23 /os/ex/Micron/m25q.h
parent249d014e0bc24c1341a09c9af4cf65b12161993e (diff)
downloadChibiOS-96f3718cc7e228e4b365cb2cba3d15f6451a8e19.tar.gz
ChibiOS-96f3718cc7e228e4b365cb2cba3d15f6451a8e19.tar.bz2
ChibiOS-96f3718cc7e228e4b365cb2cba3d15f6451a8e19.zip
Flashing driver over QSPI working but not complete, it needs more work.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9524 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ex/Micron/m25q.h')
-rw-r--r--os/ex/Micron/m25q.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/os/ex/Micron/m25q.h b/os/ex/Micron/m25q.h
index 865cc32ea..c5a98eadf 100644
--- a/os/ex/Micron/m25q.h
+++ b/os/ex/Micron/m25q.h
@@ -175,6 +175,16 @@
#define M25Q_SUPPORTED_MEMORY_TYPE_IDS {0xBA, 0xBB}
#endif
+/**
+ * @brief Size of the compare buffer.
+ * @details This buffer is allocated in the stack frame of the function
+ * @p flashVerifyErase() and its size must be a power of two.
+ * Larger buffers lead to better verify performance but increase
+ * stack usage for that function.
+ */
+#if !defined(M25Q_COMPARE_BUFFER_SIZE) || defined(__DOXYGEN__)
+#define M25Q_COMPARE_BUFFER_SIZE 32
+#endif
/** @} */
/*===========================================================================*/
@@ -206,6 +216,10 @@
#error "invalid M25Q_READ_DUMMY_CYCLES value (1..15)"
#endif
+#if (M25Q_COMPARE_BUFFER_SIZE & (M25Q_COMPARE_BUFFER_SIZE - 1)) != 0
+#error "invalid M25Q_COMPARE_BUFFER_SIZE value"
+#endif
+
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/