-/**
- * Test function for flash25.
- *
- * \note: This implentation use a SPI channel.
- */
-bool flash25_test(KFile *channel)
-{
- KFile fd;
- uint8_t test_buf[256];
-
- /*
- * Init a spi kfile interface and
- * flash driver.
- */
- flash25_init(&fd, channel);
-
- kprintf("Init serial flash\n");
-
- flash25_chipErase();
-
- flash25_sectorErase(FLASH25_SECT1);
- flash25_sectorErase(FLASH25_SECT2);
- flash25_sectorErase(FLASH25_SECT3);
- flash25_sectorErase(FLASH25_SECT4);
-
- /*
- * Launche a kfile test interface.
- */
- kprintf("Kfile test start..\n");
- if (!kfile_test(&fd, test_buf, NULL, sizeof(test_buf)))
- return false;
-
- return true;
-}
-#endif /* CONFIG_TEST */