Commit f5652187 authored by Arnim Läuger's avatar Arnim Läuger Committed by Johny Mattsson
Browse files

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

parent a26969b3
......@@ -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)));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment