mt29f nand: export formatting function and, if DEBUG active, function
[bertos.git] / bertos / drv / mt29f.h
index e6c8ad7d9b8859d196caaaec2370112efd6f819f..e2517994833295c34972e016e9d50a600a4ea4b7 100644 (file)
  */
 typedef struct Mt29f
 {
-       KBlock    kblock;
+       KBlock    fd;           // KBlock descriptor
 
-       uint8_t   chip_select;
-       uint8_t   status;
+       uint8_t   chip_select;  // Chip select where NAND is connected
+       uint8_t   status;       // Status bitmap
 
        uint16_t *block_map;    // For bad blocks remapping
        uint16_t  remap_start;  // First unused remap block
@@ -95,9 +95,14 @@ struct Heap;
 bool mt29f_init(Mt29f *chip, struct Heap *heap, unsigned chip_select);
 bool mt29f_initUnbuffered(Mt29f *chip, struct Heap *heap, unsigned chip_select);
 
-// Private functions: use at your own risk, could change in any moment
+// NAND specific functions
 bool mt29f_getDevId(Mt29f *chip, uint8_t dev_id[5]);
 int mt29f_blockErase(Mt29f *chip, uint16_t block);
+void mt29f_format(Mt29f *chip);
+
+#ifdef _DEBUG
+void mt29f_ruinSomeBlocks(Mt29f *chip);
+#endif
 
 
 #endif /* DRV_MT29F_H */