summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0885518)
**********
r22525 | batt | 2008-10-21 16:25:29 +0200(mar, 21 ott 2008) | 1 line
Fix some errors and warnings.
**********
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1895
38d2e660-2303-0410-9eaa-
f027e97ec537
+#include <fs/battfs.h>
+
#include <kern/kfile.h>
#include <cpu/power.h> /* cpu_relax() */
#include <kern/kfile.h>
#include <cpu/power.h> /* cpu_relax() */
kfile_putc((byte_addr >> 16) & 0xff, fd->channel);
kfile_putc((byte_addr >> 8) & 0xff, fd->channel);
kfile_putc((byte_addr >> 16) & 0xff, fd->channel);
kfile_putc((byte_addr >> 8) & 0xff, fd->channel);
- kfile_putc((byte_addr & 0xff, fd->channel);
+ kfile_putc(byte_addr & 0xff, fd->channel);
/* Send additional don't care byte to start read operation */
kfile_putc(0, fd->channel);
/* Send additional don't care byte to start read operation */
kfile_putc(0, fd->channel);
kfile_read(fd->channel, buf, len); //Read len bytes ad put in buffer.
kfile_flush(fd->channel); // Flush channel
fd->setCS(false);
kfile_read(fd->channel, buf, len); //Read len bytes ad put in buffer.
kfile_flush(fd->channel); // Flush channel
fd->setCS(false);
}
static bool dataflash_disk_page_save(struct BattFsSuper *d, pgcnt_t page)
}
static bool dataflash_disk_page_save(struct BattFsSuper *d, pgcnt_t page)
uint8_t *data = (uint8_t *)buf;
uint8_t *data = (uint8_t *)buf;
- ASSERT(fd->fd.seek_pos + size <= (kfile_off_t)fd->fd.size);
+ 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);
LOG_INFO("Reading at pos[%lu]\n", fd->fd.seek_pos);
size = MIN((kfile_off_t)size, fd->fd.size - fd->fd.seek_pos);
LOG_INFO("Reading at pos[%lu]\n", fd->fd.seek_pos);
dataflash_readBlock(fd, page_addr, byte_addr, data, size);
fd->fd.seek_pos += size;
dataflash_readBlock(fd, page_addr, byte_addr, data, size);
fd->fd.seek_pos += size;
- LOG_INFO("Read %ld bytes\n", size);
+ LOG_INFO("Read %ld bytes\n", (long int)size);
const uint8_t *data = (const uint8_t *) _buf;
const uint8_t *data = (const uint8_t *) _buf;
- ASSERT(fd->fd.seek_pos + size <= (kfile_off_t)fd->fd.size);
+ 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);
LOG_INFO("Writing at pos[%lu]\n", fd->fd.seek_pos);
size = MIN((kfile_off_t)size, fd->fd.size - fd->fd.seek_pos);
LOG_INFO("Writing at pos[%lu]\n", fd->fd.seek_pos);
- LOG_INFO("written %lu bytes\n", total_write);
+ LOG_INFO("written %lu bytes\n", (long unsigned)total_write);