#include CPU_HEADER(flash)
#define FLASH_WRITE_ONCE BV(0) ///< Allow only one write per block.
-#define FLASH_BUFFERED BV(1) ///< Open flash memory using page caching, allowing the modification and partial write.
+#define FLASH_UNBUFFERED BV(1) ///< Open flash memory disabling page caching, no modification and partial write are allowed.
-#define flash_init_2(fls, flags) (flags & FLASH_BUFFERED) ? \
+#define flash_init_2(fls, flags) (flags & FLASH_UNBUFFERED) ? \
flash_hw_initUnbuffered(fls, flags) : flash_hw_init(fls, flags)
#if !CONFIG_FLASH_DISABLE_OLD_API
#ifndef DRV_SD_H
#define DRV_SD_H
+#include "cfg/cfg_sd.h"
+
#include <io/kfile.h>
#include <io/kblock.h>
#include <fs/fatfs/diskio.h>
-#include "cfg/cfg_sd.h"
+
+#define SD_UNBUFFERED BV(0) ///< Open SD memory disabling page caching, no modification and partial write are allowed.
/**
* SD Card context structure.
*
* \return true if initialization succeds, false otherwise.
*/
- #define sd_init(sd, ch, buffered) ((buffered) ? sd_initBuf((sd), (ch)) : sd_initUnbuf((sd), (ch)))
+ #define sd_init(sd, ch, buffered) ((buffered & SD_UNBUFFERED) ? sd_initUnbuf((sd), (ch)) : sd_initBuf((sd), (ch)))
#endif