From cc136f731b072090947d1e56ec5656390f50fbc4 Mon Sep 17 00:00:00 2001 From: devsaurus Date: Wed, 1 Mar 2017 22:00:26 +0100 Subject: [PATCH] use flash size byte to determine the location of the init data for byte 107 --- app/modules/adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/modules/adc.c b/app/modules/adc.c index 06068cd8cb..3ccd90aa44 100644 --- a/app/modules/adc.c +++ b/app/modules/adc.c @@ -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)));