Add test module for dataflash. Add cfg and use log macros instead kprintf.
[bertos.git] / bertos / drv / dataflash.h
index 61858167b66f3f92461f0760b5732e72af622e3c..923b9ec3bd3329d7c04ab2c231b184afe2e90b9d 100644 (file)
  *
  * -->
  *
- * \brief Function library for AT45DB081D Flash memory.
+ * \brief Function library for dataflash AT45DB family (interface).
  *
+ * \version $Id: dataflash.h 21658 2008-06-05 16:42:54Z asterix $
  *
- * \version $Id: dataflash.h 20677 2008-02-19 14:29:52Z batt $
  * \author Daniele Basile <asterix@develer.com>
  */
 
 #ifndef DRV_DATAFLASH_H
 #define DRV_DATAFLASH_H
 
-#include <kern/kfile.h>
 #include <cfg/compiler.h>
 
-#include <appconfig.h>
-
+#include <kern/kfile.h>
 
 /**
  * Type definitions for dflash memory.
@@ -72,9 +70,10 @@ typedef void (dataflash_setCS_t)(bool);
  */
 typedef enum DataflashType
 {
-       DFT_AT45DB041B,
+       DFT_AT45DB041B = 0,
        DFT_AT45DB081D,
        DFT_AT45DB161D,
+       DFT_AT45DB642D,
        DFT_CNT
 } DataflashType;
 
@@ -184,4 +183,15 @@ typedef struct DataflashInfo
 
 bool dataflash_init(KFileDataflash *fd, KFile *ch, DataflashType type, dataflash_setCS_t *setCS, dataflash_setReset_t *setReset);
 
+/**
+ * To test data falsh drive you could use
+ * this functions. To use these functions make sure to include in your make file the
+ * drv/datafalsh_test.c source.
+ *
+ * (see drv/datafalsh_test.c for more detail)
+ */
+int dataflash_testSetup(void);
+int dataflash_testRun(void);
+int dataflash_testTearDown(void);
+
 #endif /* DRV_DATAFLASH_H */