diff options
Diffstat (limited to 'os/ex/Micron/m25q.h')
-rw-r--r-- | os/ex/Micron/m25q.h | 14 |
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. */ /*===========================================================================*/ |