use flash size byte to determine the location of the init data for byte 107 (#1827)

This commit is contained in:
Arnim Läuger 2017-03-02 04:48:44 +01:00 committed by Johny Mattsson
parent a26969b388
commit f5652187a6
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ static int adc_init107( lua_State *L )
{
uint8_t byte107 = luaL_checkinteger (L, 1);
uint32 init_sector = flash_safe_get_sec_num () - 4;
uint32 init_sector = flash_rom_get_sec_num () - 4;
// Note 32bit alignment so we can safely cast to uint32 for the flash api
char init_data[SPI_FLASH_SEC_SIZE] __attribute__((aligned(4)));