projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add reg definition for adc driver.
[bertos.git]
/
bertos
/
drv
/
dataflash.h
diff --git
a/bertos/drv/dataflash.h
b/bertos/drv/dataflash.h
index 1ad87ef4af6c9feb38c3000c1861b7fb3ffa6e33..90dac59c52768bee88394ec12804fdc375556d75 100644
(file)
--- a/
bertos/drv/dataflash.h
+++ b/
bertos/drv/dataflash.h
@@
-30,11
+30,15
@@
*
* -->
*
*
* -->
*
- * \brief Function library for dataflash AT45DB family
(interface)
.
+ * \brief Function library for dataflash AT45DB family.
*
*
- * \version $Id: dataflash.h 21658 2008-06-05 16:42:54Z asterix $
*
* \author Daniele Basile <asterix@develer.com>
*
* \author Daniele Basile <asterix@develer.com>
+ *
+ * $WIZ$ module_name = "dataflash"
+ * $WIZ$ module_depends = "kfile"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_dataflash.h"
+ * $WIZ$ module_hw = "bertos/hw/hw_dataflash.h", "bertos/hw/hw_dataflash.c"
*/
*/
@@
-43,7
+47,8
@@
#include <cfg/compiler.h>
#include <cfg/compiler.h>
-#include <kern/kfile.h>
+#include <io/kfile.h>
+#include <fs/battfs.h>
/**
* Type definitions for dflash memory.
/**
* Type definitions for dflash memory.
@@
-100,7
+105,7
@@
typedef struct DataFlash
/**
* Convert + ASSERT from generic KFile to DataFlash.
*/
/**
* Convert + ASSERT from generic KFile to DataFlash.
*/
-INLINE DataFlash * DATAFLASH
KFILE
(KFile *fd)
+INLINE DataFlash * DATAFLASH
_CAST
(KFile *fd)
{
ASSERT(fd->_type == KFT_DATAFLASH);
return (DataFlash *)fd;
{
ASSERT(fd->_type == KFT_DATAFLASH);
return (DataFlash *)fd;
@@
-182,6
+187,7
@@
typedef struct DataflashInfo
bool dataflash_init(DataFlash *fd, KFile *ch, DataflashType type, dataflash_setCS_t *setCS, dataflash_setReset_t *setReset);
bool dataflash_init(DataFlash *fd, KFile *ch, DataflashType type, dataflash_setCS_t *setCS, dataflash_setReset_t *setReset);
+bool dataflash_diskInit(struct BattFsSuper *d, DataFlash *fd, pgcnt_t *page_array);
/**
* To test data falsh drive you could use
/**
* To test data falsh drive you could use
@@
-190,7
+196,9
@@
bool dataflash_init(DataFlash *fd, KFile *ch, DataflashType type, dataflash_setC
*
* (see drv/datafalsh_test.c for more detail)
*/
*
* (see drv/datafalsh_test.c for more detail)
*/
-int dataflash_testSetUp(void);
+int dataflash_testSetup(void);
+/* For backward compatibility */
+#define dataflash_testSetUp() dataflash_testSetup()
int dataflash_testRun(void);
int dataflash_testTearDown(void);
int dataflash_testRun(void);
int dataflash_testTearDown(void);