X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Favr%2Fdrv%2Fflash_avr.c;h=01a515f663659dae43c270fec760033866e4a04b;hb=d22dfaec1fff3dfb5d216b0317f6e2845313f688;hp=0b32af12ed40e412315bb144a2e921a7f20de90c;hpb=998fdab28f0ed880acb8770382fd79a3ed783bd9;p=bertos.git diff --git a/bertos/cpu/avr/drv/flash_avr.c b/bertos/cpu/avr/drv/flash_avr.c index 0b32af12..01a515f6 100644 --- a/bertos/cpu/avr/drv/flash_avr.c +++ b/bertos/cpu/avr/drv/flash_avr.c @@ -44,10 +44,7 @@ #include "flash_avr.h" -#include -#include -#include - +#include "cfg/cfg_flash_avr.h" #include // MIN() #include #include @@ -57,10 +54,14 @@ #include +#include +#include +#include + #include #warning FIXME:This module need to be refactor to kfile interface! -#if 0 +#if 1 /** * Definition of type for avr flash module. @@ -222,7 +223,7 @@ static void flash_avr_open(struct KFile *fd) memcpy_P(page_buf, (const char *)(curr_page * SPM_PAGESIZE), SPM_PAGESIZE); fd->seek_pos = 0; - fd->size = (uint16_t)(FLASHEND - CONFIG_BOOT_SIZE + 1); + fd->size = (uint16_t)(FLASHEND - CONFIG_FLASH_AVR_BOOTSIZE + 1); page_modified = false; kprintf("Flash file opened\n");