* We use a spi bus, thus include hardware specific definition.
* If you use another channel you must redefine this macros.
*/
-#include "hw_spi.h"
-
-#include <appconfig.h>
+#include "hw/hw_spi.h"
#include <cfg/macros.h>
#include <cfg/debug.h>
#include <kern/proc.h>
#endif
-#warning this file was change, but is untest!
+#warning FIXME:This file was change, but is untest!
/**
* Wait until flash memory is ready.
KFileFlash25 *fd = KFILEFLASH25(_fd);
- ASSERT(fd->fd.seek_pos + size <= fd->fd.size);
- size = MIN((uint32_t)size, fd->fd.size - fd->fd.seek_pos);
+ ASSERT(fd->fd.seek_pos + (kfile_size_t)size <= fd->fd.size);
+ size = MIN((kfile_size_t)size, fd->fd.size - fd->fd.seek_pos);
//kprintf("Reading at addr[%lu], size[%d]\n", fd->seek_pos, size);
CS_ENABLE();
KFileFlash25 *fd = KFILEFLASH25(_fd);
- ASSERT(fd->fd.seek_pos + size <= fd->fd.size);
+ ASSERT(fd->fd.seek_pos + (kfile_size_t)size <= fd->fd.size);
- size = MIN((flash25Size_t)size, fd->fd.size - fd->fd.seek_pos);
+ size = MIN((kfile_size_t)size, fd->fd.size - fd->fd.seek_pos);
while (size)
{
total_write += wr_len;
}
- kprintf("written %u bytes\n", total_write);
+ kprintf("written %lu bytes\n", total_write);
return total_write;
}
*/
flash25_waitReady(fd);
- DB(kprintf("Erased sector [%d] in %d ms\n", sector, ticks_to_ms(timer_clock() - start_time)));
+ DB(kprintf("Erased sector [%ld] in %d ms\n", sector, ticks_to_ms(timer_clock() - start_time)));
}
*/
flash25_waitReady(fd);
- DB(kprintf("Erased all memory in %d ms\n", ticks_to_ms(timer_clock() - start_time)));
+ DB(kprintf("Erased all memory in %ld ms\n", ticks_to_ms(timer_clock() - start_time)));
}