From 96f3718cc7e228e4b365cb2cba3d15f6451a8e19 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Thu, 26 May 2016 08:54:46 +0000 Subject: 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 --- os/ex/Micron/m25q.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'os/ex/Micron/m25q.h') 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. */ /*===========================================================================*/ -- cgit v1.2.3