diff options
Diffstat (limited to 'ota-test/main/main.cpp')
-rw-r--r-- | ota-test/main/main.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/ota-test/main/main.cpp b/ota-test/main/main.cpp index 08b2c2e..506c24f 100644 --- a/ota-test/main/main.cpp +++ b/ota-test/main/main.cpp @@ -14,7 +14,8 @@ uint32_t user_rf_cal_sector_set(); extern "C" void user_init(); -static void set_wifi_mode() { +static void set_wifi_mode() +{ if (wifi_get_opmode_default() != NULL_MODE) { printf("Setting default station mode"); wifi_set_opmode(NULL_MODE); @@ -23,7 +24,8 @@ static void set_wifi_mode() { wifi_set_opmode_current(NULL_MODE); } -void main_task(void* ctx) { +void main_task(void *ctx) +{ (void) ctx; int count = 0; @@ -39,7 +41,8 @@ void main_task(void* ctx) { #define THREAD_PRIO 8 TaskHandle_t main_task_handle; -void user_init() { +void user_init() +{ os_printf("SDK version: %s, free: %d, app build: %s\n", system_get_sdk_version(), system_get_free_heap_size(), __TIMESTAMP__); uint8_t current_rom = rboot_get_current_rom(); @@ -72,14 +75,14 @@ extern "C" uint8_t default_config(rboot_config *romconf, uint32_t flashsize); uint8_t default_config(rboot_config *romconf, uint32_t flashsize) { - romconf->count = 2; - romconf->roms[0] = SECTOR_SIZE * (BOOT_CONFIG_SECTOR + 1); - romconf->roms[1] = (flashsize / 2) + (SECTOR_SIZE * (BOOT_CONFIG_SECTOR + 1)); + romconf->count = 2; + romconf->roms[0] = SECTOR_SIZE * (BOOT_CONFIG_SECTOR + 1); + romconf->roms[1] = (flashsize / 2) + (SECTOR_SIZE * (BOOT_CONFIG_SECTOR + 1)); #ifdef BOOT_GPIO_ENABLED - romconf->mode = MODE_GPIO_ROM; + romconf->mode = MODE_GPIO_ROM; #endif #ifdef BOOT_GPIO_SKIP_ENABLED - romconf->mode = MODE_GPIO_SKIP; + romconf->mode = MODE_GPIO_SKIP; #endif } */ |