Disable kernel heap (needs to be refactored).
[bertos.git] / bertos / drv / flash25.c
index 793fab019dc546c3c298f6d44b0dc5dd4a8d7fee..bb08907b36f9dacfb5503e2e49b8bfd5572443d1 100644 (file)
@@ -54,7 +54,7 @@
 
 #include <kern/kfile.h>
 
-#include <cpu/relax.h> /* cpu_relax() */
+#include <cpu/power.h> /* cpu_relax() */
 
 #warning FIXME:This file was change, but is untest!
 
@@ -173,8 +173,8 @@ static size_t flash25_read(struct KFile *_fd, void *buf, size_t size)
 
        Flash25 *fd = FLASH25_CAST(_fd);
 
-       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);
+       ASSERT(fd->fd.seek_pos + (kfile_off_t)size <= fd->fd.size);
+       size = MIN((kfile_off_t)size, fd->fd.size - fd->fd.seek_pos);
 
        //kprintf("Reading at addr[%lu], size[%d]\n", fd->seek_pos, size);
        CS_ENABLE();
@@ -226,9 +226,9 @@ static size_t flash25_write(struct KFile *_fd, const void *_buf, size_t size)
 
        Flash25 *fd = FLASH25_CAST(_fd);
 
-       ASSERT(fd->fd.seek_pos + (kfile_size_t)size <= fd->fd.size);
+       ASSERT(fd->fd.seek_pos + (kfile_off_t)size <= fd->fd.size);
 
-       size = MIN((kfile_size_t)size, fd->fd.size - fd->fd.seek_pos);
+       size = MIN((kfile_off_t)size, fd->fd.size - fd->fd.seek_pos);
 
        while (size)
        {