DataFlash: fixed SITL build

This commit is contained in:
Andrew Tridgell 2012-07-04 13:44:01 +10:00
parent dd24330645
commit be9b9f3e67
1 changed files with 7 additions and 0 deletions

View File

@ -105,6 +105,13 @@ void DataFlash_APM1::PageErase (uint16_t PageAdr)
pwrite(flash_fd, fill, DF_PAGE_SIZE, PageAdr*DF_PAGE_SIZE);
}
void DataFlash_APM1::BlockErase (uint16_t BlockAdr)
{
uint8_t fill[DF_PAGE_SIZE*8];
memset(fill, 0xFF, sizeof(fill));
pwrite(flash_fd, fill, DF_PAGE_SIZE*8, BlockAdr*DF_PAGE_SIZE*8);
}
void DataFlash_APM1::ChipErase(void (*delay_cb)(unsigned long))
{