X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fflash25.c;h=25d9ac618f91040e40a58abd9912080e4bf69a1c;hb=eefd46ab866bff0f1f19414db632fc46c4a0fd59;hp=1bb50fc8d2637b3ffcaf8e593293279823ab5ecd;hpb=f48615ef4781f256708e3e7300088a6e985d8d18;p=bertos.git diff --git a/bertos/drv/flash25.c b/bertos/drv/flash25.c index 1bb50fc8..25d9ac61 100644 --- a/bertos/drv/flash25.c +++ b/bertos/drv/flash25.c @@ -45,9 +45,7 @@ * 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 +#include "hw/hw_spi.h" #include #include @@ -181,7 +179,7 @@ static size_t flash25_read(struct KFile *_fd, void *buf, size_t size) 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); + 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(); @@ -235,7 +233,7 @@ static size_t flash25_write(struct KFile *_fd, const void *_buf, size_t size) ASSERT(fd->fd.seek_pos + 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) {