bugfix map detect, configurable work address

This commit is contained in:
ikari
2009-10-08 16:24:25 +02:00
parent 16b624333e
commit aacabe41ad
5 changed files with 28 additions and 17 deletions

View File

@@ -41,6 +41,9 @@ UINT file_write() {
UINT file_readblock(void* buf, uint32_t addr, uint16_t size) {
UINT bytes_read;
file_res = f_lseek(&file_handle, addr);
if(file_handle.fptr != addr) {
return 0;
}
if(file_res) { dprintf("no lseek %d\n", file_res); _delay_ms(30); return 0;}
file_res = f_read(&file_handle, buf, size, &bytes_read);
if(file_res) { dprintf("no read %d\n", file_res); _delay_ms(30); }