feat: initial
This commit is contained in:
1 parent
5a7cef6a92
commit
17f41cde85
46 files changed
+12980
-136
No files matched your search
+3
-1
@@ -1,5 +1,7 @@
|
||||
build
|
||||
.vscode
|
||||
.DS_Store
|
||||
sdkconfig
|
||||
sdkconfig.old
|
||||
desktop.ini
|
||||
.PVS-Studio
|
||||
sdkconfig
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
[submodule "components/zh_inclinometer"]
|
||||
path = components/zh_inclinometer
|
||||
url = https://github.com/aZholtikov/zh_inclinometer
|
||||
[submodule "components/zh_encoder"]
|
||||
path = components/zh_encoder
|
||||
url = https://github.com/aZholtikov/zh_encoder
|
||||
[submodule "components/zh_160x_i2c"]
|
||||
path = components/zh_160x_i2c
|
||||
url = https://github.com/aZholtikov/zh_160x_i2c
|
||||
[submodule "components/zh_pcf8574"]
|
||||
path = components/zh_pcf8574
|
||||
url = https://github.com/aZholtikov/zh_pcf8574
|
||||
[submodule "components/zh_vector"]
|
||||
path = components/zh_vector
|
||||
url = https://github.com/aZholtikov/zh_vector
|
||||
[submodule "components/zh_ota_server"]
|
||||
path = components/zh_ota_server
|
||||
url = https://github.com/aZholtikov/zh_ota_server
|
||||
[submodule "components/zh_espnow"]
|
||||
path = components/zh_espnow
|
||||
url = https://github.com/aZholtikov/zh_espnow
|
||||
[submodule "components/zh_tachometer"]
|
||||
path = components/zh_tachometer
|
||||
url = https://github.com/aZholtikov/zh_tachometer
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(firmware_template)
|
||||
project(ATE0005)
|
||||
-73
@@ -1,73 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,2 +1,21 @@
|
||||
# esp_firmware_template
|
||||
# Universal Optical 2-Channel Angle Gauge / Tachometer
|
||||
|
||||
## Tested on
|
||||
|
||||
1. [ESP32 ESP-IDF v5.5.3](https://docs.espressif.com/projects/esp-idf/en/v5.5.3/esp32/index.html)
|
||||
|
||||
## SAST Tools
|
||||
|
||||
[PVS-Studio](https://pvs-studio.com/pvs-studio/?utm_source=website&utm_medium=github&utm_campaign=open_source) - static analyzer for C, C++, C#, and Java code.
|
||||
|
||||
## Build and flash
|
||||
|
||||
Run the following command to firmware build and flash module:
|
||||
|
||||
```text
|
||||
cd your_projects_folder
|
||||
git clone --recurse-submodules https://github.com/aZholtikov/ate0005
|
||||
cd ate0005
|
||||
idf.py build
|
||||
idf.py flash
|
||||
```
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Submodule
+1
Submodule components/zh_160x_i2c added at 3077b35930.
Submodule
+1
Submodule components/zh_encoder added at 04aeb09e49.
Submodule
+1
Submodule components/zh_espnow added at af76d3172f.
Submodule
+1
Submodule components/zh_inclinometer added at 58a63d2f7d.
Submodule
+1
Submodule components/zh_ota_server added at ede39ad145.
Submodule
+1
Submodule components/zh_pcf8574 added at 828fcb9b7f.
Submodule
+1
Submodule components/zh_tachometer added at 2653b47f7c.
Submodule
+1
Submodule components/zh_vector added at a19e4da88a.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-2
@@ -1,2 +1 @@
|
||||
idf_build_get_property(project_dir PROJECT_DIR)
|
||||
idf_component_register(SRCS "main.c" INCLUDE_DIRS "")
|
||||
idf_component_register(SRCS "ate0005.c" INCLUDE_DIRS "" REQUIRES zh_160x_i2c zh_encoder zh_inclinometer zh_tachometer zh_espnow zh_ota_server esp_wifi nvs_flash esp_timer esp_app_format)
|
||||
+492
@@ -0,0 +1,492 @@
|
||||
#include "ate0005.h"
|
||||
|
||||
// #define DEBUG
|
||||
|
||||
static task_stats_t _task_stats = {A_INCLINOMETER_TASK_STACK_SIZE, B_INCLINOMETER_TASK_STACK_SIZE, A_TACHOMETER_TASK_STACK_SIZE, B_TACHOMETER_TASK_STACK_SIZE};
|
||||
|
||||
static httpd_handle_t _http_server_handle = NULL;
|
||||
|
||||
static zh_pcf8574_handle_t _lcd_handle = {0};
|
||||
static zh_encoder_handle_t _mode_encoder_handle = {0};
|
||||
static zh_inclinometer_handle_t _a_inclinometer_handle = {0};
|
||||
static zh_inclinometer_handle_t _b_inclinometer_handle = {0};
|
||||
static zh_tachometer_handle_t _a_tachometer_handle = {0};
|
||||
static zh_tachometer_handle_t _b_tachometer_handle = {0};
|
||||
static esp_timer_handle_t _inclinometer_reset_timer_handle = {0};
|
||||
|
||||
static SemaphoreHandle_t _lcd_mutex = NULL;
|
||||
static TaskHandle_t _a_inclinometer_task_handle = NULL;
|
||||
static TaskHandle_t _b_inclinometer_task_handle = NULL;
|
||||
static TaskHandle_t _a_tachometer_task_handle = NULL;
|
||||
static TaskHandle_t _b_tachometer_task_handle = NULL;
|
||||
|
||||
static void _zh_wifi_softap_init(void);
|
||||
static void _zh_webserver_init(void);
|
||||
static void _zh_espnow_init(void);
|
||||
static void _zh_encoder_init(void);
|
||||
static void _zh_a_inclinometer_init(void);
|
||||
static void _zh_b_inclinometer_init(void);
|
||||
static void _zh_a_tachometer_init(void);
|
||||
static void _zh_b_tachometer_init(void);
|
||||
static void _zh_pcf8574_init(void);
|
||||
static void _zh_system_load(void);
|
||||
static void _zh_timer_init(void);
|
||||
static void _zh_encoder_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data);
|
||||
// static void _zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data); // To Do.
|
||||
static void _zh_inclinometer_reset_timer_on_alarm_cb(void *arg);
|
||||
|
||||
static void _zh_a_inclinometer_processing_task(void *pvParameter);
|
||||
static void _zh_b_inclinometer_processing_task(void *pvParameter);
|
||||
static void _zh_a_tachometer_processing_task(void *pvParameter);
|
||||
static void _zh_b_tachometer_processing_task(void *pvParameter);
|
||||
#ifdef DEBUG
|
||||
static void _zh_stats_processing_task(void *pvParameter);
|
||||
#endif
|
||||
|
||||
static const char *_main_menu[] = {MAIN_MENU_ANGLE_ANGLE_NAME, MAIN_MENU_TACHO_TACHO_NAME, MAIN_MENU_ANGLE_TACHO_NAME, MAIN_MENU_REMOTE_NAME};
|
||||
volatile static bool _is_menu_mode = false;
|
||||
volatile static bool _is_reset_mode = false;
|
||||
volatile static bool _is_reset_occurred = false;
|
||||
volatile static uint8_t _current_menu_value = 0;
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
_lcd_mutex = xSemaphoreCreateMutex();
|
||||
nvs_flash_init();
|
||||
esp_event_loop_create_default();
|
||||
_zh_wifi_softap_init();
|
||||
_zh_webserver_init();
|
||||
_zh_pcf8574_init();
|
||||
_zh_system_load();
|
||||
_zh_encoder_init();
|
||||
_zh_a_inclinometer_init();
|
||||
_zh_b_inclinometer_init();
|
||||
_zh_espnow_init();
|
||||
_zh_timer_init();
|
||||
#ifdef DEBUG
|
||||
xTaskCreatePinnedToCore(&_zh_stats_processing_task, "stats_processing_task", STATS_TASK_STACK_SIZE, NULL, STATS_TASK_PRIORITY, NULL, tskNO_AFFINITY);
|
||||
#endif
|
||||
const esp_partition_t *running = esp_ota_get_running_partition();
|
||||
esp_ota_img_states_t ota_state = {0};
|
||||
esp_ota_get_state_partition(running, &ota_state);
|
||||
if (ota_state == ESP_OTA_IMG_PENDING_VERIFY)
|
||||
{
|
||||
vTaskDelay(60000 / portTICK_PERIOD_MS);
|
||||
esp_ota_mark_app_valid_cancel_rollback();
|
||||
}
|
||||
}
|
||||
|
||||
static void _zh_wifi_softap_init(void)
|
||||
{
|
||||
esp_netif_init();
|
||||
esp_netif_create_default_wifi_ap();
|
||||
wifi_init_config_t wifi_config = WIFI_INIT_CONFIG_DEFAULT();
|
||||
esp_wifi_init(&wifi_config);
|
||||
wifi_config_t ap_config = {
|
||||
.ap = {
|
||||
.ssid = WIFI_SSID,
|
||||
.password = WIFI_PASS,
|
||||
.channel = WIFI_CHANNEL,
|
||||
.max_connection = MAX_STA_CONNECTION,
|
||||
.authmode = WIFI_AUTH_WPA2_PSK,
|
||||
},
|
||||
};
|
||||
esp_wifi_set_mode(WIFI_MODE_APSTA);
|
||||
esp_wifi_set_config(WIFI_IF_AP, &ap_config);
|
||||
esp_wifi_start();
|
||||
}
|
||||
|
||||
static void _zh_webserver_init(void)
|
||||
{
|
||||
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
|
||||
httpd_start(&_http_server_handle, &config);
|
||||
zh_ota_server_init(_http_server_handle, "/");
|
||||
}
|
||||
|
||||
static void _zh_espnow_init(void)
|
||||
{
|
||||
// To Do.
|
||||
}
|
||||
|
||||
static void _zh_encoder_init(void)
|
||||
{
|
||||
esp_event_handler_instance_register(ZH_ENCODER, ESP_EVENT_ANY_ID, &_zh_encoder_event_handler, NULL, NULL);
|
||||
zh_encoder_init_config_t config = ZH_ENCODER_INIT_CONFIG_DEFAULT();
|
||||
config.task_priority = ENCODER_TASK_PRIORITY;
|
||||
config.stack_size = ENCODER_TASK_STACK_SIZE;
|
||||
config.queue_size = 5;
|
||||
config.a_gpio_number = MODE_ENCODER_A_GPIO;
|
||||
config.b_gpio_number = MODE_ENCODER_B_GPIO;
|
||||
config.s_gpio_number = MODE_ENCODER_S_GPIO;
|
||||
config.s_gpio_debounce_time = 1000;
|
||||
config.encoder_min_value = 0;
|
||||
config.encoder_max_value = (sizeof(_main_menu) / sizeof(_main_menu[0])) - 1;
|
||||
config.encoder_step = 1;
|
||||
config.encoder_number = MODE_ENCODER_NUMBER;
|
||||
zh_encoder_init(&config, &_mode_encoder_handle);
|
||||
zh_encoder_set(&_mode_encoder_handle, 0);
|
||||
}
|
||||
|
||||
static void _zh_a_inclinometer_init(void)
|
||||
{
|
||||
zh_inclinometer_init_config_t config = ZH_INCLINOMETER_INIT_CONFIG_DEFAULT();
|
||||
config.a_gpio_number = A_OPTICAL_DEVICE_A_GPIO;
|
||||
config.b_gpio_number = A_OPTICAL_DEVICE_B_GPIO;
|
||||
config.encoder_pulses = 3600;
|
||||
zh_inclinometer_init(&config, &_a_inclinometer_handle);
|
||||
xTaskCreatePinnedToCore(&_zh_a_inclinometer_processing_task, "a_inclinometer_processing_task", A_INCLINOMETER_TASK_STACK_SIZE, NULL, A_INCLINOMETER_TASK_PRIORITY,
|
||||
&_a_inclinometer_task_handle, tskNO_AFFINITY);
|
||||
}
|
||||
|
||||
static void _zh_b_inclinometer_init(void)
|
||||
{
|
||||
zh_inclinometer_init_config_t config = ZH_INCLINOMETER_INIT_CONFIG_DEFAULT();
|
||||
config.a_gpio_number = B_OPTICAL_DEVICE_A_GPIO;
|
||||
config.b_gpio_number = B_OPTICAL_DEVICE_B_GPIO;
|
||||
config.encoder_pulses = 3600;
|
||||
zh_inclinometer_init(&config, &_b_inclinometer_handle);
|
||||
xTaskCreatePinnedToCore(&_zh_b_inclinometer_processing_task, "b_inclinometer_processing_task", B_INCLINOMETER_TASK_STACK_SIZE, NULL, B_INCLINOMETER_TASK_PRIORITY,
|
||||
&_b_inclinometer_task_handle, tskNO_AFFINITY);
|
||||
}
|
||||
|
||||
static void _zh_a_tachometer_init(void)
|
||||
{
|
||||
zh_tachometer_init_config_t config = ZH_TACHOMETER_INIT_CONFIG_DEFAULT();
|
||||
config.a_gpio_number = A_OPTICAL_DEVICE_A_GPIO;
|
||||
config.b_gpio_number = A_OPTICAL_DEVICE_B_GPIO;
|
||||
config.encoder_pulses = 3600;
|
||||
zh_tachometer_init(&config, &_a_tachometer_handle);
|
||||
xTaskCreatePinnedToCore(&_zh_a_tachometer_processing_task, "a_tachometer_processing_task", A_TACHOMETER_TASK_STACK_SIZE, NULL, A_TACHOMETER_TASK_PRIORITY,
|
||||
&_a_tachometer_task_handle, tskNO_AFFINITY);
|
||||
}
|
||||
|
||||
static void _zh_b_tachometer_init(void)
|
||||
{
|
||||
zh_tachometer_init_config_t config = ZH_TACHOMETER_INIT_CONFIG_DEFAULT();
|
||||
config.a_gpio_number = B_OPTICAL_DEVICE_A_GPIO;
|
||||
config.b_gpio_number = B_OPTICAL_DEVICE_B_GPIO;
|
||||
config.encoder_pulses = 3600;
|
||||
zh_tachometer_init(&config, &_b_tachometer_handle);
|
||||
xTaskCreatePinnedToCore(&_zh_b_tachometer_processing_task, "b_tachometer_processing_task", B_TACHOMETER_TASK_STACK_SIZE, NULL, B_TACHOMETER_TASK_PRIORITY,
|
||||
&_b_tachometer_task_handle, tskNO_AFFINITY);
|
||||
}
|
||||
|
||||
static void _zh_pcf8574_init(void)
|
||||
{
|
||||
i2c_master_bus_handle_t _i2c_bus_handle = NULL;
|
||||
i2c_master_bus_config_t i2c_bus_config = {
|
||||
.clk_source = I2C_CLK_SRC_DEFAULT,
|
||||
.scl_io_num = I2C_SCL_GPIO,
|
||||
.sda_io_num = I2C_SDA_GPIO,
|
||||
.glitch_ignore_cnt = 7,
|
||||
.flags.enable_internal_pullup = true,
|
||||
};
|
||||
i2c_new_master_bus(&i2c_bus_config, &_i2c_bus_handle);
|
||||
zh_pcf8574_init_config_t config = ZH_PCF8574_INIT_CONFIG_DEFAULT();
|
||||
config.i2c_handle = _i2c_bus_handle;
|
||||
config.i2c_address = LCD_I2C_ADDRESS;
|
||||
zh_pcf8574_init(&config, &_lcd_handle);
|
||||
zh_160x_init(&_lcd_handle, ZH_LCD_16X2);
|
||||
}
|
||||
|
||||
static void _zh_system_load(void)
|
||||
{
|
||||
zh_160x_set_cursor(&_lcd_handle, 0, 0);
|
||||
zh_160x_print_char(&_lcd_handle, "LLC AEROTECH");
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 0);
|
||||
const esp_app_desc_t *esp_app_desc = esp_app_get_description();
|
||||
zh_160x_print_char(&_lcd_handle, esp_app_desc->project_name);
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 8);
|
||||
zh_160x_print_char(&_lcd_handle, "V");
|
||||
zh_160x_print_char(&_lcd_handle, esp_app_desc->version);
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
zh_160x_lcd_clear(&_lcd_handle);
|
||||
zh_160x_set_cursor(&_lcd_handle, 0, 0);
|
||||
zh_160x_print_char(&_lcd_handle, "SYSTEM LOADING:");
|
||||
for (uint8_t i = 0; i <= 100; i += 10)
|
||||
{
|
||||
zh_160x_print_progress_bar(&_lcd_handle, 1, i);
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
}
|
||||
vTaskDelay(500 / portTICK_PERIOD_MS);
|
||||
zh_160x_lcd_clear(&_lcd_handle);
|
||||
vTaskDelay(500 / portTICK_PERIOD_MS);
|
||||
zh_160x_set_cursor(&_lcd_handle, 0, 0);
|
||||
zh_160x_print_char(&_lcd_handle, "MODE:");
|
||||
zh_160x_print_char(&_lcd_handle, _main_menu[0]);
|
||||
}
|
||||
|
||||
static void _zh_timer_init(void)
|
||||
{
|
||||
const esp_timer_create_args_t timer_args = {
|
||||
.callback = &_zh_inclinometer_reset_timer_on_alarm_cb,
|
||||
};
|
||||
esp_timer_create(&timer_args, &_inclinometer_reset_timer_handle);
|
||||
}
|
||||
|
||||
static void _zh_encoder_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data)
|
||||
{
|
||||
switch (event_id)
|
||||
{
|
||||
case ZH_BUTTON_EVENT:
|
||||
zh_encoder_button_event_on_isr_t *button_event = event_data;
|
||||
if (button_event->button_status == BUTTON_PRESSED)
|
||||
{
|
||||
esp_timer_start_once(_inclinometer_reset_timer_handle, 2000000);
|
||||
_is_reset_mode = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_is_reset_occurred == true)
|
||||
{
|
||||
_is_reset_occurred = false;
|
||||
break;
|
||||
}
|
||||
if (_is_reset_mode == true)
|
||||
{
|
||||
esp_timer_stop(_inclinometer_reset_timer_handle);
|
||||
_is_reset_mode = false;
|
||||
}
|
||||
_is_menu_mode = !_is_menu_mode;
|
||||
if (_is_menu_mode == true)
|
||||
{
|
||||
switch (_current_menu_value)
|
||||
{
|
||||
case MODE_ANGLE_ANGLE:
|
||||
vTaskDelete(_a_inclinometer_task_handle);
|
||||
vTaskDelete(_b_inclinometer_task_handle);
|
||||
zh_inclinometer_deinit(&_a_inclinometer_handle);
|
||||
zh_inclinometer_deinit(&_b_inclinometer_handle);
|
||||
break;
|
||||
case MODE_TACHO_TACHO:
|
||||
vTaskDelete(_a_tachometer_task_handle);
|
||||
vTaskDelete(_b_tachometer_task_handle);
|
||||
zh_tachometer_deinit(&_a_tachometer_handle);
|
||||
zh_tachometer_deinit(&_b_tachometer_handle);
|
||||
break;
|
||||
case MODE_ANGLE_TACHO:
|
||||
vTaskDelete(_a_inclinometer_task_handle);
|
||||
vTaskDelete(_b_tachometer_task_handle);
|
||||
zh_inclinometer_deinit(&_a_inclinometer_handle);
|
||||
zh_tachometer_deinit(&_b_tachometer_handle);
|
||||
break;
|
||||
case MODE_REMOTE:
|
||||
// To Do.
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
zh_160x_clear_row(&_lcd_handle, 1);
|
||||
zh_160x_set_cursor(&_lcd_handle, 0, 0);
|
||||
zh_160x_on_cursor(&_lcd_handle, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
zh_160x_off_cursor(&_lcd_handle);
|
||||
switch (_current_menu_value)
|
||||
{
|
||||
case MODE_ANGLE_ANGLE:
|
||||
_zh_a_inclinometer_init();
|
||||
_zh_b_inclinometer_init();
|
||||
break;
|
||||
case MODE_TACHO_TACHO:
|
||||
_zh_a_tachometer_init();
|
||||
_zh_b_tachometer_init();
|
||||
break;
|
||||
case MODE_ANGLE_TACHO:
|
||||
_zh_a_inclinometer_init();
|
||||
_zh_b_tachometer_init();
|
||||
break;
|
||||
case MODE_REMOTE:
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 0);
|
||||
zh_160x_print_char(&_lcd_handle, "NOT CONNECTED");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZH_ENCODER_EVENT:
|
||||
zh_encoder_event_on_isr_t *encoder_event = event_data;
|
||||
if (_is_menu_mode == true)
|
||||
{
|
||||
_current_menu_value = (uint8_t)encoder_event->encoder_position; // -V2004
|
||||
zh_160x_clear_row(&_lcd_handle, 0);
|
||||
zh_160x_set_cursor(&_lcd_handle, 0, 0);
|
||||
zh_160x_print_char(&_lcd_handle, "MODE:");
|
||||
zh_160x_print_char(&_lcd_handle, _main_menu[(uint8_t)encoder_event->encoder_position]); // -V2004
|
||||
zh_160x_set_cursor(&_lcd_handle, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
zh_encoder_set(&_mode_encoder_handle, (float)_current_menu_value);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// static void _zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data)
|
||||
// {
|
||||
// // To Do.
|
||||
// }
|
||||
|
||||
static void _zh_inclinometer_reset_timer_on_alarm_cb(void *arg)
|
||||
{
|
||||
_is_reset_mode = false;
|
||||
_is_reset_occurred = true;
|
||||
if (_is_menu_mode == false)
|
||||
{
|
||||
switch (_current_menu_value)
|
||||
{
|
||||
case MODE_ANGLE_ANGLE:
|
||||
zh_inclinometer_reset(&_a_inclinometer_handle);
|
||||
zh_inclinometer_reset(&_b_inclinometer_handle);
|
||||
break;
|
||||
case MODE_ANGLE_TACHO:
|
||||
zh_inclinometer_reset(&_a_inclinometer_handle);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void _zh_a_inclinometer_processing_task(void *pvParameter)
|
||||
{
|
||||
float prev_angle = 0, current_angle = 0;
|
||||
xSemaphoreTake(_lcd_mutex, portMAX_DELAY);
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 0);
|
||||
zh_160x_print_char(&_lcd_handle, "A:");
|
||||
zh_160x_print_float(&_lcd_handle, current_angle, 1);
|
||||
xSemaphoreGive(_lcd_mutex);
|
||||
for (;;)
|
||||
{
|
||||
zh_inclinometer_get(&_a_inclinometer_handle, ¤t_angle);
|
||||
if (prev_angle != current_angle)
|
||||
{
|
||||
prev_angle = current_angle;
|
||||
xSemaphoreTake(_lcd_mutex, portMAX_DELAY);
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 5);
|
||||
zh_160x_print_char(&_lcd_handle, " ");
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 2);
|
||||
zh_160x_print_float(&_lcd_handle, current_angle, 1);
|
||||
xSemaphoreGive(_lcd_mutex);
|
||||
}
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
_task_stats.a_inclinometer_task_min_stack_size = (uint32_t)uxTaskGetStackHighWaterMark(NULL);
|
||||
}
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
static void _zh_b_inclinometer_processing_task(void *pvParameter)
|
||||
{
|
||||
float prev_angle = 0, current_angle = 0;
|
||||
xSemaphoreTake(_lcd_mutex, portMAX_DELAY);
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 8);
|
||||
zh_160x_print_char(&_lcd_handle, "B:");
|
||||
zh_160x_print_float(&_lcd_handle, current_angle, 1);
|
||||
xSemaphoreGive(_lcd_mutex);
|
||||
for (;;)
|
||||
{
|
||||
zh_inclinometer_get(&_b_inclinometer_handle, ¤t_angle);
|
||||
if (prev_angle != current_angle)
|
||||
{
|
||||
prev_angle = current_angle;
|
||||
xSemaphoreTake(_lcd_mutex, portMAX_DELAY);
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 13);
|
||||
zh_160x_print_char(&_lcd_handle, " ");
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 10);
|
||||
zh_160x_print_float(&_lcd_handle, current_angle, 1);
|
||||
xSemaphoreGive(_lcd_mutex);
|
||||
}
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
_task_stats.b_inclinometer_task_min_stack_size = (uint32_t)uxTaskGetStackHighWaterMark(NULL);
|
||||
}
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
static void _zh_a_tachometer_processing_task(void *pvParameter)
|
||||
{
|
||||
uint16_t prev_rpm = 0, current_rpm = 0;
|
||||
xSemaphoreTake(_lcd_mutex, portMAX_DELAY);
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 0);
|
||||
zh_160x_print_char(&_lcd_handle, "A:");
|
||||
zh_160x_print_int(&_lcd_handle, current_rpm);
|
||||
xSemaphoreGive(_lcd_mutex);
|
||||
for (;;)
|
||||
{
|
||||
zh_tachometer_get(&_a_tachometer_handle, ¤t_rpm);
|
||||
if (prev_rpm != current_rpm)
|
||||
{
|
||||
prev_rpm = current_rpm;
|
||||
xSemaphoreTake(_lcd_mutex, portMAX_DELAY);
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 3);
|
||||
zh_160x_print_char(&_lcd_handle, " ");
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 2);
|
||||
zh_160x_print_int(&_lcd_handle, current_rpm);
|
||||
xSemaphoreGive(_lcd_mutex);
|
||||
}
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
_task_stats.a_tachometer_task_min_stack_size = (uint32_t)uxTaskGetStackHighWaterMark(NULL);
|
||||
}
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
static void _zh_b_tachometer_processing_task(void *pvParameter)
|
||||
{
|
||||
uint16_t prev_rpm = 0, current_rpm = 0;
|
||||
xSemaphoreTake(_lcd_mutex, portMAX_DELAY);
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 8);
|
||||
zh_160x_print_char(&_lcd_handle, "B:");
|
||||
zh_160x_print_int(&_lcd_handle, current_rpm);
|
||||
xSemaphoreGive(_lcd_mutex);
|
||||
for (;;)
|
||||
{
|
||||
zh_tachometer_get(&_b_tachometer_handle, ¤t_rpm);
|
||||
if (prev_rpm != current_rpm)
|
||||
{
|
||||
prev_rpm = current_rpm;
|
||||
xSemaphoreTake(_lcd_mutex, portMAX_DELAY);
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 11);
|
||||
zh_160x_print_char(&_lcd_handle, " ");
|
||||
zh_160x_set_cursor(&_lcd_handle, 1, 10);
|
||||
zh_160x_print_int(&_lcd_handle, current_rpm);
|
||||
xSemaphoreGive(_lcd_mutex);
|
||||
}
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
_task_stats.b_tachometer_task_min_stack_size = (uint32_t)uxTaskGetStackHighWaterMark(NULL);
|
||||
}
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
static void _zh_stats_processing_task(void *pvParameter)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
printf("Tasks:\n");
|
||||
printf("A inclinometer task minimum free stack size: %ld.\n", _task_stats.a_inclinometer_task_min_stack_size);
|
||||
printf("B inclinometer task minimum free stack size: %ld.\n", _task_stats.b_inclinometer_task_min_stack_size);
|
||||
printf("A tachometer task minimum free stack size: %ld.\n", _task_stats.a_tachometer_task_min_stack_size);
|
||||
printf("A tachometer task minimum free stack size: %ld.\n", _task_stats.b_tachometer_task_min_stack_size);
|
||||
printf("Stats task minimum free stack size: %ld.\n", (uint32_t)uxTaskGetStackHighWaterMark(NULL));
|
||||
printf("Encoders:\n");
|
||||
const zh_encoder_stats_t *encoder_stats = zh_encoder_get_stats();
|
||||
printf("Number of event post error: %ld.\n", encoder_stats->event_post_error);
|
||||
printf("Number of queue overflow error: %ld.\n", encoder_stats->queue_overflow_error);
|
||||
printf("Minimum free stack size: %ld.\n", encoder_stats->min_stack_size);
|
||||
printf("Expanders:\n");
|
||||
const zh_pcf8574_stats_t *pcf8574_stats = zh_pcf8574_get_stats();
|
||||
printf("Number of i2c driver error: %ld.\n", pcf8574_stats->i2c_driver_error);
|
||||
printf("Number of event post error: %ld.\n", pcf8574_stats->event_post_error);
|
||||
printf("Number of vector error: %ld.\n", pcf8574_stats->vector_error);
|
||||
printf("Number of queue overflow error: %ld.\n", pcf8574_stats->queue_overflow_error);
|
||||
printf("Minimum free stack size: %ld.\n", pcf8574_stats->min_stack_size);
|
||||
vTaskDelay(10000 / portTICK_PERIOD_MS);
|
||||
}
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* @file ate0005.h
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "nvs_flash.h"
|
||||
#include "esp_wifi.h"
|
||||
#include "esp_timer.h"
|
||||
#include "zh_160x_i2c.h"
|
||||
#include "zh_encoder.h"
|
||||
#include "zh_inclinometer.h"
|
||||
#include "zh_tachometer.h"
|
||||
#include "zh_ota_server.h"
|
||||
#include "zh_espnow.h"
|
||||
|
||||
#define STATS_TASK_PRIORITY tskIDLE_PRIORITY
|
||||
#define STATS_TASK_STACK_SIZE configMINIMAL_STACK_SIZE + 512
|
||||
#define A_INCLINOMETER_TASK_PRIORITY tskIDLE_PRIORITY + 5
|
||||
#define A_INCLINOMETER_TASK_STACK_SIZE configMINIMAL_STACK_SIZE + 512
|
||||
#define B_INCLINOMETER_TASK_PRIORITY tskIDLE_PRIORITY + 5
|
||||
#define B_INCLINOMETER_TASK_STACK_SIZE configMINIMAL_STACK_SIZE + 512
|
||||
#define A_TACHOMETER_TASK_PRIORITY tskIDLE_PRIORITY + 5
|
||||
#define A_TACHOMETER_TASK_STACK_SIZE configMINIMAL_STACK_SIZE + 512
|
||||
#define B_TACHOMETER_TASK_PRIORITY tskIDLE_PRIORITY + 5
|
||||
#define B_TACHOMETER_TASK_STACK_SIZE configMINIMAL_STACK_SIZE + 512
|
||||
#define ENCODER_TASK_PRIORITY tskIDLE_PRIORITY + 4
|
||||
#define ENCODER_TASK_STACK_SIZE configMINIMAL_STACK_SIZE
|
||||
|
||||
#define HIGH true
|
||||
#define LOW false
|
||||
|
||||
#define BUTTON_RELEASED HIGH
|
||||
#define BUTTON_PRESSED LOW
|
||||
|
||||
#define MODE_ANGLE_ANGLE 0
|
||||
#define MAIN_MENU_ANGLE_ANGLE_NAME "ANGLE/ANGLE"
|
||||
#define MODE_TACHO_TACHO 1
|
||||
#define MAIN_MENU_TACHO_TACHO_NAME "TACHO/TACHO"
|
||||
#define MODE_ANGLE_TACHO 2
|
||||
#define MAIN_MENU_ANGLE_TACHO_NAME "ANGLE/TACHO"
|
||||
#define MODE_REMOTE 3
|
||||
#define MAIN_MENU_REMOTE_NAME "REMOTE"
|
||||
|
||||
#define WIFI_SSID "ATE0005"
|
||||
#define WIFI_PASS "repairlab"
|
||||
#define WIFI_CHANNEL 1
|
||||
#define MAX_STA_CONNECTION 4
|
||||
|
||||
#define I2C_SCL_GPIO GPIO_NUM_22
|
||||
#define I2C_SDA_GPIO GPIO_NUM_21
|
||||
|
||||
#define LCD_I2C_ADDRESS 0x20 /*!< U2. */
|
||||
|
||||
#define MODE_ENCODER_NUMBER 0x01 /*!< Connector EN1. */
|
||||
#define MODE_ENCODER_A_GPIO GPIO_NUM_27
|
||||
#define MODE_ENCODER_B_GPIO GPIO_NUM_26
|
||||
#define MODE_ENCODER_S_GPIO GPIO_NUM_25
|
||||
|
||||
#define A_OPTICAL_DEVICE_A_GPIO GPIO_NUM_14 /*!< Connector EN2. */
|
||||
#define A_OPTICAL_DEVICE_B_GPIO GPIO_NUM_13
|
||||
|
||||
#define B_OPTICAL_DEVICE_A_GPIO GPIO_NUM_18 /*!< Connector EN3. */
|
||||
#define B_OPTICAL_DEVICE_B_GPIO GPIO_NUM_19
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t a_inclinometer_task_min_stack_size;
|
||||
uint32_t b_inclinometer_task_min_stack_size;
|
||||
uint32_t a_tachometer_task_min_stack_size;
|
||||
uint32_t b_tachometer_task_min_stack_size;
|
||||
} task_stats_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
void app_main(void)
|
||||
{
|
||||
}
|
||||
+7
-6
@@ -1,7 +1,8 @@
|
||||
# Name, Type, SubType, Offset, Size, Flags
|
||||
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
|
||||
nvs, data, nvs, 0x9000, 0x4000
|
||||
otadata, data, ota, 0xd000, 0x2000
|
||||
phy_init, data, phy, 0xf000, 0x1000
|
||||
ota_0, 0, ota_0, 0x10000, 0x70000
|
||||
ota_1, 0, ota_1, 0x80000, 0x70000
|
||||
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
||||
nvs, data, nvs, , 0x6000,
|
||||
otadata, data, ota, , 0x2000,
|
||||
phy_init, data, phy, , 0x1000,
|
||||
ota_0, app, ota_0, , 3500K,
|
||||
ota_1, app, ota_1, , 3500K,
|
||||
storage, data,fat , , 1M,
|
||||
|
@@ -1,7 +0,0 @@
|
||||
# Name, Type, SubType, Offset, Size, Flags
|
||||
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
||||
nvs, data, nvs, , 0x4000,
|
||||
otadata, data, ota, , 0x2000,
|
||||
phy_init, data, phy, , 0x1000,
|
||||
ota_0, app, ota_0, , 1500K,
|
||||
ota_1, app, ota_1, , 1500K,
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 2.6 MiB |
File diff suppressed because it is too large.
Load diff
+20
-22
@@ -1,23 +1,21 @@
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL=0
|
||||
|
||||
CONFIG_ESPTOOLPY_FLASHMODE_DOUT=y
|
||||
CONFIG_ESPTOOLPY_FLASHMODE="dout"
|
||||
CONFIG_SPI_FLASH_MODE=0x3
|
||||
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_1MB=y
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="1MB"
|
||||
CONFIG_SPI_FLASH_SIZE=0x100000
|
||||
|
||||
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y
|
||||
CONFIG_BOOTLOADER_LOG_LEVEL_ERROR=y
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
|
||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
|
||||
|
||||
CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y
|
||||
|
||||
CONFIG_ESP8266_DEFAULT_CPU_FREQ_80=y
|
||||
CONFIG_ESP8266_DEFAULT_CPU_FREQ_MHZ=80
|
||||
|
||||
CONFIG_ESP_PANIC_SILENT_REBOOT=y
|
||||
|
||||
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
|
||||
CONFIG_LOG_DEFAULT_LEVEL=0
|
||||
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
|
||||
CONFIG_GPIO_CTRL_FUNC_IN_IRAM=y
|
||||
CONFIG_GPTIMER_CTRL_FUNC_IN_IRAM=y
|
||||
CONFIG_GPTIMER_ISR_CACHE_SAFE=y
|
||||
CONFIG_I2C_ISR_IRAM_SAFE=y
|
||||
CONFIG_LEDC_CTRL_FUNC_IN_IRAM=y
|
||||
CONFIG_PCNT_CTRL_FUNC_IN_IRAM=y
|
||||
CONFIG_PCNT_ISR_IRAM_SAFE=y
|
||||
CONFIG_RMT_RECV_FUNC_IN_IRAM=y
|
||||
CONFIG_RMT_TX_ISR_CACHE_SAFE=y
|
||||
CONFIG_RMT_RX_ISR_CACHE_SAFE=y
|
||||
CONFIG_SPI_MASTER_IN_IRAM=y
|
||||
CONFIG_UART_ISR_IN_IRAM=y
|
||||
CONFIG_HTTPD_WS_SUPPORT=y
|
||||
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y
|
||||
CONFIG_FREERTOS_HZ=1000
|
||||
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y
|
||||
@@ -1,18 +0,0 @@
|
||||
CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000
|
||||
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
|
||||
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
|
||||
CONFIG_BOOTLOADER_LOG_LEVEL=0
|
||||
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y
|
||||
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
|
||||
|
||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_esp32.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="partitions_esp32.csv"
|
||||
CONFIG_PARTITION_TABLE_OFFSET=0x8000
|
||||
|
||||
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
|
||||
|
||||
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
|
||||
CONFIG_LOG_DEFAULT_LEVEL=0
|
||||
Reference in new issue
Block a user