use flash size byte to determine the location of the init data for byte 107 (#1827)
This commit is contained in:
parent
a26969b388
commit
f5652187a6
|
@ -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)));
|
||||
|
|
Loading…
Reference in New Issue