}
-#ifdef _DEBUG
-
-/*
+/**
* Reset bad blocks map and erase all blocks.
- * DON'T USE on production chips: this function will try to erase
- * factory marked bad blocks too.
+ *
+ * \note DON'T USE on production chips: this function will try to erase
+ * factory marked bad blocks too.
*/
-static void mt29f_wipe(Mt29f *chip)
+void mt29f_format(Mt29f *chip)
{
int b;
chip->remap_start = MT29F_NUM_USER_BLOCKS;
}
+#ifdef _DEBUG
+
/*
* Create some bad blocks, erasing them and writing the bad block mark.
*/
-static void mt29f_ruinSomeBlocks(Mt29f *chip)
+void mt29f_ruinSomeBlocks(Mt29f *chip)
{
int bads[] = { 7, 99, 555, 1003, 1004, 1432 };
unsigned i;
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 */