diff options
| Commit | fe301de9ba8110f0cdbdb076257692adc20a6bbc (patch) | |
|---|---|---|
| Author | 2024-05-25 12:51:44 +0300 | |
| Committer | 2024-05-25 12:51:44 +0300 | |
| Files | 09e4710e5e3f4c46acfcaf79058ea06ef4d36510 | |
| uni-projects-fe301de9ba8110f0cdbdb076257692adc20a6bbc.tar uni-projects-fe301de9ba8110f0cdbdb076257692adc20a6bbc.tar.gz uni-projects-fe301de9ba8110f0cdbdb076257692adc20a6bbc.zip | ||
| Parent | 670c46eb532b5981ced6d8ba7d1cde31b1981d7a (diff) | |
[iot/goam] Optimizations
5 files changed, 31 insertions, 35 deletions
| -rw-r--r-- | Year 3/Internet of things/goam/main/buttons.c | 4 | ||||
| -rw-r--r-- | Year 3/Internet of things/goam/main/main.c | 10 | ||||
| -rw-r--r-- | Year 3/Internet of things/goam/main/wifi.c | 2 | ||||
| -rw-r--r-- | Year 3/Internet of things/goam/sdkconfig | 26 | ||||
| -rw-r--r-- | Year 3/Internet of things/goam/sdkconfig.old | 24 |
diff --git a/Year 3/Internet of things/goam/main/buttons.c b/Year 3/Internet of things/goam/main/buttons.c index 6dd99ee..2f30622 100644 --- a/Year 3/Internet of things/goam/main/buttons.c +++ b/Year 3/Internet of things/goam/main/buttons.c @@ -54,7 +54,7 @@ static void on_button_event_task(void* arg) // button_on/button_off functions require a lot of memory, but most of the time // we won't be running them, so its more memory efficient to split them off into // another task, which allocates a lot of memory, but then frees it - xTaskCreate(button_action, "button_action", 2048, &io_num, 10, NULL); + xTaskCreate(button_action, "button_action", 2048, &io_num, 5, NULL); // We want button_action to be "blocking", in GoAm there is only one button, so // this logic is good enough. Under normal circumstances there should just be a @@ -82,7 +82,7 @@ void buttons_init() { //create a queue to handle gpio event from isr gpio_button_queue = xQueueCreate(5, sizeof(uint32_t)); //start gpio task - xTaskCreate(on_button_event_task, "on_button_event_task", 768, NULL, 10, &on_button_event_handle); + xTaskCreate(on_button_event_task, "on_button_event_task", 768, NULL, 15, &on_button_event_handle); //install gpio isr service gpio_install_isr_service(ESP_INTR_FLAG_DEFAULT); diff --git a/Year 3/Internet of things/goam/main/main.c b/Year 3/Internet of things/goam/main/main.c index 0623206..ec5f06b 100644 --- a/Year 3/Internet of things/goam/main/main.c +++ b/Year 3/Internet of things/goam/main/main.c @@ -126,14 +126,8 @@ void app_main(void) xTaskNotifyWait(0, 0, ¬ification, 50 / portTICK_PERIOD_MS); } - for (int i = 0; true; i++) { - /* ptc06_reset(); */ - /* printf("%d seconds, %d\n", i, gpio_get_level(GPIO_INPUT_CAMERA)); */ - - /* display_invertion(INVERSE); */ - vTaskDelay(1000 / portTICK_PERIOD_MS); - /* display_invertion(NORMAL); */ - vTaskDelay(1000 / portTICK_PERIOD_MS); + while (true) { + xTaskNotifyWait(ULONG_MAX, 0, ¬ification, 5000 / portTICK_PERIOD_MS); } printf("Restarting now.\n"); diff --git a/Year 3/Internet of things/goam/main/wifi.c b/Year 3/Internet of things/goam/main/wifi.c index fc7b141..1fd6ac8 100644 --- a/Year 3/Internet of things/goam/main/wifi.c +++ b/Year 3/Internet of things/goam/main/wifi.c @@ -106,7 +106,7 @@ static void launcher_scan_and_connect_task(void*) { xTaskNotifyWait(ULONG_MAX, 0, ¬ification, 100 / portTICK_PERIOD_MS); } while (!(notification & TO_CONNECT_BIT)); - xTaskCreate(scan_and_connect_task, "scan_and_connect_task", 4096, NULL, 10, NULL); + xTaskCreate(scan_and_connect_task, "scan_and_connect_task", 4096, NULL, 18, NULL); do { xTaskNotifyWait(ULONG_MAX, 0, ¬ification, 100 / portTICK_PERIOD_MS); diff --git a/Year 3/Internet of things/goam/sdkconfig b/Year 3/Internet of things/goam/sdkconfig index ccd0fce..8807a21 100644 --- a/Year 3/Internet of things/goam/sdkconfig +++ b/Year 3/Internet of things/goam/sdkconfig @@ -248,7 +248,8 @@ CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y # CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set # CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set CONFIG_BOOTLOADER_LOG_LEVEL=3 -# CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set +# CONFIG_BOOTLOADER_SPI_CUSTOM_WP_PIN is not set +CONFIG_BOOTLOADER_SPI_WP_PIN=7 CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y # CONFIG_BOOTLOADER_FACTORY_RESET is not set # CONFIG_BOOTLOADER_APP_TEST is not set @@ -296,17 +297,17 @@ CONFIG_ESP_ROM_HAS_NEWLIB_NANO_FORMAT=y # Serial flasher config # # CONFIG_ESPTOOLPY_NO_STUB is not set -# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +CONFIG_ESPTOOLPY_FLASHMODE_QIO=y # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set -CONFIG_ESPTOOLPY_FLASHMODE_DIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set # CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y CONFIG_ESPTOOLPY_FLASHMODE="dio" -# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set -CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set -CONFIG_ESPTOOLPY_FLASHFREQ="40m" +CONFIG_ESPTOOLPY_FLASHFREQ="80m" # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set @@ -342,9 +343,9 @@ CONFIG_PARTITION_TABLE_MD5=y # # Compiler options # -CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y +# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set # CONFIG_COMPILER_OPTIMIZATION_SIZE is not set -# CONFIG_COMPILER_OPTIMIZATION_PERF is not set +CONFIG_COMPILER_OPTIMIZATION_PERF=y # CONFIG_COMPILER_OPTIMIZATION_NONE is not set CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set @@ -1012,7 +1013,6 @@ CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=1 # # Port # -CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y # CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS=y # CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set @@ -1623,13 +1623,13 @@ CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y CONFIG_LOG_BOOTLOADER_LEVEL=3 # CONFIG_APP_ROLLBACK_ENABLE is not set # CONFIG_FLASH_ENCRYPTION_ENABLED is not set -# CONFIG_FLASHMODE_QIO is not set +CONFIG_FLASHMODE_QIO=y # CONFIG_FLASHMODE_QOUT is not set -CONFIG_FLASHMODE_DIO=y +# CONFIG_FLASHMODE_DIO is not set # CONFIG_FLASHMODE_DOUT is not set CONFIG_MONITOR_BAUD=115200 -CONFIG_OPTIMIZATION_LEVEL_DEBUG=y -CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y +# CONFIG_OPTIMIZATION_LEVEL_DEBUG is not set +# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set # CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set # CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y diff --git a/Year 3/Internet of things/goam/sdkconfig.old b/Year 3/Internet of things/goam/sdkconfig.old index 284f2a6..efb6559 100644 --- a/Year 3/Internet of things/goam/sdkconfig.old +++ b/Year 3/Internet of things/goam/sdkconfig.old @@ -248,7 +248,8 @@ CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y # CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set # CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set CONFIG_BOOTLOADER_LOG_LEVEL=3 -# CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set +# CONFIG_BOOTLOADER_SPI_CUSTOM_WP_PIN is not set +CONFIG_BOOTLOADER_SPI_WP_PIN=7 CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y # CONFIG_BOOTLOADER_FACTORY_RESET is not set # CONFIG_BOOTLOADER_APP_TEST is not set @@ -296,17 +297,17 @@ CONFIG_ESP_ROM_HAS_NEWLIB_NANO_FORMAT=y # Serial flasher config # # CONFIG_ESPTOOLPY_NO_STUB is not set -# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +CONFIG_ESPTOOLPY_FLASHMODE_QIO=y # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set -CONFIG_ESPTOOLPY_FLASHMODE_DIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set # CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y CONFIG_ESPTOOLPY_FLASHMODE="dio" -# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set -CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set -CONFIG_ESPTOOLPY_FLASHFREQ="40m" +CONFIG_ESPTOOLPY_FLASHFREQ="80m" # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set @@ -342,9 +343,9 @@ CONFIG_PARTITION_TABLE_MD5=y # # Compiler options # -CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y +# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set # CONFIG_COMPILER_OPTIMIZATION_SIZE is not set -# CONFIG_COMPILER_OPTIMIZATION_PERF is not set +CONFIG_COMPILER_OPTIMIZATION_PERF=y # CONFIG_COMPILER_OPTIMIZATION_NONE is not set CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set @@ -731,8 +732,10 @@ CONFIG_ESP_NETIF_USES_TCPIP_WITH_BSD_API=y # # PHY # -CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y -# CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set +# CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE is not set +CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION=y +CONFIG_ESP_PHY_DEFAULT_INIT_IF_INVALID=y +# CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN is not set CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 CONFIG_ESP_PHY_MAX_TX_POWER=20 # CONFIG_ESP_PHY_REDUCE_TX_POWER is not set @@ -1010,7 +1013,6 @@ CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=1 # # Port # -CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y # CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS=y # CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set |
