From 9d67e4abbc2219f6464f1138336dc0c64a5ee603 Mon Sep 17 00:00:00 2001 From: batt Date: Fri, 5 Sep 2008 17:30:50 +0000 Subject: [PATCH] Use correct type, change test condition. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1797 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/drv/eeprom.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bertos/drv/eeprom.c b/bertos/drv/eeprom.c index 6f0f8b59..ceca24d2 100644 --- a/bertos/drv/eeprom.c +++ b/bertos/drv/eeprom.c @@ -41,8 +41,8 @@ #include "eeprom.h" #warning TODO:Test and complete this module for arm platform. +#if !CPU_ARM -#if 0 #include // MIN() #include #include // MOD_CHECK() @@ -114,7 +114,7 @@ static size_t eeprom_writeRaw(struct KFile *_fd, const void *buf, size_t size) /* clamp size to memory limit (otherwise may roll back) */ ASSERT(_fd->seek_pos + size <= (kfile_off_t)_fd->size); - size = MIN((kfile_size_t)size, _fd->size - _fd->seek_pos); + size = MIN((kfile_off_t)size, _fd->size - _fd->seek_pos); if (mem_info[fd->type].has_dev_addr) { @@ -214,7 +214,7 @@ static size_t eeprom_read(struct KFile *_fd, void *_buf, size_t size) /* clamp size to memory limit (otherwise may roll back) */ ASSERT(_fd->seek_pos + size <= (kfile_off_t)_fd->size); - size = MIN((kfile_size_t)size, _fd->size - _fd->seek_pos); + size = MIN((kfile_off_t)size, _fd->size - _fd->seek_pos); e2dev_addr_t dev_addr; if (mem_info[fd->type].has_dev_addr) @@ -388,3 +388,5 @@ void eeprom_init(Eeprom *fd, EepromType type, e2dev_addr_t addr, bool verify) fd->fd.seek = kfile_genericSeek; } + +#endif -- 2.25.1