projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update example project to new bertos api.
[bertos.git]
/
bertos
/
drv
/
sd.h
diff --git
a/bertos/drv/sd.h
b/bertos/drv/sd.h
index 22a19d1e7d09322be23dc605caf16d58085fbe11..df12bb6e7a0639a2cdd05bdff6cf7513f862307c 100644
(file)
--- a/
bertos/drv/sd.h
+++ b/
bertos/drv/sd.h
@@
-44,12
+44,15
@@
#ifndef DRV_SD_H
#define DRV_SD_H
#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 <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.
/**
* SD Card context structure.
@@
-99,7
+102,7
@@
bool sd_initBuf(Sd *sd, KFile *ch);
*
* \return true if initialization succeds, false otherwise.
*/
*
* \return true if initialization succeds, false otherwise.
*/
- #define sd_init(sd, ch, buffered) ((buffered
) ? sd_initBuf((sd), (ch)) : sd_initUnb
uf((sd), (ch)))
+ #define sd_init(sd, ch, buffered) ((buffered
& SD_UNBUFFERED) ? sd_initUnbuf((sd), (ch)) : sd_initB
uf((sd), (ch)))
#endif
#endif