diff --git a/.github/ISSUE_TEMPLATE/Issue-report.yml b/.github/ISSUE_TEMPLATE/Issue-report.yml index 4b0465bb994..ad68d2cba32 100644 --- a/.github/ISSUE_TEMPLATE/Issue-report.yml +++ b/.github/ISSUE_TEMPLATE/Issue-report.yml @@ -39,7 +39,8 @@ body: label: Version description: What version of Arduino ESP32 are you running? If possible, consider updating to the latest version. options: - - latest master + - latest master (checkout manually) + - latest development Release Candidate (RC-X) - v2.0.2 - v2.0.1 - v2.0.0 @@ -52,7 +53,7 @@ body: attributes: label: IDE Name description: What IDE are you using? - placeholder: eg. Arduino IDE, PlatformIO, IDF component... + placeholder: eg. Arduino IDE, PlatformIO, Sloeber... validations: required: true - type: input @@ -101,8 +102,8 @@ body: id: sketch attributes: label: Sketch - description: Please provide your sketch/code which was run - placeholder: ex. related part of the code + description: Please provide full minimal sketch/code which can be run to reproduce your issue + placeholder: ex. Related part of the code to replicate the issue render: cpp validations: required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 737f55dcc61..d68a0cea8a2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,18 +1,23 @@ -*By completing this PR sufficiently, you help us to improve the quality of Release Notes* +*By completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes* ### Checklist -1. [ ] Please provide specific title of the PR describing the change, including the component name (eg. *„Update of Documentation link on Readme.md“*) -2. [ ] Please provide related links (eg. Issue, other Project, submodule PR..) -3. [ ] Please check [Contributing guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/contributing.html) +1. [ ] Please provide specific title of the PR describing the change, including the component name (*eg. „Update of Documentation link on Readme.md“*) +2. [ ] Please provide related links (*eg. Issue which will be closed by this Pull Request*) +3. [ ] Please **update relevant Documentation** if applicable +4. [ ] Please check [Contributing guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/contributing.html) *This entire section above can be deleted if all items are checked.* ----------- -## Summary -Please describe your proposed PR and what it contains. +## Description of Change +Please describe your proposed Pull Request and it's impact. -## Impact -Please describe impact of your PR and it's function. +## Tests scenarios +Please describe on what Hardware and Software combinations you have tested this Pull Request and how. + +(*eg. I have tested my Pull Request on Arduino-esp32 core v2.0.2 with ESP32 and ESP32-S2 Board with this scenario*) ## Related links Please provide links to related issue, PRs etc. + +(*eg. Closes #number of issue*) diff --git a/.github/scripts/sketch_utils.sh b/.github/scripts/sketch_utils.sh index 72645d3c0bc..abe3db2b977 100755 --- a/.github/scripts/sketch_utils.sh +++ b/.github/scripts/sketch_utils.sh @@ -7,12 +7,6 @@ function build_sketch(){ # build_sketch = LEDC_CHANNELS || bit_num > LEDC_MAX_BIT_WIDTH){ log_e("No more LEDC channels available! (maximum %u) or bit width too big (maximum %u)", LEDC_CHANNELS, LEDC_MAX_BIT_WIDTH); @@ -106,7 +106,7 @@ uint32_t ledcRead(uint8_t chan) return ledc_get_duty(group,channel); } -double ledcReadFreq(uint8_t chan) +uint32_t ledcReadFreq(uint8_t chan) { if(!ledcRead(chan)){ return 0; @@ -115,7 +115,7 @@ double ledcReadFreq(uint8_t chan) return ledc_get_freq(group,timer); } -double ledcWriteTone(uint8_t chan, double freq) +uint32_t ledcWriteTone(uint8_t chan, uint32_t freq) { if(chan >= LEDC_CHANNELS){ return 0; @@ -142,12 +142,12 @@ double ledcWriteTone(uint8_t chan, double freq) } channels_resolution[chan] = 10; - double res_freq = ledc_get_freq(group,timer); + uint32_t res_freq = ledc_get_freq(group,timer); ledcWrite(chan, 0x1FF); return res_freq; } -double ledcWriteNote(uint8_t chan, note_t note, uint8_t octave){ +uint32_t ledcWriteNote(uint8_t chan, note_t note, uint8_t octave){ const uint16_t noteFrequencyBase[12] = { // C C# D Eb E F F# G G# A Bb B 4186, 4435, 4699, 4978, 5274, 5588, 5920, 6272, 6645, 7040, 7459, 7902 @@ -156,7 +156,7 @@ double ledcWriteNote(uint8_t chan, note_t note, uint8_t octave){ if(octave > 8 || note >= NOTE_MAX){ return 0; } - double noteFreq = (double)noteFrequencyBase[note] / (double)(1 << (8-octave)); + uint32_t noteFreq = (uint32_t)noteFrequencyBase[note] / (uint32_t)(1 << (8-octave)); return ledcWriteTone(chan, noteFreq); } @@ -184,7 +184,7 @@ void ledcDetachPin(uint8_t pin) pinMatrixOutDetach(pin, false, false); } -double ledcChangeFrequency(uint8_t chan, double freq, uint8_t bit_num) +uint32_t ledcChangeFrequency(uint8_t chan, uint32_t freq, uint8_t bit_num) { if(chan >= LEDC_CHANNELS || bit_num > LEDC_MAX_BIT_WIDTH){ log_e("LEDC channel not available! (maximum %u) or bit width too big (maximum %u)", LEDC_CHANNELS, LEDC_MAX_BIT_WIDTH); diff --git a/cores/esp32/esp32-hal-ledc.h b/cores/esp32/esp32-hal-ledc.h index 1d640b32eae..4b8bc7d712a 100644 --- a/cores/esp32/esp32-hal-ledc.h +++ b/cores/esp32/esp32-hal-ledc.h @@ -27,15 +27,15 @@ typedef enum { } note_t; //channel 0-15 resolution 1-16bits freq limits depend on resolution -double ledcSetup(uint8_t channel, double freq, uint8_t resolution_bits); +uint32_t ledcSetup(uint8_t channel, uint32_t freq, uint8_t resolution_bits); void ledcWrite(uint8_t channel, uint32_t duty); -double ledcWriteTone(uint8_t channel, double freq); -double ledcWriteNote(uint8_t channel, note_t note, uint8_t octave); +uint32_t ledcWriteTone(uint8_t channel, uint32_t freq); +uint32_t ledcWriteNote(uint8_t channel, note_t note, uint8_t octave); uint32_t ledcRead(uint8_t channel); -double ledcReadFreq(uint8_t channel); +uint32_t ledcReadFreq(uint8_t channel); void ledcAttachPin(uint8_t pin, uint8_t channel); void ledcDetachPin(uint8_t pin); -double ledcChangeFrequency(uint8_t channel, double freq, uint8_t resolution_bits); +uint32_t ledcChangeFrequency(uint8_t channel, uint32_t freq, uint8_t resolution_bits); #ifdef __cplusplus diff --git a/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino b/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino index 515391c9785..0e268b4fefa 100644 --- a/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino +++ b/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino @@ -6,22 +6,35 @@ // Ensure ESP32 Wrover Module or other board with PSRAM is selected // Partial images will be transmitted if image exceeds buffer size // +// You must select partition scheme from the board menu that has at least 3MB APP space. +// Face Recognition is DISABLED for ESP32 and ESP32-S2, because it takes up from 15 +// seconds to process single frame. Face Detection is ENABLED if PSRAM is enabled as well +// =================== // Select camera model -#define CAMERA_MODEL_WROVER_KIT // Has PSRAM +// =================== +//#define CAMERA_MODEL_WROVER_KIT // Has PSRAM //#define CAMERA_MODEL_ESP_EYE // Has PSRAM +//#define CAMERA_MODEL_ESP32S3_EYE // Has PSRAM //#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM //#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM //#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM //#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM //#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM -//#define CAMERA_MODEL_AI_THINKER // Has PSRAM +#define CAMERA_MODEL_AI_THINKER // Has PSRAM //#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM +// ** Espressif Internal Boards ** +//#define CAMERA_MODEL_ESP32_CAM_BOARD +//#define CAMERA_MODEL_ESP32S2_CAM_BOARD +//#define CAMERA_MODEL_ESP32S3_CAM_LCD #include "camera_pins.h" -const char* ssid = "*********"; -const char* password = "*********"; +// =========================== +// Enter your WiFi credentials +// =========================== +const char* ssid = "**********"; +const char* password = "**********"; void startCameraServer(); @@ -50,19 +63,32 @@ void setup() { config.pin_pwdn = PWDN_GPIO_NUM; config.pin_reset = RESET_GPIO_NUM; config.xclk_freq_hz = 20000000; - config.pixel_format = PIXFORMAT_JPEG; + config.frame_size = FRAMESIZE_UXGA; + config.pixel_format = PIXFORMAT_JPEG; // for streaming + //config.pixel_format = PIXFORMAT_RGB565; // for face detection/recognition + config.grab_mode = CAMERA_GRAB_WHEN_EMPTY; + config.fb_location = CAMERA_FB_IN_PSRAM; + config.jpeg_quality = 12; + config.fb_count = 1; // if PSRAM IC present, init with UXGA resolution and higher JPEG quality // for larger pre-allocated frame buffer. - if(psramFound()){ - config.frame_size = FRAMESIZE_UXGA; - config.jpeg_quality = 10; - config.fb_count = 2; + if(config.pixel_format == PIXFORMAT_JPEG){ + if(psramFound()){ + config.jpeg_quality = 10; + config.fb_count = 2; + config.grab_mode = CAMERA_GRAB_LATEST; + } else { + // Limit the frame size when PSRAM is not available + config.frame_size = FRAMESIZE_SVGA; + config.fb_location = CAMERA_FB_IN_DRAM; + } } else { - config.frame_size = FRAMESIZE_SVGA; - config.jpeg_quality = 12; - config.fb_count = 1; - config.fb_location = CAMERA_FB_IN_DRAM; + // Best option for face detection/recognition + config.frame_size = FRAMESIZE_240X240; +#if CONFIG_IDF_TARGET_ESP32S3 + config.fb_count = 2; +#endif } #if defined(CAMERA_MODEL_ESP_EYE) @@ -85,14 +111,21 @@ void setup() { s->set_saturation(s, -2); // lower the saturation } // drop down frame size for higher initial frame rate - s->set_framesize(s, FRAMESIZE_QVGA); + if(config.pixel_format == PIXFORMAT_JPEG){ + s->set_framesize(s, FRAMESIZE_QVGA); + } #if defined(CAMERA_MODEL_M5STACK_WIDE) || defined(CAMERA_MODEL_M5STACK_ESP32CAM) s->set_vflip(s, 1); s->set_hmirror(s, 1); #endif +#if defined(CAMERA_MODEL_ESP32S3_EYE) + s->set_vflip(s, 1); +#endif + WiFi.begin(ssid, password); + WiFi.setSleep(false); while (WiFi.status() != WL_CONNECTED) { delay(500); @@ -109,6 +142,6 @@ void setup() { } void loop() { - // put your main code here, to run repeatedly: + // Do nothing. Everything is done in another task by the web server delay(10000); } diff --git a/libraries/ESP32/examples/Camera/CameraWebServer/app_httpd.cpp b/libraries/ESP32/examples/Camera/CameraWebServer/app_httpd.cpp index 420d5251224..79ff0ba6aa1 100644 --- a/libraries/ESP32/examples/Camera/CameraWebServer/app_httpd.cpp +++ b/libraries/ESP32/examples/Camera/CameraWebServer/app_httpd.cpp @@ -28,14 +28,37 @@ static const char *TAG = "camera_httpd"; #endif +// Face Detection will not work on boards without (or with disabled) PSRAM +#ifdef BOARD_HAS_PSRAM +#define CONFIG_ESP_FACE_DETECT_ENABLED 1 +// Face Recognition takes upward from 15 seconds per frame on chips other than ESP32S3 +// Makes no sense to have it enabled for them +#if CONFIG_IDF_TARGET_ESP32S3 +#define CONFIG_ESP_FACE_RECOGNITION_ENABLED 1 +#else +#define CONFIG_ESP_FACE_RECOGNITION_ENABLED 0 +#endif +#else +#define CONFIG_ESP_FACE_DETECT_ENABLED 0 +#define CONFIG_ESP_FACE_RECOGNITION_ENABLED 0 +#endif + #if CONFIG_ESP_FACE_DETECT_ENABLED -#include "fd_forward.h" +#include +#include "human_face_detect_msr01.hpp" +#include "human_face_detect_mnp01.hpp" + +#define TWO_STAGE 1 /* very large firmware, very slow, reboots when streaming... -#define ENROLL_CONFIRM_TIMES 5 #define FACE_ID_SAVE_NUMBER 7 #endif @@ -77,12 +100,24 @@ httpd_handle_t camera_httpd = NULL; static int8_t detection_enabled = 0; -static mtmn_config_t mtmn_config = {0}; +// #if TWO_STAGE +// static HumanFaceDetectMSR01 s1(0.1F, 0.5F, 10, 0.2F); +// static HumanFaceDetectMNP01 s2(0.5F, 0.3F, 5); +// #else +// static HumanFaceDetectMSR01 s1(0.3F, 0.5F, 10, 0.2F); +// #endif #if CONFIG_ESP_FACE_RECOGNITION_ENABLED static int8_t recognition_enabled = 0; static int8_t is_enrolling = 0; -static face_id_list id_list = {0}; + +#if QUANT_TYPE + // S16 model + FaceRecognition112V1S16 recognizer; +#else + // S8 model + FaceRecognition112V1S8 recognizer; +#endif #endif #endif @@ -133,18 +168,12 @@ static int ra_filter_run(ra_filter_t *filter, int value) #if CONFIG_ESP_FACE_DETECT_ENABLED #if CONFIG_ESP_FACE_RECOGNITION_ENABLED -static void rgb_print(dl_matrix3du_t *image_matrix, uint32_t color, const char *str) +static void rgb_print(fb_data_t *fb, uint32_t color, const char *str) { - fb_data_t fb; - fb.width = image_matrix->w; - fb.height = image_matrix->h; - fb.data = image_matrix->item; - fb.bytes_per_pixel = 3; - fb.format = FB_BGR888; - fb_gfx_print(&fb, (fb.width - (strlen(str) * 14)) / 2, 10, color, str); + fb_gfx_print(fb, (fb->width - (strlen(str) * 14)) / 2, 10, color, str); } -static int rgb_printf(dl_matrix3du_t *image_matrix, uint32_t color, const char *format, ...) +static int rgb_printf(fb_data_t *fb, uint32_t color, const char *format, ...) { char loc_buf[64]; char *temp = loc_buf; @@ -165,7 +194,7 @@ static int rgb_printf(dl_matrix3du_t *image_matrix, uint32_t color, const char * } vsnprintf(temp, len + 1, format, arg); va_end(arg); - rgb_print(image_matrix, color, temp); + rgb_print(fb, color, temp); if (len > 64) { free(temp); @@ -173,9 +202,9 @@ static int rgb_printf(dl_matrix3du_t *image_matrix, uint32_t color, const char * return len; } #endif -static void draw_face_boxes(dl_matrix3du_t *image_matrix, box_array_t *boxes, int face_id) +static void draw_face_boxes(fb_data_t *fb, std::list *results, int face_id) { - int x, y, w, h, i; + int x, y, w, h; uint32_t color = FACE_COLOR_YELLOW; if (face_id < 0) { @@ -185,89 +214,64 @@ static void draw_face_boxes(dl_matrix3du_t *image_matrix, box_array_t *boxes, in { color = FACE_COLOR_GREEN; } - fb_data_t fb; - fb.width = image_matrix->w; - fb.height = image_matrix->h; - fb.data = image_matrix->item; - fb.bytes_per_pixel = 3; - fb.format = FB_BGR888; - for (i = 0; i < boxes->len; i++) + if(fb->bytes_per_pixel == 2){ + //color = ((color >> 8) & 0xF800) | ((color >> 3) & 0x07E0) | (color & 0x001F); + color = ((color >> 16) & 0x001F) | ((color >> 3) & 0x07E0) | ((color << 8) & 0xF800); + } + int i = 0; + for (std::list::iterator prediction = results->begin(); prediction != results->end(); prediction++, i++) { // rectangle box - x = (int)boxes->box[i].box_p[0]; - y = (int)boxes->box[i].box_p[1]; - w = (int)boxes->box[i].box_p[2] - x + 1; - h = (int)boxes->box[i].box_p[3] - y + 1; - fb_gfx_drawFastHLine(&fb, x, y, w, color); - fb_gfx_drawFastHLine(&fb, x, y + h - 1, w, color); - fb_gfx_drawFastVLine(&fb, x, y, h, color); - fb_gfx_drawFastVLine(&fb, x + w - 1, y, h, color); -#if 0 - // landmark + x = (int)prediction->box[0]; + y = (int)prediction->box[1]; + w = (int)prediction->box[2] - x + 1; + h = (int)prediction->box[3] - y + 1; + if((x + w) > fb->width){ + w = fb->width - x; + } + if((y + h) > fb->height){ + h = fb->height - y; + } + fb_gfx_drawFastHLine(fb, x, y, w, color); + fb_gfx_drawFastHLine(fb, x, y + h - 1, w, color); + fb_gfx_drawFastVLine(fb, x, y, h, color); + fb_gfx_drawFastVLine(fb, x + w - 1, y, h, color); +#if TWO_STAGE + // landmarks (left eye, mouth left, nose, right eye, mouth right) int x0, y0, j; for (j = 0; j < 10; j+=2) { - x0 = (int)boxes->landmark[i].landmark_p[j]; - y0 = (int)boxes->landmark[i].landmark_p[j+1]; - fb_gfx_fillRect(&fb, x0, y0, 3, 3, color); + x0 = (int)prediction->keypoint[j]; + y0 = (int)prediction->keypoint[j+1]; + fb_gfx_fillRect(fb, x0, y0, 3, 3, color); } #endif } } #if CONFIG_ESP_FACE_RECOGNITION_ENABLED -static int run_face_recognition(dl_matrix3du_t *image_matrix, box_array_t *net_boxes) +static int run_face_recognition(fb_data_t *fb, std::list *results) { - dl_matrix3du_t *aligned_face = NULL; - int matched_id = 0; + std::vector landmarks = results->front().keypoint; + int id = -1; - aligned_face = dl_matrix3du_alloc(1, FACE_WIDTH, FACE_HEIGHT, 3); - if (!aligned_face) - { - ESP_LOGE(TAG, "Could not allocate face recognition buffer"); - return matched_id; - } - if (align_face(net_boxes, image_matrix, aligned_face) == ESP_OK) - { - if (is_enrolling == 1) - { - int8_t left_sample_face = enroll_face(&id_list, aligned_face); + Tensor tensor; + tensor.set_element((uint8_t *)fb->data).set_shape({fb->height, fb->width, 3}).set_auto_free(false); - if (left_sample_face == (ENROLL_CONFIRM_TIMES - 1)) - { - ESP_LOGD(TAG, "Enrolling Face ID: %d", id_list.tail); - } - ESP_LOGD(TAG, "Enrolling Face ID: %d sample %d", id_list.tail, ENROLL_CONFIRM_TIMES - left_sample_face); - rgb_printf(image_matrix, FACE_COLOR_CYAN, "ID[%u] Sample[%u]", id_list.tail, ENROLL_CONFIRM_TIMES - left_sample_face); - if (left_sample_face == 0) - { - is_enrolling = 0; - ESP_LOGD(TAG, "Enrolled Face ID: %d", id_list.tail); - } - } - else - { - matched_id = recognize_face(&id_list, aligned_face); - if (matched_id >= 0) - { - ESP_LOGW(TAG, "Match Face ID: %u", matched_id); - rgb_printf(image_matrix, FACE_COLOR_GREEN, "Hello Subject %u", matched_id); - } - else - { - ESP_LOGW(TAG, "No Match Found"); - rgb_print(image_matrix, FACE_COLOR_RED, "Intruder Alert!"); - matched_id = -1; - } - } - } - else - { - ESP_LOGW(TAG, "Face Not Aligned"); - //rgb_print(image_matrix, FACE_COLOR_YELLOW, "Human Detected"); + int enrolled_count = recognizer.get_enrolled_id_num(); + + if (enrolled_count < FACE_ID_SAVE_NUMBER && is_enrolling){ + id = recognizer.enroll_id(tensor, landmarks, "", true); + ESP_LOGI(TAG, "Enrolled ID: %d", id); + rgb_printf(fb, FACE_COLOR_CYAN, "ID[%u]", id); } - dl_matrix3du_free(aligned_face); - return matched_id; + face_info_t recognize = recognizer.recognize(tensor, landmarks); + if(recognize.id >= 0){ + rgb_printf(fb, FACE_COLOR_GREEN, "ID[%u]: %.2f", recognize.id, recognize.similarity); + } else { + rgb_print(fb, FACE_COLOR_RED, "Intruder Alert!"); + } + return recognize.id; } #endif #endif @@ -398,55 +402,88 @@ static esp_err_t capture_handler(httpd_req_t *req) #if CONFIG_ESP_FACE_DETECT_ENABLED } - dl_matrix3du_t *image_matrix = dl_matrix3du_alloc(1, fb->width, fb->height, 3); - if (!image_matrix) - { - esp_camera_fb_return(fb); - ESP_LOGE(TAG, "dl_matrix3du_alloc failed"); - httpd_resp_send_500(req); - return ESP_FAIL; - } - - out_buf = image_matrix->item; - out_len = fb->width * fb->height * 3; - out_width = fb->width; - out_height = fb->height; + jpg_chunking_t jchunk = {req, 0}; - s = fmt2rgb888(fb->buf, fb->len, fb->format, out_buf); - esp_camera_fb_return(fb); - if (!s) + if (fb->format == PIXFORMAT_RGB565 +#if CONFIG_ESP_FACE_RECOGNITION_ENABLED + && !recognition_enabled +#endif + ){ +#if TWO_STAGE + HumanFaceDetectMSR01 s1(0.1F, 0.5F, 10, 0.2F); + HumanFaceDetectMNP01 s2(0.5F, 0.3F, 5); + std::list &candidates = s1.infer((uint16_t *)fb->buf, {(int)fb->height, (int)fb->width, 3}); + std::list &results = s2.infer((uint16_t *)fb->buf, {(int)fb->height, (int)fb->width, 3}, candidates); +#else + HumanFaceDetectMSR01 s1(0.3F, 0.5F, 10, 0.2F); + std::list &results = s1.infer((uint16_t *)fb->buf, {(int)fb->height, (int)fb->width, 3}); +#endif + if (results.size() > 0) { + fb_data_t rfb; + rfb.width = fb->width; + rfb.height = fb->height; + rfb.data = fb->buf; + rfb.bytes_per_pixel = 2; + rfb.format = FB_RGB565; + detected = true; + draw_face_boxes(&rfb, &results, face_id); + } + s = fmt2jpg_cb(fb->buf, fb->len, fb->width, fb->height, PIXFORMAT_RGB565, 90, jpg_encode_stream, &jchunk); + esp_camera_fb_return(fb); + } else { - dl_matrix3du_free(image_matrix); - ESP_LOGE(TAG, "to rgb888 failed"); - httpd_resp_send_500(req); - return ESP_FAIL; - } + out_len = fb->width * fb->height * 3; + out_width = fb->width; + out_height = fb->height; + out_buf = (uint8_t*)malloc(out_len); + if (!out_buf) { + ESP_LOGE(TAG, "out_buf malloc failed"); + httpd_resp_send_500(req); + return ESP_FAIL; + } + s = fmt2rgb888(fb->buf, fb->len, fb->format, out_buf); + esp_camera_fb_return(fb); + if (!s) { + free(out_buf); + ESP_LOGE(TAG, "to rgb888 failed"); + httpd_resp_send_500(req); + return ESP_FAIL; + } - box_array_t *net_boxes = face_detect(image_matrix, &mtmn_config); + fb_data_t rfb; + rfb.width = out_width; + rfb.height = out_height; + rfb.data = out_buf; + rfb.bytes_per_pixel = 3; + rfb.format = FB_BGR888; + +#if TWO_STAGE + HumanFaceDetectMSR01 s1(0.1F, 0.5F, 10, 0.2F); + HumanFaceDetectMNP01 s2(0.5F, 0.3F, 5); + std::list &candidates = s1.infer((uint8_t *)out_buf, {(int)out_height, (int)out_width, 3}); + std::list &results = s2.infer((uint8_t *)out_buf, {(int)out_height, (int)out_width, 3}, candidates); +#else + HumanFaceDetectMSR01 s1(0.3F, 0.5F, 10, 0.2F); + std::list &results = s1.infer((uint8_t *)out_buf, {(int)out_height, (int)out_width, 3}); +#endif - if (net_boxes) - { - detected = true; + if (results.size() > 0) { + detected = true; #if CONFIG_ESP_FACE_RECOGNITION_ENABLED - if (recognition_enabled) - { - face_id = run_face_recognition(image_matrix, net_boxes); - } + if (recognition_enabled) { + face_id = run_face_recognition(&rfb, &results); + } #endif - draw_face_boxes(image_matrix, net_boxes, face_id); - dl_lib_free(net_boxes->score); - dl_lib_free(net_boxes->box); - if (net_boxes->landmark != NULL) - dl_lib_free(net_boxes->landmark); - dl_lib_free(net_boxes); + draw_face_boxes(&rfb, &results, face_id); + } + + s = fmt2jpg_cb(out_buf, out_len, out_width, out_height, PIXFORMAT_RGB888, 90, jpg_encode_stream, &jchunk); + free(out_buf); } - jpg_chunking_t jchunk = {req, 0}; - s = fmt2jpg_cb(out_buf, out_len, out_width, out_height, PIXFORMAT_RGB888, 90, jpg_encode_stream, &jchunk); - dl_matrix3du_free(image_matrix); - if (!s) - { + if (!s) { ESP_LOGE(TAG, "JPEG compression failed"); + httpd_resp_send_500(req); return ESP_FAIL; } @@ -465,7 +502,6 @@ static esp_err_t stream_handler(httpd_req_t *req) uint8_t *_jpg_buf = NULL; char *part_buf[128]; #if CONFIG_ESP_FACE_DETECT_ENABLED - dl_matrix3du_t *image_matrix = NULL; bool detected = false; int face_id = 0; int64_t fr_start = 0; @@ -473,6 +509,16 @@ static esp_err_t stream_handler(httpd_req_t *req) int64_t fr_face = 0; int64_t fr_recognize = 0; int64_t fr_encode = 0; + + size_t out_len = 0, out_width = 0, out_height = 0; + uint8_t *out_buf = NULL; + bool s = false; +#if TWO_STAGE + HumanFaceDetectMSR01 s1(0.1F, 0.5F, 10, 0.2F); + HumanFaceDetectMNP01 s2(0.5F, 0.3F, 5); +#else + HumanFaceDetectMSR01 s1(0.3F, 0.5F, 10, 0.2F); +#endif #endif static int64_t last_frame = 0; @@ -541,65 +587,94 @@ static esp_err_t stream_handler(httpd_req_t *req) } else { - - image_matrix = dl_matrix3du_alloc(1, fb->width, fb->height, 3); - - if (!image_matrix) - { - ESP_LOGE(TAG, "dl_matrix3du_alloc failed"); - res = ESP_FAIL; - } - else - { - if (!fmt2rgb888(fb->buf, fb->len, fb->format, image_matrix->item)) - { - ESP_LOGE(TAG, "fmt2rgb888 failed"); + if (fb->format == PIXFORMAT_RGB565 +#if CONFIG_ESP_FACE_RECOGNITION_ENABLED + && !recognition_enabled +#endif + ){ + fr_ready = esp_timer_get_time(); +#if TWO_STAGE + std::list &candidates = s1.infer((uint16_t *)fb->buf, {(int)fb->height, (int)fb->width, 3}); + std::list &results = s2.infer((uint16_t *)fb->buf, {(int)fb->height, (int)fb->width, 3}, candidates); +#else + std::list &results = s1.infer((uint16_t *)fb->buf, {(int)fb->height, (int)fb->width, 3}); +#endif + fr_face = esp_timer_get_time(); + fr_recognize = fr_face; + if (results.size() > 0) { + fb_data_t rfb; + rfb.width = fb->width; + rfb.height = fb->height; + rfb.data = fb->buf; + rfb.bytes_per_pixel = 2; + rfb.format = FB_RGB565; + detected = true; + draw_face_boxes(&rfb, &results, face_id); + } + s = fmt2jpg(fb->buf, fb->len, fb->width, fb->height, PIXFORMAT_RGB565, 80, &_jpg_buf, &_jpg_buf_len); + esp_camera_fb_return(fb); + fb = NULL; + if (!s) { + ESP_LOGE(TAG, "fmt2jpg failed"); res = ESP_FAIL; } - else - { - fr_ready = esp_timer_get_time(); - box_array_t *net_boxes = NULL; - if (detection_enabled) - { - net_boxes = face_detect(image_matrix, &mtmn_config); - } - fr_face = esp_timer_get_time(); - fr_recognize = fr_face; - if (net_boxes || fb->format != PIXFORMAT_JPEG) - { - if (net_boxes) - { + fr_encode = esp_timer_get_time(); + } else + { + out_len = fb->width * fb->height * 3; + out_width = fb->width; + out_height = fb->height; + out_buf = (uint8_t*)malloc(out_len); + if (!out_buf) { + ESP_LOGE(TAG, "out_buf malloc failed"); + res = ESP_FAIL; + } else { + s = fmt2rgb888(fb->buf, fb->len, fb->format, out_buf); + esp_camera_fb_return(fb); + fb = NULL; + if (!s) { + free(out_buf); + ESP_LOGE(TAG, "to rgb888 failed"); + res = ESP_FAIL; + } else { + fr_ready = esp_timer_get_time(); + + fb_data_t rfb; + rfb.width = out_width; + rfb.height = out_height; + rfb.data = out_buf; + rfb.bytes_per_pixel = 3; + rfb.format = FB_BGR888; + +#if TWO_STAGE + std::list &candidates = s1.infer((uint8_t *)out_buf, {(int)out_height, (int)out_width, 3}); + std::list &results = s2.infer((uint8_t *)out_buf, {(int)out_height, (int)out_width, 3}, candidates); +#else + std::list &results = s1.infer((uint8_t *)out_buf, {(int)out_height, (int)out_width, 3}); +#endif + + fr_face = esp_timer_get_time(); + fr_recognize = fr_face; + + if (results.size() > 0) { detected = true; #if CONFIG_ESP_FACE_RECOGNITION_ENABLED - if (recognition_enabled) - { - face_id = run_face_recognition(image_matrix, net_boxes); + if (recognition_enabled) { + face_id = run_face_recognition(&rfb, &results); + fr_recognize = esp_timer_get_time(); } - fr_recognize = esp_timer_get_time(); #endif - draw_face_boxes(image_matrix, net_boxes, face_id); - dl_lib_free(net_boxes->score); - dl_lib_free(net_boxes->box); - if (net_boxes->landmark != NULL) - dl_lib_free(net_boxes->landmark); - dl_lib_free(net_boxes); + draw_face_boxes(&rfb, &results, face_id); } - if (!fmt2jpg(image_matrix->item, fb->width * fb->height * 3, fb->width, fb->height, PIXFORMAT_RGB888, 90, &_jpg_buf, &_jpg_buf_len)) - { + s = fmt2jpg(out_buf, out_len, out_width, out_height, PIXFORMAT_RGB888, 90, &_jpg_buf, &_jpg_buf_len); + free(out_buf); + if (!s) { ESP_LOGE(TAG, "fmt2jpg failed"); + res = ESP_FAIL; } - esp_camera_fb_return(fb); - fb = NULL; + fr_encode = esp_timer_get_time(); } - else - { - _jpg_buf = fb->buf; - _jpg_buf_len = fb->len; - } - fr_encode = esp_timer_get_time(); } - dl_matrix3du_free(image_matrix); } } #endif @@ -630,6 +705,7 @@ static esp_err_t stream_handler(httpd_req_t *req) } if (res != ESP_OK) { + ESP_LOGE(TAG, "send frame failed failed"); break; } int64_t fr_end = esp_timer_get_time(); @@ -784,8 +860,10 @@ static esp_err_t cmd_handler(httpd_req_t *req) #endif } #if CONFIG_ESP_FACE_RECOGNITION_ENABLED - else if (!strcmp(variable, "face_enroll")) - is_enrolling = val; + else if (!strcmp(variable, "face_enroll")){ + is_enrolling = !is_enrolling; + ESP_LOGI(TAG, "Enrolling: %s", is_enrolling?"true":"false"); + } else if (!strcmp(variable, "face_recognize")) { recognition_enabled = val; if (recognition_enabled) { @@ -1150,26 +1228,11 @@ void startCameraServer() ra_filter_init(&ra_filter, 20); -#if CONFIG_ESP_FACE_DETECT_ENABLED - - mtmn_config.type = FAST; - mtmn_config.min_face = 80; - mtmn_config.pyramid = 0.707; - mtmn_config.pyramid_times = 4; - mtmn_config.p_threshold.score = 0.6; - mtmn_config.p_threshold.nms = 0.7; - mtmn_config.p_threshold.candidate_number = 20; - mtmn_config.r_threshold.score = 0.7; - mtmn_config.r_threshold.nms = 0.7; - mtmn_config.r_threshold.candidate_number = 10; - mtmn_config.o_threshold.score = 0.7; - mtmn_config.o_threshold.nms = 0.7; - mtmn_config.o_threshold.candidate_number = 1; - #if CONFIG_ESP_FACE_RECOGNITION_ENABLED - face_id_init(&id_list, FACE_ID_SAVE_NUMBER, ENROLL_CONFIRM_TIMES); -#endif + recognizer.set_partition(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_ANY, "fr"); + // load ids from flash partition + recognizer.set_ids_from_flash(); #endif ESP_LOGI(TAG, "Starting web server on port: '%d'", config.server_port); if (httpd_start(&camera_httpd, &config) == ESP_OK) diff --git a/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h b/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h index 8b7e1d88c5a..e1be287fc53 100644 --- a/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h +++ b/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h @@ -170,6 +170,104 @@ #define HREF_GPIO_NUM 26 #define PCLK_GPIO_NUM 21 + +#elif defined(CAMERA_MODEL_ESP32_CAM_BOARD) +// The 18 pin header on the board has Y5 and Y3 swapped +#define USE_BOARD_HEADER 0 +#define PWDN_GPIO_NUM 32 +#define RESET_GPIO_NUM 33 +#define XCLK_GPIO_NUM 4 +#define SIOD_GPIO_NUM 18 +#define SIOC_GPIO_NUM 23 + +#define Y9_GPIO_NUM 36 +#define Y8_GPIO_NUM 19 +#define Y7_GPIO_NUM 21 +#define Y6_GPIO_NUM 39 +#if USE_BOARD_HEADER +#define Y5_GPIO_NUM 13 +#else +#define Y5_GPIO_NUM 35 +#endif +#define Y4_GPIO_NUM 14 +#if USE_BOARD_HEADER +#define Y3_GPIO_NUM 35 +#else +#define Y3_GPIO_NUM 13 +#endif +#define Y2_GPIO_NUM 34 +#define VSYNC_GPIO_NUM 5 +#define HREF_GPIO_NUM 27 +#define PCLK_GPIO_NUM 25 + +#elif defined(CAMERA_MODEL_ESP32S3_CAM_LCD) +#define PWDN_GPIO_NUM -1 +#define RESET_GPIO_NUM -1 +#define XCLK_GPIO_NUM 40 +#define SIOD_GPIO_NUM 17 +#define SIOC_GPIO_NUM 18 + +#define Y9_GPIO_NUM 39 +#define Y8_GPIO_NUM 41 +#define Y7_GPIO_NUM 42 +#define Y6_GPIO_NUM 12 +#define Y5_GPIO_NUM 3 +#define Y4_GPIO_NUM 14 +#define Y3_GPIO_NUM 47 +#define Y2_GPIO_NUM 13 +#define VSYNC_GPIO_NUM 21 +#define HREF_GPIO_NUM 38 +#define PCLK_GPIO_NUM 11 + +#elif defined(CAMERA_MODEL_ESP32S2_CAM_BOARD) +// The 18 pin header on the board has Y5 and Y3 swapped +#define USE_BOARD_HEADER 0 +#define PWDN_GPIO_NUM 1 +#define RESET_GPIO_NUM 2 +#define XCLK_GPIO_NUM 42 +#define SIOD_GPIO_NUM 41 +#define SIOC_GPIO_NUM 18 + +#define Y9_GPIO_NUM 16 +#define Y8_GPIO_NUM 39 +#define Y7_GPIO_NUM 40 +#define Y6_GPIO_NUM 15 +#if USE_BOARD_HEADER +#define Y5_GPIO_NUM 12 +#else +#define Y5_GPIO_NUM 13 +#endif +#define Y4_GPIO_NUM 5 +#if USE_BOARD_HEADER +#define Y3_GPIO_NUM 13 +#else +#define Y3_GPIO_NUM 12 +#endif +#define Y2_GPIO_NUM 14 +#define VSYNC_GPIO_NUM 38 +#define HREF_GPIO_NUM 4 +#define PCLK_GPIO_NUM 3 + +#elif defined(CAMERA_MODEL_ESP32S3_EYE) +#define PWDN_GPIO_NUM -1 +#define RESET_GPIO_NUM -1 +#define XCLK_GPIO_NUM 15 +#define SIOD_GPIO_NUM 4 +#define SIOC_GPIO_NUM 5 + +#define Y2_GPIO_NUM 11 +#define Y3_GPIO_NUM 9 +#define Y4_GPIO_NUM 8 +#define Y5_GPIO_NUM 10 +#define Y6_GPIO_NUM 12 +#define Y7_GPIO_NUM 18 +#define Y8_GPIO_NUM 17 +#define Y9_GPIO_NUM 16 + +#define VSYNC_GPIO_NUM 6 +#define HREF_GPIO_NUM 7 +#define PCLK_GPIO_NUM 13 + #else #error "Camera model not selected" #endif diff --git a/libraries/ESP32/examples/Camera/CameraWebServer/partitions.csv b/libraries/ESP32/examples/Camera/CameraWebServer/partitions.csv new file mode 100644 index 00000000000..4f76ca6d746 --- /dev/null +++ b/libraries/ESP32/examples/Camera/CameraWebServer/partitions.csv @@ -0,0 +1,5 @@ +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x9000, 0x5000, +otadata, data, ota, 0xe000, 0x2000, +app0, app, ota_0, 0x10000, 0x3d0000, +fr, data, , 0x3e0000, 0x20000, diff --git a/platform.txt b/platform.txt index 2f4507c353a..d587ee9e6c6 100644 --- a/platform.txt +++ b/platform.txt @@ -27,12 +27,12 @@ compiler.prefix={build.tarch}-{build.target}-elf- # # ESP32 Support Start # -compiler.cpreprocessor.flags.esp32=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-367-gc29343eb94" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32" "-I{compiler.sdk.path}/include/soc/esp32/include" "-I{compiler.sdk.path}/include/hal/esp32/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32" "-I{compiler.sdk.path}/include/esp_rom/esp32" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/esp32/include" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" +compiler.cpreprocessor.flags.esp32=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4.1-1-gb8050b365e" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32" "-I{compiler.sdk.path}/include/soc/esp32/include" "-I{compiler.sdk.path}/include/hal/esp32/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32" "-I{compiler.sdk.path}/include/esp_rom/esp32" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/esp32/include" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" compiler.c.elf.libs.esp32=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lperfmon -lspiffs -lulp -lwifi_provisioning -lbutton -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lqrcode -lws2812_led -lesp-dsp -lesp-sr -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lesp_rainmaker -lesp_local_ctrl -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -lrmaker_common -lmqtt -ljson_parser -ljson_generator -lesp_schedule -lqrcode -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lwakenet -lmultinet -lesp_audio_processor -lesp_audio_front_end -lesp-sr -lwakenet -lmultinet -lesp_audio_processor -lesp_audio_front_end -ljson -lspiffs -ldl_lib -lc_speech_features -lhilexin_wn5 -lhilexin_wn5X2 -lhilexin_wn5X3 -lnihaoxiaozhi_wn5 -lnihaoxiaozhi_wn5X2 -lnihaoxiaozhi_wn5X3 -lnihaoxiaoxin_wn5X3 -lcustomized_word_wn5 -lmultinet2_ch -lesp_tts_chinese -lvoice_set_xiaole -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lrtc -lesp_phy -lphy -lrtc -lesp_phy -lphy -lrtc -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc compiler.c.flags.esp32=-mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -MMD -c compiler.cpp.flags.esp32=-mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fexceptions -fno-rtti -MMD -c compiler.S.flags.esp32=-ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -x assembler-with-cpp -MMD -c -compiler.c.elf.flags.esp32=-T esp32.rom.redefined.ld -T memory.ld -T sections.ld -T esp32.rom.ld -T esp32.rom.api.ld -T esp32.rom.libgcc.ld -T esp32.rom.newlib-data.ld -T esp32.rom.syscalls.ld -T esp32.peripherals.ld -mlongcalls -Wno-frame-address -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u ld_include_hli_vectors_bt -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u ld_include_highint_hdl -u start_app -u start_app_other_cores -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy +compiler.c.elf.flags.esp32=-T esp32.rom.redefined.ld -T memory.ld -T sections.ld -T esp32.rom.ld -T esp32.rom.api.ld -T esp32.rom.libgcc.ld -T esp32.rom.newlib-data.ld -T esp32.rom.syscalls.ld -T esp32.peripherals.ld -mlongcalls -Wno-frame-address -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u ld_include_hli_vectors_bt -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u include_esp_phy_override -u ld_include_highint_hdl -u start_app -u start_app_other_cores -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy compiler.ar.flags.esp32=cr build.extra_flags.esp32=-DARDUINO_USB_CDC_ON_BOOT=0 # @@ -42,12 +42,12 @@ build.extra_flags.esp32=-DARDUINO_USB_CDC_ON_BOOT=0 # # ESP32S3 Support Start # -compiler.cpreprocessor.flags.esp32s3=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-367-gc29343eb94" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32s3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s3/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32s3" "-I{compiler.sdk.path}/include/soc/esp32s3/include" "-I{compiler.sdk.path}/include/hal/esp32s3/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32s3" "-I{compiler.sdk.path}/include/esp_rom/esp32s3" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32s3/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s3/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32s3/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32s3/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32s3" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32s3/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/tinycrypt/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/storage" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/btc/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/client/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/server/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/models/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32s3" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/usb/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/freertos/include/freertos" "-I{compiler.sdk.path}/include/arduino_tinyusb/tinyusb/src" "-I{compiler.sdk.path}/include/arduino_tinyusb/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32s3" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" +compiler.cpreprocessor.flags.esp32s3=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4.1-1-gb8050b365e" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32s3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s3/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32s3" "-I{compiler.sdk.path}/include/soc/esp32s3/include" "-I{compiler.sdk.path}/include/hal/esp32s3/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32s3" "-I{compiler.sdk.path}/include/esp_rom/esp32s3" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32s3/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s3/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32s3/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32s3/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32s3" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32s3/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/tinycrypt/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/storage" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/btc/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/client/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/server/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/models/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32s3" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/usb/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/freertos/include/freertos" "-I{compiler.sdk.path}/include/arduino_tinyusb/tinyusb/src" "-I{compiler.sdk.path}/include/arduino_tinyusb/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32s3" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" compiler.c.elf.libs.esp32s3=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lperfmon -lspiffs -lusb -lulp -lwifi_provisioning -lbutton -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lqrcode -lws2812_led -lesp-dsp -lesp-sr -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lusb -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lesp_rainmaker -lesp_local_ctrl -lesp_https_server -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -lrmaker_common -lmqtt -ljson_parser -ljson_generator -lesp_schedule -lqrcode -larduino_tinyusb -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lwakenet -lhufzip -lesp_audio_front_end -lesp_audio_processor -lmultinet -lesp-sr -lwakenet -lhufzip -lesp_audio_front_end -lesp_audio_processor -lmultinet -ljson -lspiffs -ldl_lib -lc_speech_features -lesp_tts_chinese -lvoice_set_xiaole -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lbtbb -lesp_phy -lphy -lbtbb -lesp_phy -lphy -lbtbb -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc compiler.c.flags.esp32s3=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -MMD -c compiler.cpp.flags.esp32s3=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fexceptions -fno-rtti -MMD -c compiler.S.flags.esp32s3=-ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -x assembler-with-cpp -MMD -c -compiler.c.elf.flags.esp32s3=-T memory.ld -T sections.ld -T esp32s3.rom.ld -T esp32s3.rom.api.ld -T esp32s3.rom.libgcc.ld -T esp32s3.rom.newlib.ld -T esp32s3.rom.version.ld -T esp32s3.rom.newlib-time.ld -T esp32s3.peripherals.ld -mlongcalls -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u ld_include_highint_hdl -u start_app -u start_app_other_cores -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy +compiler.c.elf.flags.esp32s3=-T memory.ld -T sections.ld -T esp32s3.rom.ld -T esp32s3.rom.api.ld -T esp32s3.rom.libgcc.ld -T esp32s3.rom.newlib.ld -T esp32s3.rom.version.ld -T esp32s3.rom.newlib-time.ld -T esp32s3.peripherals.ld -mlongcalls -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u include_esp_phy_override -u ld_include_highint_hdl -u start_app -u start_app_other_cores -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy compiler.ar.flags.esp32s3=cr build.extra_flags.esp32s3=-DARDUINO_USB_MODE={build.usb_mode} -DARDUINO_USB_CDC_ON_BOOT={build.cdc_on_boot} -DARDUINO_USB_MSC_ON_BOOT={build.msc_on_boot} -DARDUINO_USB_DFU_ON_BOOT={build.dfu_on_boot} # @@ -57,12 +57,12 @@ build.extra_flags.esp32s3=-DARDUINO_USB_MODE={build.usb_mode} -DARDUINO_USB_CDC_ # # ESP32S2 Support Start # -compiler.cpreprocessor.flags.esp32s2=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-367-gc29343eb94" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32s2" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s2" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s2/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32s2" "-I{compiler.sdk.path}/include/soc/esp32s2/include" "-I{compiler.sdk.path}/include/hal/esp32s2/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32s2" "-I{compiler.sdk.path}/include/esp_rom/esp32s2" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32s2/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s2/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32s2/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32s2/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32s2" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32s2" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/usb/include" "-I{compiler.sdk.path}/include/touch_element/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/freertos/include/freertos" "-I{compiler.sdk.path}/include/arduino_tinyusb/tinyusb/src" "-I{compiler.sdk.path}/include/arduino_tinyusb/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" +compiler.cpreprocessor.flags.esp32s2=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4.1-1-gb8050b365e" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32s2" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s2" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s2/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32s2" "-I{compiler.sdk.path}/include/soc/esp32s2/include" "-I{compiler.sdk.path}/include/hal/esp32s2/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32s2" "-I{compiler.sdk.path}/include/esp_rom/esp32s2" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32s2/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s2/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32s2/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32s2/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32s2" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32s2" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/usb/include" "-I{compiler.sdk.path}/include/touch_element/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/freertos/include/freertos" "-I{compiler.sdk.path}/include/arduino_tinyusb/tinyusb/src" "-I{compiler.sdk.path}/include/arduino_tinyusb/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" compiler.c.elf.libs.esp32s2=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lperfmon -lspiffs -lusb -ltouch_element -lulp -lwifi_provisioning -lbutton -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lqrcode -lws2812_led -lesp-dsp -lesp-sr -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lusb -ltouch_element -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lesp_rainmaker -lesp_local_ctrl -lesp_https_server -lwifi_provisioning -lprotocomm -lprotobuf-c -lmdns -lrmaker_common -lmqtt -ljson_parser -ljson_generator -lesp_schedule -lqrcode -larduino_tinyusb -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -ljson -lspiffs -lesp_tts_chinese -lvoice_set_xiaole -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lesp_phy -lphy -lesp_phy -lphy -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc compiler.c.flags.esp32s2=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -MMD -c compiler.cpp.flags.esp32s2=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fexceptions -fno-rtti -MMD -c compiler.S.flags.esp32s2=-ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -x assembler-with-cpp -MMD -c -compiler.c.elf.flags.esp32s2=-T memory.ld -T sections.ld -T esp32s2.rom.ld -T esp32s2.rom.api.ld -T esp32s2.rom.libgcc.ld -T esp32s2.rom.newlib-funcs.ld -T esp32s2.rom.newlib-data.ld -T esp32s2.rom.spiflash.ld -T esp32s2.rom.newlib-time.ld -T esp32s2.peripherals.ld -mlongcalls -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u ld_include_highint_hdl -u start_app -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy +compiler.c.elf.flags.esp32s2=-T memory.ld -T sections.ld -T esp32s2.rom.ld -T esp32s2.rom.api.ld -T esp32s2.rom.libgcc.ld -T esp32s2.rom.newlib-funcs.ld -T esp32s2.rom.newlib-data.ld -T esp32s2.rom.spiflash.ld -T esp32s2.rom.newlib-time.ld -T esp32s2.peripherals.ld -mlongcalls -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u include_esp_phy_override -u ld_include_highint_hdl -u start_app -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy compiler.ar.flags.esp32s2=cr build.extra_flags.esp32s2=-DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT={build.cdc_on_boot} -DARDUINO_USB_MSC_ON_BOOT={build.msc_on_boot} -DARDUINO_USB_DFU_ON_BOOT={build.dfu_on_boot} # @@ -72,12 +72,12 @@ build.extra_flags.esp32s2=-DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT={build. # # ESP32C3 Support Start # -compiler.cpreprocessor.flags.esp32c3=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-367-gc29343eb94" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/riscv/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32c3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32c3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32c3/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32c3" "-I{compiler.sdk.path}/include/soc/esp32c3/include" "-I{compiler.sdk.path}/include/hal/esp32c3/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32c3" "-I{compiler.sdk.path}/include/esp_rom/esp32c3" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/include/riscv" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/riscv/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32c3/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32c3/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32c3/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/riscv" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32c3" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/riscv" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32c3/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32c3" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/fb_gfx/include" +compiler.cpreprocessor.flags.esp32c3=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4.1-1-gb8050b365e" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/riscv/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32c3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32c3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32c3/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32c3" "-I{compiler.sdk.path}/include/soc/esp32c3/include" "-I{compiler.sdk.path}/include/hal/esp32c3/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32c3" "-I{compiler.sdk.path}/include/esp_rom/esp32c3" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/include/riscv" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/riscv/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32c3/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32c3/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32c3/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/riscv" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32c3" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/riscv" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32c3/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32c3" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/fb_gfx/include" compiler.c.elf.libs.esp32c3=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lspiffs -lwifi_provisioning -lbutton -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lqrcode -lws2812_led -lesp-dsp -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lspiffs -lesp_rainmaker -lesp_local_ctrl -lesp_https_server -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -ljson -lrmaker_common -lmqtt -ljson_parser -ljson_generator -lesp_schedule -lqrcode -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lbtbb -lesp_phy -lphy -lbtbb -lesp_phy -lphy -lbtbb -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc compiler.c.flags.esp32c3=-march=rv32imc -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Wno-error=format= -nostartfiles -Wno-format -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -MMD -c compiler.cpp.flags.esp32c3=-march=rv32imc -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Wno-error=format= -nostartfiles -Wno-format -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fexceptions -fno-rtti -MMD -c compiler.S.flags.esp32c3=-ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Wno-error=format= -nostartfiles -Wno-format -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -x assembler-with-cpp -MMD -c -compiler.c.elf.flags.esp32c3=-T memory.ld -T sections.ld -T esp32c3.rom.ld -T esp32c3.rom.api.ld -T esp32c3.rom.libgcc.ld -T esp32c3.rom.newlib.ld -T esp32c3.rom.version.ld -T esp32c3.rom.newlib-time.ld -T esp32c3.rom.eco3.ld -T esp32c3.peripherals.ld -nostartfiles -march=rv32imc --specs=nosys.specs -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u start_app -u __ubsan_include -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy +compiler.c.elf.flags.esp32c3=-T memory.ld -T sections.ld -T esp32c3.rom.ld -T esp32c3.rom.api.ld -T esp32c3.rom.libgcc.ld -T esp32c3.rom.newlib.ld -T esp32c3.rom.version.ld -T esp32c3.rom.newlib-time.ld -T esp32c3.rom.eco3.ld -T esp32c3.peripherals.ld -nostartfiles -march=rv32imc --specs=nosys.specs -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u include_esp_phy_override -u start_app -u __ubsan_include -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy compiler.ar.flags.esp32c3=cr build.extra_flags.esp32c3=-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT={build.cdc_on_boot} # diff --git a/tools/platformio-build-esp32.py b/tools/platformio-build-esp32.py index ecbad8abc0b..a77e7a079ad 100644 --- a/tools/platformio-build-esp32.py +++ b/tools/platformio-build-esp32.py @@ -100,6 +100,7 @@ "-u", "pthread_include_pthread_cond_impl", "-u", "pthread_include_pthread_local_storage_impl", "-u", "pthread_include_pthread_rwlock_impl", + "-u", "include_esp_phy_override", "-u", "ld_include_highint_hdl", "-u", "start_app", "-u", "start_app_other_cores", @@ -309,7 +310,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-367-gc29343eb94\\"'), + ("IDF_VER", '\\"v4.4.1-1-gb8050b365e\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32c3.py b/tools/platformio-build-esp32c3.py index d798838d72f..721666c9059 100644 --- a/tools/platformio-build-esp32c3.py +++ b/tools/platformio-build-esp32c3.py @@ -101,6 +101,7 @@ "-u", "pthread_include_pthread_cond_impl", "-u", "pthread_include_pthread_local_storage_impl", "-u", "pthread_include_pthread_rwlock_impl", + "-u", "include_esp_phy_override", "-u", "start_app", "-u", "__ubsan_include", "-u", "__assert_func", @@ -302,7 +303,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-367-gc29343eb94\\"'), + ("IDF_VER", '\\"v4.4.1-1-gb8050b365e\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32s2.py b/tools/platformio-build-esp32s2.py index 54a4617ffc1..9bafa646689 100644 --- a/tools/platformio-build-esp32s2.py +++ b/tools/platformio-build-esp32s2.py @@ -97,6 +97,7 @@ "-u", "pthread_include_pthread_cond_impl", "-u", "pthread_include_pthread_local_storage_impl", "-u", "pthread_include_pthread_rwlock_impl", + "-u", "include_esp_phy_override", "-u", "ld_include_highint_hdl", "-u", "start_app", "-u", "__ubsan_include", @@ -304,7 +305,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-367-gc29343eb94\\"'), + ("IDF_VER", '\\"v4.4.1-1-gb8050b365e\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32s3.py b/tools/platformio-build-esp32s3.py index 4762af61e8c..a200a78b0b5 100644 --- a/tools/platformio-build-esp32s3.py +++ b/tools/platformio-build-esp32s3.py @@ -96,6 +96,7 @@ "-u", "pthread_include_pthread_cond_impl", "-u", "pthread_include_pthread_local_storage_impl", "-u", "pthread_include_pthread_rwlock_impl", + "-u", "include_esp_phy_override", "-u", "ld_include_highint_hdl", "-u", "start_app", "-u", "start_app_other_cores", @@ -321,7 +322,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-367-gc29343eb94\\"'), + ("IDF_VER", '\\"v4.4.1-1-gb8050b365e\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/sdk/esp32/include/esp_common/include/esp_idf_version.h b/tools/sdk/esp32/include/esp_common/include/esp_idf_version.h index 7637b814b65..db04f85f90a 100644 --- a/tools/sdk/esp32/include/esp_common/include/esp_idf_version.h +++ b/tools/sdk/esp32/include/esp_common/include/esp_idf_version.h @@ -23,7 +23,7 @@ extern "C" { /** Minor version number (x.X.x) */ #define ESP_IDF_VERSION_MINOR 4 /** Patch version number (x.x.X) */ -#define ESP_IDF_VERSION_PATCH 0 +#define ESP_IDF_VERSION_PATCH 1 /** * Macro to convert IDF version number into an integer diff --git a/tools/sdk/esp32/include/esp_hw_support/port/esp32/regi2c_ctrl.h b/tools/sdk/esp32/include/esp_hw_support/port/esp32/regi2c_ctrl.h index ea2870e99b1..236e49b69e3 100644 --- a/tools/sdk/esp32/include/esp_hw_support/port/esp32/regi2c_ctrl.h +++ b/tools/sdk/esp32/include/esp_hw_support/port/esp32/regi2c_ctrl.h @@ -52,6 +52,10 @@ uint8_t regi2c_ctrl_read_reg_mask(uint8_t block, uint8_t host_id, uint8_t reg_ad void regi2c_ctrl_write_reg(uint8_t block, uint8_t host_id, uint8_t reg_add, uint8_t data); void regi2c_ctrl_write_reg_mask(uint8_t block, uint8_t host_id, uint8_t reg_add, uint8_t msb, uint8_t lsb, uint8_t data); +/* enter the critical section that protects internal registers. Don't use it in SDK. Use the functions above. */ +void regi2c_enter_critical(void); +void regi2c_exit_critical(void); + #endif // BOOTLOADER_BUILD /* Convenience macros for the above functions, these use register definitions diff --git a/tools/sdk/esp32/include/esp_littlefs/include/esp_littlefs.h b/tools/sdk/esp32/include/esp_littlefs/include/esp_littlefs.h index 7b5abe9248f..07f35231291 100644 --- a/tools/sdk/esp32/include/esp_littlefs/include/esp_littlefs.h +++ b/tools/sdk/esp32/include/esp_littlefs/include/esp_littlefs.h @@ -1,24 +1,9 @@ #ifndef ESP_LITTLEFS_H__ #define ESP_LITTLEFS_H__ -#include -#include -#include -#include -#include -#include "freertos/FreeRTOS.h" -#include "freertos/semphr.h" #include "esp_err.h" -#include -#include -#include -#include -#include -#include -#include -#include "sdkconfig.h" - #include "littlefs/lfs.h" +#include "sdkconfig.h" #ifdef __cplusplus extern "C" { diff --git a/tools/sdk/esp32/include/fb_gfx/include/fb_gfx.h b/tools/sdk/esp32/include/fb_gfx/include/fb_gfx.h index 079ff7bfe4a..158c80f6bf4 100644 --- a/tools/sdk/esp32/include/fb_gfx/include/fb_gfx.h +++ b/tools/sdk/esp32/include/fb_gfx/include/fb_gfx.h @@ -19,7 +19,7 @@ extern "C" { #endif typedef enum { - FB_RGB888, FB_BGR888, FB_RGB565, FB_BGR565 + FB_RGB888, FB_BGR888, FB_RGB565, FB_BGR565, FB_GRAY } fb_format_t; typedef struct { diff --git a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_common_events.h b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_common_events.h deleted file mode 100644 index b77f8a3d142..00000000000 --- a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_common_events.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2021 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#ifdef __cplusplus -extern "C" -{ -#endif - -/** ESP RainMaker Common Event Base */ -ESP_EVENT_DECLARE_BASE(RMAKER_COMMON_EVENT); - -typedef enum { - /** Node reboot has been triggered. The associated event data is the time in seconds - * (type: uint8_t) after which the node will reboot. Note that this time may not be - * accurate as the events are received asynchronously.*/ - RMAKER_EVENT_REBOOT, - /** Wi-Fi credentials reset. Triggered after calling esp_rmaker_wifi_reset() */ - RMAKER_EVENT_WIFI_RESET, - /** Node reset to factory defaults. Triggered after calling esp_rmaker_factory_reset() */ - RMAKER_EVENT_FACTORY_RESET, - /** Connected to MQTT Broker */ - RMAKER_MQTT_EVENT_CONNECTED, - /** Disconnected from MQTT Broker */ - RMAKER_MQTT_EVENT_DISCONNECTED, - /** MQTT message published successfully. - * Event data will contain the message ID (integer) of published message. - */ - RMAKER_MQTT_EVENT_PUBLISHED, - /** POSIX Timezone Changed. Associated data would be NULL terminated POSIX Timezone - * Eg. "PST8PDT,M3.2.0,M11.1.0" */ - RMAKER_EVENT_TZ_POSIX_CHANGED, - /** Timezone Changed. Associated data would be NULL terminated Timezone. - * Eg. "America/Los_Angeles" - * Note that whenever this event is received, the RMAKER_EVENT_TZ_POSIX_CHANGED event - * will also be received, but not necessarily vice versa. - */ - RMAKER_EVENT_TZ_CHANGED, - /** - * MQTT message deleted from the outbox if the message couldn't have been sent and acknowledged. - * Event data will contain the message ID (integer) of deleted message. - * Valid only if CONFIG_MQTT_REPORT_DELETED_MESSAGES is enabled. - */ - RMAKER_MQTT_EVENT_MSG_DELETED, -} esp_rmaker_common_event_t; -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_factory.h b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_factory.h deleted file mode 100644 index 9ef781b798b..00000000000 --- a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_factory.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2021 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Initialize Factory NVS - * - * This initializes the Factory NVS partition which will store data - * that should not be cleared even after a reset to factory. - * - * @return ESP_OK on success. - * @return error on failure. - */ -esp_err_t esp_rmaker_factory_init(void); - -/** Get value from factory NVS - * - * This will search for the specified key in the Factory NVS partition, - * allocate the required memory to hold it, copy the value and return - * the pointer to it. It is responsibility of the caller to free the - * memory when the value is no more required. - * - * @param[in] key The key of the value to be read from factory NVS. - * - * @return pointer to the value on success. - * @return NULL on failure. - */ -void *esp_rmaker_factory_get(const char *key); - -/** Set a value in factory NVS - * - * This will write the value for the specified key into factory NVS. - * - * @param[in] key The key for the value to be set in factory NVS. - * @param[in] data Pointer to the value. - * @param[in] len Length of the value. - * - * @return ESP_OK on success. - * @return error on failure. - */ -esp_err_t esp_rmaker_factory_set(const char *key, void *value, size_t len); -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_mqtt_glue.h b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_mqtt_glue.h deleted file mode 100644 index 95744bdf58c..00000000000 --- a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_mqtt_glue.h +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2021 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#ifdef __cplusplus -extern "C" -{ -#endif - -#define RMAKER_MQTT_QOS0 0 -#define RMAKER_MQTT_QOS1 1 - -/** MQTT Connection parameters */ -typedef struct { - /** MQTT Host */ - char *mqtt_host; - /** Client ID */ - char *client_id; - /** Client Certificate in NULL terminated PEM format */ - char *client_cert; - /** Client Key in NULL terminated PEM format */ - char *client_key; - /** Server Certificate in NULL terminated PEM format */ - char *server_cert; -} esp_rmaker_mqtt_conn_params_t; - -/** MQTT Get Connection Parameters function prototype - * - * @return Pointer to \ref esp_rmaker_mqtt_conn_params_t on success. - * @return NULL on failure. - */ -typedef esp_rmaker_mqtt_conn_params_t *(*esp_rmaker_mqtt_get_conn_params_t)(void); - -/** MQTT Subscribe callback prototype - * - * @param[in] topic Topic on which the message was received - * @param[in] payload Data received in the message - * @param[in] payload_len Length of the data - * @param[in] priv_data The private data passed during subscription - */ -typedef void (*esp_rmaker_mqtt_subscribe_cb_t)(const char *topic, void *payload, size_t payload_len, void *priv_data); - -/** MQTT Init function prototype - * - * @param[in] conn_params The MQTT connection parameters. If NULL is passed, it should internally use the - * \ref esp_rmaker_mqtt_get_conn_params call if registered. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -typedef esp_err_t (*esp_rmaker_mqtt_init_t)(esp_rmaker_mqtt_conn_params_t *conn_params); - -/** MQTT Deinit function prototype - * - * Call this function after MQTT has disconnected. - */ -typedef void (*esp_rmaker_mqtt_deinit_t)(void); - -/** MQTT Connect function prototype - * - * Starts the connection attempts to the MQTT broker. - * This should ideally be called after successful network connection. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -typedef esp_err_t (*esp_rmaker_mqtt_connect_t)(void); - -/** MQTT Disconnect function prototype - * - * Disconnects from the MQTT broker. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -typedef esp_err_t (*esp_rmaker_mqtt_disconnect_t)(void); - -/** MQTT Publish Message function prototype - * - * @param[in] topic The MQTT topic on which the message should be published. - * @param[in] data Data to be published. - * @param[in] data_len Length of the data. - * @param[in] qos Quality of service for the message. - * @param[out] msg_id If a non NULL pointer is passed, the id of the published message will be returned in this. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -typedef esp_err_t (*esp_rmaker_mqtt_publish_t)(const char *topic, void *data, size_t data_len, uint8_t qos, int *msg_id); - -/** MQTT Subscribe function prototype - * - * @param[in] topic The topic to be subscribed to. - * @param[in] cb The callback to be invoked when a message is received on the given topic. - * @param[in] qos Quality of service for the subscription. - * @param[in] priv_data Optional private data to be passed to the callback. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -typedef esp_err_t (*esp_rmaker_mqtt_subscribe_t)(const char *topic, esp_rmaker_mqtt_subscribe_cb_t cb, uint8_t qos, void *priv_data); - -/** MQTT Unsubscribe function prototype - * - * @param[in] topic Topic from which to unsubscribe. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -typedef esp_err_t (*esp_rmaker_mqtt_unsubscribe_t)(const char *topic); - -/** MQTT configuration */ -typedef struct { - /** Flag to indicate if the MQTT config setup is done */ - bool setup_done; - /** Pointer to the Get MQTT params function. */ - esp_rmaker_mqtt_get_conn_params_t get_conn_params; - /** Pointer to MQTT Init function. */ - esp_rmaker_mqtt_init_t init; - /** Pointer to MQTT Deinit function. */ - esp_rmaker_mqtt_deinit_t deinit; - /** Pointer to MQTT Connect function. */ - esp_rmaker_mqtt_connect_t connect; - /** Pointer to MQTQ Disconnect function */ - esp_rmaker_mqtt_disconnect_t disconnect; - /** Pointer to MQTT Publish function */ - esp_rmaker_mqtt_publish_t publish; - /** Pointer to MQTT Subscribe function */ - esp_rmaker_mqtt_subscribe_t subscribe; - /** Pointer to MQTT Unsubscribe function */ - esp_rmaker_mqtt_unsubscribe_t unsubscribe; -} esp_rmaker_mqtt_config_t; - -/** Setup MQTT Glue - * - * This function initializes MQTT glue layer with all the default functions. - * - * @param[out] mqtt_config Pointer to an allocated MQTT configuration structure. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_glue_setup(esp_rmaker_mqtt_config_t *mqtt_config); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_utils.h b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_utils.h deleted file mode 100644 index 86ab691d492..00000000000 --- a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_utils.h +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright 2021 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -#ifdef CONFIG_SPIRAM -#define MEM_ALLOC_EXTRAM(size) heap_caps_malloc(size, MALLOC_CAP_SPIRAM) -#define MEM_CALLOC_EXTRAM(num, size) heap_caps_calloc(num, size, MALLOC_CAP_SPIRAM) -#define MEM_REALLOC_EXTRAM(ptr, size) heap_caps_realloc(ptr, size, MALLOC_CAP_SPIRAM) -#else -#define MEM_ALLOC_EXTRAM(size) malloc(size) -#define MEM_CALLOC_EXTRAM(num, size) calloc(num, size) -#define MEM_REALLOC_EXTRAM(ptr, size) realloc(ptr, size) -#endif - -typedef struct esp_rmaker_time_config { - /** If not specified, then 'CONFIG_ESP_RMAKER_SNTP_SERVER_NAME' is used as the SNTP server. */ - char *sntp_server_name; - /** Optional callback to invoke, whenever time is synchronised. This will be called - * periodically as per the SNTP polling interval (which is 60min by default). - * If kept NULL, the default callback will be invoked, which will just print the - * current local time. - */ - sntp_sync_time_cb_t sync_time_cb; -} esp_rmaker_time_config_t; - -/** Reboot the device after a delay - * - * This API just starts a reboot timer and returns immediately. - * The actual reboot is trigerred asynchronously in the timer callback. - * This is useful if you want to reboot after a delay, to allow other tasks to finish - * their operations (Eg. MQTT publish to indicate OTA success). The \ref RMAKER_EVENT_REBOOT - * event is triggered when the reboot timer is started. - * - * @param[in] seconds Time in seconds after which the device should reboot. - * - * @return ESP_OK on success. - * @return error on failure. - */ -esp_err_t esp_rmaker_reboot(int8_t seconds); - -/** Reset Wi-Fi credentials and (optionally) reboot - * - * This will reset just the Wi-Fi credentials and (optionally) trigger a reboot. - * This is useful when you want to keep all the entries in NVS memory - * intact, but just change the Wi-Fi credentials. The \ref RMAKER_EVENT_WIFI_RESET - * event is triggered when this API is called. The actual reset will happen after a - * delay if reset_seconds is not zero. - * - * @note This reset and reboot operations will happen asynchronously depending - * on the values passed to the API. - * - * @param[in] reset_seconds Time in seconds after which the reset should get triggered. - * This will help other modules take some actions before the device actually resets. - * If set to zero, the operation would be performed immediately. - * @param[in] reboot_seconds Time in seconds after which the device should reboot. If set - * to negative value, the device will not reboot at all. - * - * @return ESP_OK on success. - * @return error on failure. - */ -esp_err_t esp_rmaker_wifi_reset(int8_t reset_seconds, int8_t reboot_seconds); - -/** Reset to factory defaults and reboot - * - * This will clear entire NVS partition and (optionally) trigger a reboot. - * The \ref RMAKER_EVENT_FACTORY_RESET event is triggered when this API is called. - * The actual reset will happen after a delay if reset_seconds is not zero. - * - * @note This reset and reboot operations will happen asynchronously depending - * on the values passed to the API. - * - * @param[in] reset_seconds Time in seconds after which the reset should get triggered. - * This will help other modules take some actions before the device actually resets. - * If set to zero, the operation would be performed immediately. - * @param[in] reboot_seconds Time in seconds after which the device should reboot. If set - * to negative value, the device will not reboot at all. - * - * @return ESP_OK on success. - * @return error on failure. - */ -esp_err_t esp_rmaker_factory_reset(int8_t reset_seconds, int8_t reboot_seconds); - -/** Initialize time synchronization - * - * This API initializes SNTP for time synchronization. - * - * @param[in] config Configuration to be used for SNTP time synchronization. The default configuration is used if NULL is passed. - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_time_sync_init(esp_rmaker_time_config_t *config); - -/** Check if current time is updated - * - * This API checks if the current system time is updated against the reference time of 1-Jan-2019. - * - * @return true if time is updated - * @return false if time is not updated - */ -bool esp_rmaker_time_check(void); - -/** Wait for time synchronization - * - * This API waits for the system time to be updated against the reference time of 1-Jan-2019. - * This is a blocking call. - * - * @param[in] ticks_to_wait Number of ticks to wait for time synchronization. Accepted values: 0 to portMAX_DELAY. - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_time_wait_for_sync(uint32_t ticks_to_wait); - -/** Set POSIX timezone - * - * Set the timezone (TZ environment variable) as per the POSIX format - * specified in the [GNU libc documentation](https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html). - * Eg. For China: "CST-8" - * For US Pacific Time (including daylight saving information): "PST8PDT,M3.2.0,M11.1.0" - * - * @param[in] tz_posix NULL terminated TZ POSIX string - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_time_set_timezone_posix(const char *tz_posix); - -/** Set timezone location string - * - * Set the timezone as a user friendly location string. - * Check [here](https://rainmaker.espressif.com/docs/time-service.html) for a list of valid values. - * - * Eg. For China: "Asia/Shanghai" - * For US Pacific Time: "America/Los_Angeles" - * - * @note Setting timezone using this API internally also sets the POSIX timezone string. - * - * @param[in] tz NULL terminated Timezone location string - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_time_set_timezone(const char *tz); - -/** Get the current POSIX timezone - * - * This fetches the current timezone in POSIX format, read from NVS. - * - * @return Pointer to a NULL terminated POSIX timezone string on success. - * Freeing this is the responsibility of the caller. - * @return NULL on failure. - */ -char *esp_rmaker_time_get_timezone_posix(void); - -/** Get the current timezone - * - * This fetches the current timezone in POSIX format, read from NVS. - * - * @return Pointer to a NULL terminated timezone string on success. - * Freeing this is the responsibility of the caller. - * @return NULL on failure. - */ -char *esp_rmaker_time_get_timezone(void); - -/** Get printable local time string - * - * Get a printable local time string, with information of timezone and Daylight Saving. - * Eg. "Tue Sep 1 09:04:38 2020 -0400[EDT], DST: Yes" - * "Tue Sep 1 21:04:04 2020 +0800[CST], DST: No" - * - * - * @param[out] buf Pointer to a pre-allocated buffer into which the time string will - * be populated. - * @param[in] buf_len Length of the above buffer. - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_get_local_time_str(char *buf, size_t buf_len); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_work_queue.h b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_work_queue.h deleted file mode 100644 index 0e696d46848..00000000000 --- a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_work_queue.h +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2021 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#ifdef __cplusplus -extern "C" -{ -#endif -/** Prototype for ESP RainMaker Work Queue Function - * - * @param[in] priv_data The private data associated with the work function. - */ -typedef void (*esp_rmaker_work_fn_t)(void *priv_data); - -/** Initializes the Work Queue - * - * This initializes the work queue, which is basically a mechanism to run - * tasks in the context of a dedicated thread. You can start queueing tasks - * after this, but they will get executed only after calling - * esp_rmaker_work_queue_start(). - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_work_queue_init(void); - -/** De-initialize the Work Queue - * - * This de-initializes the work queue. Note that the work queue needs to - * be stopped using esp_rmaker_work_queue_stop() before calling this. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_work_queue_deinit(void); - -/** Start the Work Queue - * - * This starts the Work Queue thread which then starts executing the tasks queued. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_work_queue_start(void); - -/** Stop the Work Queue - * - * This stops a running Work Queue. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_work_queue_stop(void); - -/** Queue execution of a function in the Work Queue's context - * - * This API queues a work function for execution in the Work Queue Task's context. - * - * @param[in] work_fn The Work function to be queued. - * @param[in] priv_data Private data to be passed to the work function. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_work_queue_add_task(esp_rmaker_work_fn_t work_fn, void *priv_data); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32/lib/libapp_update.a b/tools/sdk/esp32/lib/libapp_update.a index 8de7657fcee..4b1b7b9e363 100644 Binary files a/tools/sdk/esp32/lib/libapp_update.a and b/tools/sdk/esp32/lib/libapp_update.a differ diff --git a/tools/sdk/esp32/lib/libesp_eth.a b/tools/sdk/esp32/lib/libesp_eth.a index 99da89af745..c6e24073a6c 100644 Binary files a/tools/sdk/esp32/lib/libesp_eth.a and b/tools/sdk/esp32/lib/libesp_eth.a differ diff --git a/tools/sdk/esp32/lib/libesp_littlefs.a b/tools/sdk/esp32/lib/libesp_littlefs.a index a5b93e494f4..190c285ef04 100644 Binary files a/tools/sdk/esp32/lib/libesp_littlefs.a and b/tools/sdk/esp32/lib/libesp_littlefs.a differ diff --git a/tools/sdk/esp32/lib/libesp_phy.a b/tools/sdk/esp32/lib/libesp_phy.a index 2d3117172c4..923c01151a0 100644 Binary files a/tools/sdk/esp32/lib/libesp_phy.a and b/tools/sdk/esp32/lib/libesp_phy.a differ diff --git a/tools/sdk/esp32/lib/libesp_rainmaker.a b/tools/sdk/esp32/lib/libesp_rainmaker.a index 5bd6b11fe0c..ca00c2c7494 100644 Binary files a/tools/sdk/esp32/lib/libesp_rainmaker.a and b/tools/sdk/esp32/lib/libesp_rainmaker.a differ diff --git a/tools/sdk/esp32/lib/libesp_wifi.a b/tools/sdk/esp32/lib/libesp_wifi.a index 608577b2c31..ea46fd8a633 100644 Binary files a/tools/sdk/esp32/lib/libesp_wifi.a and b/tools/sdk/esp32/lib/libesp_wifi.a differ diff --git a/tools/sdk/esp32/lib/libfb_gfx.a b/tools/sdk/esp32/lib/libfb_gfx.a index 98c30506f84..0ca0df1fd47 100644 Binary files a/tools/sdk/esp32/lib/libfb_gfx.a and b/tools/sdk/esp32/lib/libfb_gfx.a differ diff --git a/tools/sdk/esp32/lib/liblwip.a b/tools/sdk/esp32/lib/liblwip.a index cdec8150b34..a352377a6c6 100644 Binary files a/tools/sdk/esp32/lib/liblwip.a and b/tools/sdk/esp32/lib/liblwip.a differ diff --git a/tools/sdk/esp32/qspi_qspi/include/sdkconfig.h b/tools/sdk/esp32/qspi_qspi/include/sdkconfig.h index f9d88dc75a1..4e41e975c26 100644 --- a/tools/sdk/esp32/qspi_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32/qspi_qspi/include/sdkconfig.h @@ -57,6 +57,7 @@ #define CONFIG_ESP_RMAKER_OTA_AUTOFETCH_PERIOD 0 #define CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE 1024 #define CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES 10 +#define CONFIG_ESP_RMAKER_SCENES_MAX_SCENES 10 #define CONFIG_ENABLE_ARDUINO_DEPENDS 1 #define CONFIG_AUTOSTART_ARDUINO 1 #define CONFIG_ARDUINO_RUN_CORE1 1 @@ -166,7 +167,6 @@ #define CONFIG_SPIRAM 1 #define CONFIG_SPIRAM_USE_MALLOC 1 #define CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL 4096 -#define CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP 1 #define CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL 0 #define CONFIG_SPIRAM_CACHE_WORKAROUND 1 #define CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_MEMW 1 @@ -691,5 +691,5 @@ #define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS #define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP -#define CONFIG_ARDUINO_IDF_COMMIT "c29343eb94" +#define CONFIG_ARDUINO_IDF_COMMIT "b8050b365e" #define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32/qspi_qspi/libesp_hw_support.a b/tools/sdk/esp32/qspi_qspi/libesp_hw_support.a index 9e97cc27b44..b37d33791a3 100644 Binary files a/tools/sdk/esp32/qspi_qspi/libesp_hw_support.a and b/tools/sdk/esp32/qspi_qspi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32/qspi_qspi/libesp_system.a b/tools/sdk/esp32/qspi_qspi/libesp_system.a index c0190d09d1f..4e1e5d856c1 100644 Binary files a/tools/sdk/esp32/qspi_qspi/libesp_system.a and b/tools/sdk/esp32/qspi_qspi/libesp_system.a differ diff --git a/tools/sdk/esp32/sdkconfig b/tools/sdk/esp32/sdkconfig index 5f56097ba67..990eab05e48 100644 --- a/tools/sdk/esp32/sdkconfig +++ b/tools/sdk/esp32/sdkconfig @@ -162,6 +162,13 @@ CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE=1024 # CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES=10 # end of ESP RainMaker Scheduling + +# +# ESP RainMaker Scenes +# +CONFIG_ESP_RMAKER_SCENES_MAX_SCENES=10 +# CONFIG_ESP_RMAKER_SCENES_DEACTIVATE_SUPPORT is not set +# end of ESP RainMaker Scenes # end of ESP RainMaker Config # diff --git a/tools/sdk/esp32c3/include/esp_common/include/esp_idf_version.h b/tools/sdk/esp32c3/include/esp_common/include/esp_idf_version.h index 7637b814b65..db04f85f90a 100644 --- a/tools/sdk/esp32c3/include/esp_common/include/esp_idf_version.h +++ b/tools/sdk/esp32c3/include/esp_common/include/esp_idf_version.h @@ -23,7 +23,7 @@ extern "C" { /** Minor version number (x.X.x) */ #define ESP_IDF_VERSION_MINOR 4 /** Patch version number (x.x.X) */ -#define ESP_IDF_VERSION_PATCH 0 +#define ESP_IDF_VERSION_PATCH 1 /** * Macro to convert IDF version number into an integer diff --git a/tools/sdk/esp32c3/include/esp_hw_support/port/esp32c3/regi2c_ctrl.h b/tools/sdk/esp32c3/include/esp_hw_support/port/esp32c3/regi2c_ctrl.h index 7e5060288c6..ebef50d125e 100644 --- a/tools/sdk/esp32c3/include/esp_hw_support/port/esp32c3/regi2c_ctrl.h +++ b/tools/sdk/esp32c3/include/esp_hw_support/port/esp32c3/regi2c_ctrl.h @@ -65,6 +65,10 @@ uint8_t regi2c_ctrl_read_reg_mask(uint8_t block, uint8_t host_id, uint8_t reg_ad void regi2c_ctrl_write_reg(uint8_t block, uint8_t host_id, uint8_t reg_add, uint8_t data); void regi2c_ctrl_write_reg_mask(uint8_t block, uint8_t host_id, uint8_t reg_add, uint8_t msb, uint8_t lsb, uint8_t data); +/* enter the critical section that protects internal registers. Don't use it in SDK. Use the functions above. */ +void regi2c_enter_critical(void); +void regi2c_exit_critical(void); + #endif // BOOTLOADER_BUILD /* Convenience macros for the above functions, these use register definitions diff --git a/tools/sdk/esp32c3/include/esp_littlefs/include/esp_littlefs.h b/tools/sdk/esp32c3/include/esp_littlefs/include/esp_littlefs.h index 7b5abe9248f..07f35231291 100644 --- a/tools/sdk/esp32c3/include/esp_littlefs/include/esp_littlefs.h +++ b/tools/sdk/esp32c3/include/esp_littlefs/include/esp_littlefs.h @@ -1,24 +1,9 @@ #ifndef ESP_LITTLEFS_H__ #define ESP_LITTLEFS_H__ -#include -#include -#include -#include -#include -#include "freertos/FreeRTOS.h" -#include "freertos/semphr.h" #include "esp_err.h" -#include -#include -#include -#include -#include -#include -#include -#include "sdkconfig.h" - #include "littlefs/lfs.h" +#include "sdkconfig.h" #ifdef __cplusplus extern "C" { diff --git a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_console.h b/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_console.h deleted file mode 100644 index 70c02ffeae0..00000000000 --- a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_console.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. - -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Initialize console - * - * Initializes serial console and adds basic commands. - * - * @return ESP_OK on success. - * @return error in case of failures. - */ -esp_err_t esp_rmaker_console_init(void); - -/* Reference for adding custom console commands: -#include - -static int command_console_handler(int argc, char *argv[]) -{ - // Command code here -} - -static void register_console_command() -{ - const esp_console_cmd_t cmd = { - .command = "", - .help = "", - .func = &command_console_handler, - }; - ESP_ERROR_CHECK(esp_console_cmd_register(&cmd)); -} -*/ - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_core.h b/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_core.h deleted file mode 100644 index f9d96be4ee6..00000000000 --- a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_core.h +++ /dev/null @@ -1,893 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -#define ESP_RMAKER_CONFIG_VERSION "2020-03-20" - -/* Maximum length of the alert message that can be passed to esp_rmaker_raise_alert() */ -#define ESP_RMAKER_MAX_ALERT_LEN 100 - -/** @cond **/ -/** ESP RainMaker Event Base */ -ESP_EVENT_DECLARE_BASE(RMAKER_EVENT); -/** @endcond **/ - -/** ESP RainMaker Events */ -typedef enum { - /** RainMaker Core Initialisation Done */ - RMAKER_EVENT_INIT_DONE = 1, - /** Self Claiming Started */ - RMAKER_EVENT_CLAIM_STARTED, - /** Self Claiming was Successful */ - RMAKER_EVENT_CLAIM_SUCCESSFUL, - /** Self Claiming Failed */ - RMAKER_EVENT_CLAIM_FAILED, - /** Node side communication for User-Node mapping done. - * Actual mapping state will be managed by the ESP RainMaker cloud based on the user side communication. - * Associated data is the NULL terminated user id. - */ - RMAKER_EVENT_USER_NODE_MAPPING_DONE, - /** Local control started. Associated data is the NULL terminated Service Name */ - RMAKER_EVENT_LOCAL_CTRL_STARTED, - /* User reset request successfully sent to ESP RainMaker Cloud */ - RMAKER_EVENT_USER_NODE_MAPPING_RESET, -} esp_rmaker_event_t; - -/** ESP RainMaker Node information */ -typedef struct { - /** Name of the Node */ - char *name; - /** Type of the Node */ - char *type; - /** Firmware Version (Optional). If not set, PROJECT_VER is used as default (recommended)*/ - char *fw_version; - /** Model (Optional). If not set, PROJECT_NAME is used as default (recommended)*/ - char *model; -} esp_rmaker_node_info_t; - -/** ESP RainMaker Configuration */ -typedef struct { - /** Enable Time Sync - * Setting this true will enable SNTP and fetch the current time before - * attempting to connect to the ESP RainMaker service - */ - bool enable_time_sync; -} esp_rmaker_config_t; - -/** ESP RainMaker Parameter Value type */ -typedef enum { - /** Invalid */ - RMAKER_VAL_TYPE_INVALID = 0, - /** Boolean */ - RMAKER_VAL_TYPE_BOOLEAN, - /** Integer. Mapped to a 32 bit signed integer */ - RMAKER_VAL_TYPE_INTEGER, - /** Floating point number */ - RMAKER_VAL_TYPE_FLOAT, - /** NULL terminated string */ - RMAKER_VAL_TYPE_STRING, - /** NULL terminated JSON Object string Eg. {"name":"value"} */ - RMAKER_VAL_TYPE_OBJECT, - /** NULL terminated JSON Array string Eg. [1,2,3] */ - RMAKER_VAL_TYPE_ARRAY, -} esp_rmaker_val_type_t; - -/** ESP RainMaker Value */ -typedef union { - /** Boolean */ - bool b; - /** Integer */ - int i; - /** Float */ - float f; - /** NULL terminated string */ - char *s; -} esp_rmaker_val_t; - -/** ESP RainMaker Parameter Value */ -typedef struct { - /** Type of Value */ - esp_rmaker_val_type_t type; - /** Actual value. Depends on the type */ - esp_rmaker_val_t val; -} esp_rmaker_param_val_t; - -/** Param property flags */ -typedef enum { - PROP_FLAG_WRITE = (1 << 0), - PROP_FLAG_READ = (1 << 1), - PROP_FLAG_TIME_SERIES = (1 << 2), - PROP_FLAG_PERSIST = (1 << 3) -} esp_param_property_flags_t; - -/** System Service Reboot Flag */ -#define SYSTEM_SERV_FLAG_REBOOT (1 << 0) - -/** System Service Factory Reset Flag */ -#define SYSTEM_SERV_FLAG_FACTORY_RESET (1 << 1) - -/** System Service Wi-Fi Reset Flag */ -#define SYSTEM_SERV_FLAG_WIFI_RESET (1 << 2) - -/** System Service All Flags */ -#define SYSTEM_SERV_FLAGS_ALL (SYSTEM_SERV_FLAG_REBOOT | SYSTEM_SERV_FLAG_FACTORY_RESET | SYSTEM_SERV_FLAG_WIFI_RESET) - -/** Generic ESP RainMaker handle */ -typedef size_t esp_rmaker_handle_t; - -/** ESP RainMaker Node Handle */ -typedef esp_rmaker_handle_t esp_rmaker_node_t; - -/** ESP RainMaker Device Handle */ -typedef esp_rmaker_handle_t esp_rmaker_device_t; - -/** ESP RainMaker Parameter Handle */ -typedef esp_rmaker_handle_t esp_rmaker_param_t; - -/** Parameter read/write request source */ -typedef enum { - /** Request triggered in the init sequence i.e. when a value is found - * in persistent memory for parameters with PROP_FLAG_PERSIST. - */ - ESP_RMAKER_REQ_SRC_INIT, - /** Request received from cloud */ - ESP_RMAKER_REQ_SRC_CLOUD, - /** Request received when a schedule has triggered */ - ESP_RMAKER_REQ_SRC_SCHEDULE, - /** Request received from a local controller */ - ESP_RMAKER_REQ_SRC_LOCAL, - /** This will always be the last value. Any value equal to or - * greater than this should be considered invalid. - */ - ESP_RMAKER_REQ_SRC_MAX, -} esp_rmaker_req_src_t; - -/** Write request Context */ -typedef struct { - /** Source of request */ - esp_rmaker_req_src_t src; -} esp_rmaker_write_ctx_t; - -/** Read request context */ -typedef struct { - /** Source of request */ - esp_rmaker_req_src_t src; -} esp_rmaker_read_ctx_t; - -/** System service configuration */ -typedef struct { - /** Logical OR of system service flags (SYSTEM_SERV_FLAG_REBOOT, - * SYSTEM_SERV_FLAG_FACTORY_RESET, SYSTEM_SERV_FLAG_WIFI_RESET) as required - * or SYSTEM_SERV_FLAGS_ALL. - */ - uint16_t flags; - /** Time in seconds after which the device should reboot. - * Value of zero would trigger an immediate reboot if a write is received for - * the Reboot parameter. - * Recommended value: 2 - */ - int8_t reboot_seconds; - /** Time in seconds after which the device should reset (Wi-Fi or factory). - * Value of zero would trigger an immediate action if a write is received for - * the Wi-Fi reset or Factory reset parameter. - * Recommended value: 2 - */ - int8_t reset_seconds; - /** Time in seconds after which the device should reboot after it has been reset. - * Value of zero would mean that there won't be any reboot after the reset. - * Recommended value: 2 - */ - int8_t reset_reboot_seconds; -} esp_rmaker_system_serv_config_t; - -/** Callback for parameter value write requests. - * - * The callback should call the esp_rmaker_param_update_and_report() API if the new value is to be set - * and reported back. - * - * @param[in] device Device handle. - * @param[in] param Parameter handle. - * @param[in] param Pointer to \ref esp_rmaker_param_val_t. Use appropriate elements as per the value type. - * @param[in] priv_data Pointer to the private data paassed while creating the device. - * @param[in] ctx Context associated with the request. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -typedef esp_err_t (*esp_rmaker_device_write_cb_t)(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param, - const esp_rmaker_param_val_t val, void *priv_data, esp_rmaker_write_ctx_t *ctx); - -/** Callback for parameter value changes - * - * The callback should call the esp_rmaker_param_update_and_report() API if the new value is to be set - * and reported back. - * - * @note Currently, the read callback never gets invoked as the communication between clients (mobile phones, CLI, etc.) - * and node is asynchronous. So, the read request does not reach the node. This callback will however be used in future. - * - * @param[in] device Device handle. - * @param[in] param Parameter handle. - * @param[in] priv_data Pointer to the private data passed while creating the device. - * @param[in] ctx Context associated with the request. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -typedef esp_err_t (*esp_rmaker_device_read_cb_t)(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param, - void *priv_data, esp_rmaker_read_ctx_t *ctx); - -/** Convert device callback source to string - * - * Device read/write callback can be via different sources. This is a helper API - * to give the source in string format for printing. - * - * Example Usage: - * @code{c} - * static esp_err_t write_cb(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param, - * const esp_rmaker_param_val_t val, void *priv_data, esp_rmaker_write_ctx_t *ctx) -{ - if (ctx) { - ESP_LOGI(TAG, "Received write request via : %s", esp_rmaker_device_cb_src_to_str(ctx->src)); - } - * @endcode - * - * @param[in] src The src field as received in the callback context. - * - * @return NULL terminated source string on success - * @return NULL on failure - */ -const char *esp_rmaker_device_cb_src_to_str(esp_rmaker_req_src_t src); - -/** - * Initialise a Boolean value - * - * @param[in] bval Initialising value. - * - * @return Value structure. - */ -esp_rmaker_param_val_t esp_rmaker_bool(bool bval); - -/** - * Initialise an Integer value - * - * @param[in] ival Initialising value. - * - * @return Value structure. - */ -esp_rmaker_param_val_t esp_rmaker_int(int ival); - -/** - * Initialise a Float value - * - * @param[in] fval Initialising value. - * - * @return Value structure. - */ -esp_rmaker_param_val_t esp_rmaker_float(float fval); - -/** - * Initialise a String value - * - * @param[in] sval Initialising value. - * - * @return Value structure. - */ -esp_rmaker_param_val_t esp_rmaker_str(const char *sval); - -/** - * Initialise a json object value - * - * @note the object will not be validated internally. it is the application's - * responsibility to ensure that the object is a valid json object. - * eg. esp_rmaker_obj("{\"name\":\"value\"}"); - * - * param[in] val initialising value - * - * return value structure - */ -esp_rmaker_param_val_t esp_rmaker_obj(const char *val); - -/** - * Initialise a json array value - * - * @note the array will not be validated internally. it is the application's - * responsibility to ensure that the array is a valid json array. - * eg. esp_rmaker_array("[1,2,3]"); - * - * param[in] val initialising value - * - * return value structure - */ -esp_rmaker_param_val_t esp_rmaker_array(const char *val); - - -/** Initialize ESP RainMaker Node - * - * This initializes the ESP RainMaker agent and creates the node. - * The model and firmware version for the node are set internally as per - * the project name and version. These can be overridden (but not recommended) using the - * esp_rmaker_node_add_fw_version() and esp_rmaker_node_add_model() APIs. - * - * @note This should be the first call before using any other ESP RainMaker API. - * - * @param[in] config Configuration to be used by the ESP RainMaker. - * @param[in] name Name of the node. - * @param[in] type Type of the node. - * - * @return Node handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_node_t *esp_rmaker_node_init(const esp_rmaker_config_t *config, const char *name, const char *type); - -/** Start ESP RainMaker Agent - * - * This call starts the actual ESP RainMaker thread. This should preferably be called after a - * successful Wi-Fi connection in order to avoid unnecessary failures. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_start(void); - -/** Stop ESP RainMaker Agent - * - * This call stops the ESP RainMaker Agent instance started earlier by esp_rmaker_start(). - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_stop(void); - -/** Deinitialize ESP RainMaker Node - * - * This API deinitializes the ESP RainMaker agent and the node created using esp_rmaker_node_init(). - * - * @note This should be called after rainmaker has stopped. - * - * @param[in] node Node Handle returned by esp_rmaker_node_init(). - * - * @retur ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_deinit(const esp_rmaker_node_t *node); - -/** Get a handle to the Node - * - * This API returns handle to a node created using esp_rmaker_node_init(). - * - * @return Node handle on success. - * @return NULL in case of failure. - */ -const esp_rmaker_node_t *esp_rmaker_get_node(void); - -/** Get Node Id - * - * Returns pointer to the NULL terminated Node ID string. - * - * @return Pointer to a NULL terminated Node ID string. - */ -char *esp_rmaker_get_node_id(void); - -/** Get Node Info - * - * Returns pointer to the node info as configured during initialisation. - * - * @param node Node handle. - * - * @return Pointer to the node info on success. - * @return NULL in case of failure. - */ -esp_rmaker_node_info_t *esp_rmaker_node_get_info(const esp_rmaker_node_t *node); - -/** Add Node attribute - * - * Adds a new attribute as the metadata for the node. For the sake of simplicity, - * only string values are allowed. - * - * @param node Node handle. - * @param[in] attr_name Name of the attribute. - * @param[in] val Value for the attribute. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_add_attribute(const esp_rmaker_node_t *node, const char *attr_name, const char *val); - -/** Add FW version for a node (Not recommended) - * - * FW version is set internally to the project version. This API can be used to - * override that version. - * - * @param node Node handle. - * @param[in] fw_version New firmware version. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_add_fw_version(const esp_rmaker_node_t *node, const char *fw_version); - -/** Add model for a node (Not recommended) - * - * Model is set internally to the project name. This API can be used to - * override that name. - * - * @param node Node handle. - * @param[in] model New model string. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_add_model(const esp_rmaker_node_t *node, const char *model); - -/** - * Create a Device - * - * This API will create a virtual "Device". - * This could be something like a Switch, Lightbulb, etc. - * - * @note The device created needs to be added to a node using esp_rmaker_node_add_device(). - * - * @param[in] dev_name The unique device name. - * @param[in] type Optional device type. Can be kept NULL. - * @param[in] priv_data (Optional) Private data associated with the device. This will be passed to callbacks. - * It should stay allocated throughout the lifetime of the device. - * - * @return Device handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_device_create(const char *dev_name, const char *type, void *priv_data); - -/** - * Create a Service - * - * This API will create a "Service". It is exactly same like a device in terms of structure and so, all - * APIs for device are also valid for a service. - * A service could be something like OTA, diagnostics, etc. - * - * @note Name of a service should not clash with name of a device. - * @note The service created needs to be added to a node using esp_rmaker_node_add_device(). - * - * @param[in] serv_name The unique service name. - * @param[in] type Optional service type. Can be kept NULL. - * @param[in] priv_data (Optional) Private data associated with the service. This will be passed to callbacks. - * It should stay allocated throughout the lifetime of the device. - * - * @return Device handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_service_create(const char *serv_name, const char *type, void *priv_data); - -/** - * Delete a Device/Service - * - * This API will delete a device created using esp_rmaker_device_create(). - * - * @note The device should first be removed from the node using esp_rmaker_node_remove_device() before deleting. - * - * @param[in] device Device handle. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_delete(const esp_rmaker_device_t *device); - -/** - * Add callbacks for a device/service - * - * Add read/write callbacks for a device that will be invoked as per requests received from the cloud (or other paths - * as may be added in future). - * - * @param[in] device Device handle. - * @param[in] write_cb Write callback. - * @param[in] read_cb Read callback. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_add_cb(const esp_rmaker_device_t *device, esp_rmaker_device_write_cb_t write_cb, esp_rmaker_device_read_cb_t read_cb); - -/** - * Add a device to a node - * - * @param[in] node Node handle. - * @param[in] device Device handle. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_add_device(const esp_rmaker_node_t *node, const esp_rmaker_device_t *device); - -/** - * Remove a device from a node - * - * @param[in] node Node handle. - * @param[in] device Device handle. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_remove_device(const esp_rmaker_node_t *node, const esp_rmaker_device_t *device); - -/** Get device by name - * - * Get handle for a device based on the name. - * - * @param[in] node Node handle. - * @param[in] device_name Device name to search. - * - * @return Device handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_device_t *esp_rmaker_node_get_device_by_name(const esp_rmaker_node_t *node, const char *device_name); - -/** Add a Device attribute - * - * @note Device attributes are reported only once after a boot-up as part of the node - * configuration. - * Eg. Serial Number - * - * @param[in] device Device handle. - * @param[in] attr_name Name of the attribute. - * @param[in] val Value of the attribute. - * - * @return ESP_OK if the attribute was added successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_add_attribute(const esp_rmaker_device_t *device, const char *attr_name, const char *val); - -/** Add a Device subtype - * - * This can be something like esp.subtype.rgb-light for a device of type esp.device.lightbulb. - * This would primarily be used by the phone apps to render different icons for the same device type. - * - * @param[in] device Device handle. - * @param[in] subtype String describing the sub type. - * - * @return ESP_OK if the subtype was added successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_add_subtype(const esp_rmaker_device_t *device, const char *subtype); - -/** Get device name from handle - * - * @param[in] device Device handle. - * - * @return NULL terminated device name string on success. - * @return NULL in case of failure. - */ -char *esp_rmaker_device_get_name(const esp_rmaker_device_t *device); - -/** Get device type from handle - * - * @param[in] device Device handle. - * - * @return NULL terminated device type string on success. - * @return NULL in case of failure, or if the type wasn't provided while creating the device. - */ -char *esp_rmaker_device_get_type(const esp_rmaker_device_t *device); - -/** - * Add a parameter to a device/service - * - * @param[in] device Device handle. - * @param[in] param Parameter handle. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_add_param(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param); - - -/** Get parameter by type - * - * Get handle for a parameter based on the type. - * - * @note If there are multiple parameters with the same type, this will return the first one. The API - * esp_rmaker_device_get_param_by_name() can be used to get a specific parameter, because the parameter - * names in a device are unique. - * - * @param[in] device Device handle. - * @param[in] param_type Parameter type to search. - * - * @return Parameter handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_param_t *esp_rmaker_device_get_param_by_type(const esp_rmaker_device_t *device, const char *param_type); - -/** Get parameter by name - * - * Get handle for a parameter based on the name. - * - * @param[in] device Device handle. - * @param[in] param_name Parameter name to search. - * - * @return Parameter handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_param_t *esp_rmaker_device_get_param_by_name(const esp_rmaker_device_t *device, const char *param_name); - -/** Assign a primary parameter - * - * Assign a parameter (already added using esp_rmaker_device_add_param()) as a primary parameter, - * which can be used by clients (phone apps specifically) to give prominence to it. - * - * @param[in] device Device handle. - * @param[in] param Parameter handle. - * - * @return ESP_OK if the parameter was assigned as the primary successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_assign_primary_param(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param); - -/** - * Create a Parameter - * - * Parameter can be something like Temperature, Outlet state, Lightbulb brightness, etc. - * - * Any changes should be reported using the esp_rmaker_param_update_and_report() API. - * Any remote changes will be reported to the application via the device callback, if registered. - * - * @note The parameter created needs to be added to a device using esp_rmaker_device_add_param(). - * Parameter name should be unique in a given device. - * - * @param[in] param_name Name of the parameter. - a* @param[in] type Optional parameter type. Can be kept NULL. - * @param[in] val Value of the parameter. This also specifies the type that will be assigned - * to this parameter. You can use esp_rmaker_bool(), esp_rmaker_int(), esp_rmaker_float() - * or esp_rmaker_str() functions as the argument here. Eg, esp_rmaker_bool(true). - * @param[in] properties Properties of the parameter, which will be a logical OR of flags in - * \ref esp_param_property_flags_t. - * - * @return Parameter handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_param_t *esp_rmaker_param_create(const char *param_name, const char *type, - esp_rmaker_param_val_t val, uint8_t properties); - -/** - * Add a UI Type to a parameter - * - * This will be used by the Phone apps (or other clients) to render appropriate UI for the given - * parameter. Please refer the RainMaker documetation for supported UI Types. - * - * @param[in] param Parameter handle. - * @param[in] ui_type String describing the UI Type. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_param_add_ui_type(const esp_rmaker_param_t *param, const char *ui_type); - -/** - * Add bounds for an integer/float parameter - * - * This can be used to add bounds (min/max values) for a given integer parameter. Eg. brightness - * will have bounds as 0 and 100 if it is a percentage. - * Eg. esp_rmaker_param_add_bounds(brightness_param, esp_rmaker_int(0), esp_rmaker_int(100), esp_rmaker_int(5)); - * - * @note The RainMaker core does not check the bounds. It is upto the application to handle it. - * - * @param[in] param Parameter handle. - * @param[in] min Minimum allowed value. - * @param[in] max Maximum allowed value. - * @param[in] step Minimum stepping (set to 0 if no specific value is desired). - * - * @return ESP_OK on success. - * return error in case of failure. - */ -esp_err_t esp_rmaker_param_add_bounds(const esp_rmaker_param_t *param, - esp_rmaker_param_val_t min, esp_rmaker_param_val_t max, esp_rmaker_param_val_t step); - -/** - * Add a list of valid strings for a string parameter - * - * This can be used to add a list of valid strings for a given string parameter. - * - * Eg. - * static const char *valid_strs[] = {"None","Yes","No","Can't Say"}; - * esp_rmaker_param_add_valid_str_list(param, valid_strs, 4); - * - * @note The RainMaker core does not check the values. It is upto the application to handle it. - * - * @param[in] param Parameter handle. - * @param[in] strs Pointer to an array of strings. Note that this memory should stay allocated - * throughout the lifetime of this parameter. - * @param[in] count Number of strings in the above array. - * - * @return ESP_OK on success. - * return error in case of failure. - */ -esp_err_t esp_rmaker_param_add_valid_str_list(const esp_rmaker_param_t *param, const char *strs[], uint8_t count); - -/** Add max count for an array parameter - * - * This can be used to put a limit on the maximum number of elements in an array. - * - * @note The RainMaker core does not check the values. It is upto the application to handle it. - * - * @param[in] param Parameter handle. - * @param[in] count Max number of elements allowed in the array. - * - * @return ESP_OK on success. - * return error in case of failure. - */ -esp_err_t esp_rmaker_param_add_array_max_count(const esp_rmaker_param_t *param, int count); - - -/* Update a parameter - * - * This will just update the value of a parameter with esp rainmaker core, without actually reporting - * it. This can be used when multiple parameters need to be reported together. - * Eg. If x parameters are to be reported, this API can be used for the first x -1 parameters - * and the last one can be updated using esp_rmaker_param_update_and_report(). - * This will report all parameters which were updated prior to this call. - * - * Sample: - * - * esp_rmaker_param_update(param1, esp_rmaker_float(10.2)); - * esp_rmaker_param_update(param2, esp_rmaker_int(55)); - * esp_rmaker_param_update(param3, esp_rmaker_int(95)); - * esp_rmaker_param_update_and_report(param1, esp_rmaker_bool(true)); - * - * @param[in] param Parameter handle. - * @param[in] val New value of the parameter. - * - * @return ESP_OK if the parameter was updated successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_param_update(const esp_rmaker_param_t *param, esp_rmaker_param_val_t val); - -/** Update and report a parameter - * - * Calling this API will update the parameter and report it to ESP RainMaker cloud. - * This should be used whenever there is any local change. - * - * @param[in] param Parameter handle. - * @param[in] val New value of the parameter. - * - * @return ESP_OK if the parameter was updated successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_param_update_and_report(const esp_rmaker_param_t *param, esp_rmaker_param_val_t val); - -/** Update and notify a parameter - * - * Calling this API will update the parameter and report it to ESP RainMaker cloud similar to - * esp_rmaker_param_update_and_report(). However, additionally, it will also trigger a notification - * on the phone apps (if enabled). - * - * @note This should be used only when some local change requires explicit notification even when the - * phone app is in background, not otherwise. - * Eg. Alarm got triggered, temperature exceeded some threshold, etc. - * - * Alternatively, the esp_rmaker_raise_alert() API can also be used to trigger notification - * on the phone apps with pre-formatted text. - * - * @param[in] param Parameter handle. - * @param[in] val New value of the parameter. - * - * @return ESP_OK if the parameter was updated successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_param_update_and_notify(const esp_rmaker_param_t *param, esp_rmaker_param_val_t val); - -/** Trigger an alert on the phone app - * - * This API will trigger a notification alert on the phone apps (if enabled) using the formatted text - * provided. Note that this does not send a notification directly to the phone, but reports the alert - * to the ESP RainMaker cloud which then uses the Notification framework to send notifications to the - * phone apps. The value does not get stored anywhere, nor is it linked to any node parameters. - * - * @note This should be used only if some event requires explicitly alerting the user even when the - * phone app is in background, not otherwise. - * Eg. "Motion Detected", "Fire alarm triggered" - * - * @param[in] alert_str NULL terminated pre-formatted alert string. - * Maximum length can be ESP_RMAKER_MAX_ALERT_LEN, excluding NULL character. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_raise_alert(const char *alert_str); - -/** Get parameter name from handle - * - * @param[in] param Parameter handle. - * - * @return NULL terminated parameter name string on success. - * @return NULL in case of failure. - */ -char *esp_rmaker_param_get_name(const esp_rmaker_param_t *param); - -/** Get parameter type from handle - * - * @param[in] param Parameter handle. - * - * @return NULL terminated parameter type string on success. - * @return NULL in case of failure, or if the type wasn't provided while creating the parameter. - */ -char *esp_rmaker_param_get_type(const esp_rmaker_param_t *param); - -/** Get parameter value - * - * This gives the parameter value that is stored in the RainMaker core. - * - * @note This does not call any explicit functions to read value from hardware/driver. - * - * @param[in] param Parameter handle - * - * @return Pointer to parameter value on success. - * @return NULL in case of failure. - */ -esp_rmaker_param_val_t *esp_rmaker_param_get_val(esp_rmaker_param_t *param); - -/** Report the node details to the cloud - * - * This API reports node details i.e. the node configuration and values of all the parameters to the ESP RainMaker cloud. - * Eg. If a new device is created (with some parameters and attributes), then this API should be called after that - * to send the node details to the cloud again and the changes to be reflected in the clients (like phone apps). - * - * @note Please use this API only if you need to create or delete devices after esp_rmaker_start() has already - * been called, for use cases like bridges or hubs. - * - * @return ESP_OK if the node details are successfully queued to be published. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_report_node_details(void); - -/** Enable Timezone Service - * - * This enables the ESP RainMaker standard timezone service which can be used to set - * timezone, either in POSIX or location string format. Please refer the specifications - * for additional details. - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_timezone_service_enable(void); - -/** Enable System Service - * - * This enables the ESP RainMaker standard system service which can be - * used for operations like reboot, factory reset and Wi-Fi reset. - * - * Please refer the specifications for additional details. - * - * @param[in] config Configuration for the system service. - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_system_service_enable(esp_rmaker_system_serv_config_t *config); - -/** - * Check if local_ctrl service has started - * - * @return true if service has started - * @return false if the service has not started - */ -bool esp_rmaker_local_ctrl_service_started(void); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_mqtt.h b/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_mqtt.h deleted file mode 100644 index 1cc6cd5156e..00000000000 --- a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_mqtt.h +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -esp_rmaker_mqtt_conn_params_t *esp_rmaker_mqtt_get_conn_params(void); - -/** Initialize ESP RainMaker MQTT - * - * @param[in] config The MQTT configuration data - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_init(esp_rmaker_mqtt_conn_params_t *conn_params); - -/** MQTT Connect - * - * Starts the connection attempts to the MQTT broker as per the configuration - * provided during initializing. - * This should ideally be called after successful network connection. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_connect(void); - -/** MQTT Disconnect - * - * Disconnects from the MQTT broker. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_disconnect(void); - -/** Publish MQTT Message - * - * @param[in] topic The MQTT topic on which the message should be published. - * @param[in] data Data to be published - * @param[in] data_len Length of the data - * @param[in] qos Quality of Service for the Publish. Can be 0, 1 or 2. Also depends on what the MQTT broker supports. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_publish(const char *topic, void *data, size_t data_len, uint8_t qos, int *msg_id); - -/** Subscribe to MQTT topic - * - * @param[in] topic The topic to be subscribed to. - * @param[in] cb The callback to be invoked when a message is received on the given topic. - * @param[in] priv_data Optional private data to be passed to the callback - * @param[in] qos Quality of Service for the Subscription. Can be 0, 1 or 2. Also depends on what the MQTT broker supports. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_subscribe(const char *topic, esp_rmaker_mqtt_subscribe_cb_t cb, uint8_t qos, void *priv_data); - -/** Unsubscribe from MQTT topic - * - * @param[in] topic Topic from which to unsubscribe. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_unsubscribe(const char *topic); -esp_err_t esp_rmaker_mqtt_setup(esp_rmaker_mqtt_config_t mqtt_config); -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_ota.h b/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_ota.h deleted file mode 100644 index e66b95705bc..00000000000 --- a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_ota.h +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Default ESP RainMaker OTA Server Certificate */ -extern const char *ESP_RMAKER_OTA_DEFAULT_SERVER_CERT; - -/** OTA Status to be reported to ESP RainMaker Cloud */ -typedef enum { - /** OTA is in Progress. This can be reported multiple times as the OTA progresses. */ - OTA_STATUS_IN_PROGRESS = 1, - /** OTA Succeeded. This should be reported only once, at the end of OTA. */ - OTA_STATUS_SUCCESS, - /** OTA Failed. This should be reported only once, at the end of OTA. */ - OTA_STATUS_FAILED, - /** OTA was delayed by the application */ - OTA_STATUS_DELAYED, -} ota_status_t; - -/** OTA Workflow type */ -typedef enum { - /** OTA will be performed using services and parameters. */ - OTA_USING_PARAMS = 1, - /** OTA will be performed using pre-defined MQTT topics. */ - OTA_USING_TOPICS -} esp_rmaker_ota_type_t; - -/** The OTA Handle to be used by the OTA callback */ -typedef void *esp_rmaker_ota_handle_t; - -/** OTA Data */ -typedef struct { - /** The OTA URL received from ESP RainMaker Cloud */ - char *url; - /** Size of the OTA File. Can be 0 if the file size isn't received from - * the ESP RainMaker Cloud */ - int filesize; - /** The server certificate passed in esp_rmaker_enable_ota() */ - const char *server_cert; - /** The private data passed in esp_rmaker_enable_ota() */ - char *priv; -} esp_rmaker_ota_data_t; - -/** Function prototype for OTA Callback - * - * This function will be invoked by the ESP RainMaker core whenever an OTA is available. - * The esp_rmaker_report_ota_status() API should be used to indicate the progress and - * success/fail status. - * - * @param[in] handle An OTA handle assigned by the ESP RainMaker Core - * @param[in] ota_data The data to be used for the OTA - * - * @return ESP_OK if the OTA was successful - * @return ESP_FAIL if the OTA failed. - */ -typedef esp_err_t (*esp_rmaker_ota_cb_t) (esp_rmaker_ota_handle_t handle, - esp_rmaker_ota_data_t *ota_data); - -/** Function Prototype for Post OTA Diagnostics - * - * If the Application rollback feature is enabled, this callback will be invoked - * as soon as you call esp_rmaker_ota_enable(), if it is the first - * boot after an OTA. You may perform some application specific diagnostics and - * report the status which will decide whether to roll back or not. - * - * @return true if diagnostics are successful, meaning that the new firmware is fine. - * @return false if diagnostics fail and a roolback to previous firmware is required. - */ -typedef bool (*esp_rmaker_post_ota_diag_t)(void); - -/** ESP RainMaker OTA Configuration */ -typedef struct { - /** OTA Callback. - * The callback to be invoked when an OTA Job is available. - * If kept NULL, the internal default callback will be used (Recommended). - */ - esp_rmaker_ota_cb_t ota_cb; - /** OTA Diagnostics Callback. - * A post OTA diagnostic handler to be invoked if app rollback feature is enabled. - * If kept NULL, the new firmware will be assumed to be fine, - * and no rollback will be performed. - */ - esp_rmaker_post_ota_diag_t ota_diag; - /** Server Certificate. - * The certificate to be passed to the OTA callback for server authentication. - * This is mandatory, unless you have disabled it in ESP HTTPS OTA config option. - * If you are using the ESP RainMaker OTA Service, you can just set this to - * `ESP_RMAKER_OTA_DEFAULT_SERVER_CERT`. - */ - const char *server_cert; - /** Private Data. - * Optional private data to be passed to the OTA callback. - */ - void *priv; -} esp_rmaker_ota_config_t; - -/** Enable OTA - * - * Calling this API enables OTA as per the ESP RainMaker specification. - * Please check the various ESP RainMaker configuration options to - * use the different variants of OTA. Refer the documentation for - * additional details. - * - * @param[in] ota_config Pointer to an OTA configuration structure - * @param[in] type The OTA workflow type - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_ota_enable(esp_rmaker_ota_config_t *ota_config, esp_rmaker_ota_type_t type); - -/** Report OTA Status - * - * This API must be called from the OTA Callback to indicate the status of the OTA. The OTA_STATUS_IN_PROGRESS - * can be reported multiple times with appropriate additional information. The final success/failure should - * be reported only once, at the end. - * - * This can be ignored if you are using the default internal OTA callback. - * - * @param[in] ota_handle The OTA handle received by the callback - * @param[in] status Status to be reported - * @param[in] additional_info NULL terminated string indicating additional information for the status - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_ota_report_status(esp_rmaker_ota_handle_t ota_handle, ota_status_t status, char *additional_info); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_schedule.h b/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_schedule.h deleted file mode 100644 index 383c0949188..00000000000 --- a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_schedule.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. - -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Enable Schedules - * - * This API enables the scheduling service for the node. For more information, - * check [here](https://rainmaker.espressif.com/docs/scheduling.html) - * - * It is recommended to set the timezone while using schedules. Check [here](https://rainmaker.espressif.com/docs/time-service.html#time-zone) for more information on timezones - * - * @note This API should be called after esp_rmaker_node_init() but before esp_rmaker_start(). - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_schedule_enable(void); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_standard_devices.h b/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_standard_devices.h deleted file mode 100644 index db9480672ba..00000000000 --- a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_standard_devices.h +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. - -#pragma once -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Create a standard Switch device - * - * This creates a Switch device with the mandatory parameters and also assigns - * the primary parameter. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] dev_name The unique device name - * @param[in] priv_data (Optional) Private data associated with the device. This should stay - * allocated throughout the lifetime of the device - * #@param[in] power Default value of the mandatory parameter "power" - * - * @return Device handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_device_t *esp_rmaker_switch_device_create(const char *dev_name, - void *priv_data, bool power); - -/** Create a standard Lightbulb device - * - * This creates a Lightbulb device with the mandatory parameters and also assigns - * the primary parameter. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] dev_name The unique device name - * @param[in] priv_data (Optional) Private data associated with the device. This should stay - * allocated throughout the lifetime of the device - * @param[in] power Default value of the mandatory parameter "power" - * - * @return Device handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_device_t *esp_rmaker_lightbulb_device_create(const char *dev_name, - void *priv_data, bool power); - -/** Create a standard Fan device - * - * This creates a Fan device with the mandatory parameters and also assigns - * the primary parameter. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] dev_name The unique device name - * @param[in] priv_data (Optional) Private data associated with the device. This should stay - * allocated throughout the lifetime of the device - * @param[in] power Default value of the mandatory parameter "power" - * - * @return Device handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_device_t *esp_rmaker_fan_device_create(const char *dev_name, - void *priv_data, bool power); - -/** Create a standard Temperature Sensor device - * - * This creates a Temperature Sensor device with the mandatory parameters and also assigns - * the primary parameter. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] dev_name The unique device name - * @param[in] priv_data (Optional) Private data associated with the device. This should stay - * allocated throughout the lifetime of the device - * @param[in] temperature Default value of the mandatory parameter "temperature" - * - * @return Device handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_device_t *esp_rmaker_temp_sensor_device_create(const char *dev_name, - void *priv_data, float temperature); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_standard_params.h b/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_standard_params.h deleted file mode 100644 index 6cde69a2935..00000000000 --- a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_standard_params.h +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Suggested default names for the parameters. - * These will also be used by default if you use any standard device helper APIs. - * - * @note These names are not mandatory. You can use the ESP RainMaker Core APIs - * to create your own parameters with custom names, if required. - */ - -#define ESP_RMAKER_DEF_NAME_PARAM "Name" -#define ESP_RMAKER_DEF_POWER_NAME "Power" -#define ESP_RMAKER_DEF_BRIGHTNESS_NAME "Brightness" -#define ESP_RMAKER_DEF_HUE_NAME "Hue" -#define ESP_RMAKER_DEF_SATURATION_NAME "Saturation" -#define ESP_RMAKER_DEF_INTENSITY_NAME "Intensity" -#define ESP_RMAKER_DEF_CCT_NAME "CCT" -#define ESP_RMAKER_DEF_DIRECTION_NAME "Direction" -#define ESP_RMAKER_DEF_SPEED_NAME "Speed" -#define ESP_RMAKER_DEF_TEMPERATURE_NAME "Temperature" -#define ESP_RMAKER_DEF_OTA_STATUS_NAME "Status" -#define ESP_RMAKER_DEF_OTA_INFO_NAME "Info" -#define ESP_RMAKER_DEF_OTA_URL_NAME "URL" -#define ESP_RMAKER_DEF_TIMEZONE_NAME "TZ" -#define ESP_RMAKER_DEF_TIMEZONE_POSIX_NAME "TZ-POSIX" -#define ESP_RMAKER_DEF_SCHEDULE_NAME "Schedules" -#define ESP_RMAKER_DEF_REBOOT_NAME "Reboot" -#define ESP_RMAKER_DEF_FACTORY_RESET_NAME "Factory-Reset" -#define ESP_RMAKER_DEF_WIFI_RESET_NAME "Wi-Fi-Reset" -#define ESP_RMAKER_DEF_LOCAL_CONTROL_POP "POP" -#define ESP_RMAKER_DEF_LOCAL_CONTROL_TYPE "Type" - -/** - * Create standard name param - * - * This will create the standard name parameter. - * This should be added to all devices for which you want a user customisable name. - * The value should be same as the device name. - * - * All standard device creation APIs will add this internally. - * No application registered callback will be called for this parameter, - * and changes will be managed internally. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_name_param_create(const char *param_name, const char *val); - -/** - * Create standard Power param - * - * This will create the standard power parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_power_param_create(const char *param_name, bool val); - -/** - * Create standard Brightness param - * - * This will create the standard brightness parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_brightness_param_create(const char *param_name, int val); - -/** - * Create standard Hue param - * - * This will create the standard hue parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_hue_param_create(const char *param_name, int val); - -/** - * Create standard Saturation param - * - * This will create the standard saturation parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_saturation_param_create(const char *param_name, int val); - -/** - * Create standard Intensity param - * - * This will create the standard intensity parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_intensity_param_create(const char *param_name, int val); - -/** - * Create standard CCT param - * - * This will create the standard cct parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_cct_param_create(const char *param_name, int val); - -/** - * Create standard Direction param - * - * This will create the standard direction parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_direction_param_create(const char *param_name, int val); - -/** - * Create standard Speed param - * - * This will create the standard speed parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_speed_param_create(const char *param_name, int val); - -/** - * Create standard Temperature param - * - * This will create the standard temperature parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_temperature_param_create(const char *param_name, float val); - -/** - * Create standard OTA Status param - * - * This will create the standard ota status parameter. Default value - * is set internally. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_ota_status_param_create(const char *param_name); - -/** - * Create standard OTA Info param - * - * This will create the standard ota info parameter. Default value - * is set internally. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_ota_info_param_create(const char *param_name); - -/** - * Create standard OTA URL param - * - * This will create the standard ota url parameter. Default value - * is set internally. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_ota_url_param_create(const char *param_name); - -/** - * Create standard Timezone param - * - * This will create the standard timezone parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter (Eg. "Asia/Shanghai"). Can be kept NULL. - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_timezone_param_create(const char *param_name, const char *val); - -/** - * Create standard POSIX Timezone param - * - * This will create the standard posix timezone parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter (Eg. "CST-8"). Can be kept NULL. - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_timezone_posix_param_create(const char *param_name, const char *val); - -/** - * Create standard Schedules param - * - * This will create the standard schedules parameter. Default value - * is set internally. - * - * @param[in] param_name Name of the parameter - * @param[in] max_schedules Maximum number of schedules allowed - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_schedules_param_create(const char *param_name, int max_schedules); - -/** - * Create standard Reboot param - * - * This will create the standard reboot parameter. - * Set value to true (via write param) for the action to trigger. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_reboot_param_create(const char *param_name); - -/** - * Create standard Factory Reset param - * - * This will create the standard factory reset parameter. - * Set value to true (via write param) for the action to trigger. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_factory_reset_param_create(const char *param_name); - -/** - * Create standard Wi-Fi Reset param - * - * This will create the standard Wi-Fi Reset parameter. - * Set value to true (via write param) for the action to trigger. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_wifi_reset_param_create(const char *param_name); - -/** - * Create standard Local Control POP param - * - * This will create the standard Local Control POP parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter (Eg. "abcd1234"). Can be kept NULL. - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_local_control_pop_param_create(const char *param_name, const char *val); - -/** - * Create standard Local Control Type param - * - * This will create the standard Local Control security type parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_local_control_type_param_create(const char *param_name, int val); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_standard_services.h b/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_standard_services.h deleted file mode 100644 index 7dc6dfbad80..00000000000 --- a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_standard_services.h +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. - -#pragma once -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Create a standard OTA service - * - * This creates an OTA service with the mandatory parameters. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] serv_name The unique service name - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_ota_service_create(const char *serv_name, void *priv_data); - -/** Create a standard OTA service - * - * This creates an OTA service with the mandatory parameters. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] serv_name The unique service name - * @param[in] timezone Default value of timezone string (Eg. "Asia/Shanghai"). Can be kept NULL. - * @param[in] timezone_posix Default value of posix timezone string (Eg. "CST-8"). Can be kept NULL. - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_time_service_create(const char *serv_name, const char *timezone, - const char *timezone_posix, void *priv_data); - -/** Create a standard Schedule service - * - * This creates a Schedule service with the mandatory parameters. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] serv_name The unique service name - * @param[in] write_cb Write callback. - * @param[in] read_cb Read callback. - * @param[in] max_schedules Maximum number of schedules supported. - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_create_schedule_service(const char *serv_name, esp_rmaker_device_write_cb_t write_cb, esp_rmaker_device_read_cb_t read_cb, int max_schedules, void *priv_data); - -/** Create a standard System service - * - * This creates an empty System service. Appropriate parameters should be added by the caller. - * - * @param[in] serv_name The unique service name - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ - -esp_rmaker_device_t *esp_rmaker_create_system_service(const char *serv_name, void *priv_data); - -/** Create a standard Local Control service - * - * This creates a Local Control service with the mandatory parameters. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] serv_name The unique service name - * @param[in] pop Proof of possession - * @param[in] sec_type Security type - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_create_local_control_service(const char *serv_name, const char *pop, int sec_type, void *priv_data); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_standard_types.h b/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_standard_types.h deleted file mode 100644 index 11eecebcb1c..00000000000 --- a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_standard_types.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -/********** STANDARD UI TYPES **********/ - -#define ESP_RMAKER_UI_TOGGLE "esp.ui.toggle" -#define ESP_RMAKER_UI_SLIDER "esp.ui.slider" -#define ESP_RMAKER_UI_DROPDOWN "esp.ui.dropdown" -#define ESP_RMAKER_UI_TEXT "esp.ui.text" -#define ESP_RMAKER_UI_HUE_SLIDER "esp.ui.hue-slider" - -/********** STANDARD PARAM TYPES **********/ - -#define ESP_RMAKER_PARAM_NAME "esp.param.name" -#define ESP_RMAKER_PARAM_POWER "esp.param.power" -#define ESP_RMAKER_PARAM_BRIGHTNESS "esp.param.brightness" -#define ESP_RMAKER_PARAM_HUE "esp.param.hue" -#define ESP_RMAKER_PARAM_SATURATION "esp.param.saturation" -#define ESP_RMAKER_PARAM_INTENSITY "esp.param.intensity" -#define ESP_RMAKER_PARAM_CCT "esp.param.cct" -#define ESP_RMAKER_PARAM_SPEED "esp.param.speed" -#define ESP_RMAKER_PARAM_DIRECTION "esp.param.direction" -#define ESP_RMAKER_PARAM_TEMPERATURE "esp.param.temperature" -#define ESP_RMAKER_PARAM_OTA_STATUS "esp.param.ota_status" -#define ESP_RMAKER_PARAM_OTA_INFO "esp.param.ota_info" -#define ESP_RMAKER_PARAM_OTA_URL "esp.param.ota_url" -#define ESP_RMAKER_PARAM_TIMEZONE "esp.param.tz" -#define ESP_RMAKER_PARAM_TIMEZONE_POSIX "esp.param.tz_posix" -#define ESP_RMAKER_PARAM_SCHEDULES "esp.param.schedules" -#define ESP_RMAKER_PARAM_REBOOT "esp.param.reboot" -#define ESP_RMAKER_PARAM_FACTORY_RESET "esp.param.factory-reset" -#define ESP_RMAKER_PARAM_WIFI_RESET "esp.param.wifi-reset" -#define ESP_RMAKER_PARAM_LOCAL_CONTROL_POP "esp.param.local_control_pop" -#define ESP_RMAKER_PARAM_LOCAL_CONTROL_TYPE "esp.param.local_control_type" - - -/********** STANDARD DEVICE TYPES **********/ - -#define ESP_RMAKER_DEVICE_SWITCH "esp.device.switch" -#define ESP_RMAKER_DEVICE_LIGHTBULB "esp.device.lightbulb" -#define ESP_RMAKER_DEVICE_FAN "esp.device.fan" -#define ESP_RMAKER_DEVICE_TEMP_SENSOR "esp.device.temperature-sensor" - - -/********** STANDARD SERVICE TYPES **********/ -#define ESP_RMAKER_SERVICE_OTA "esp.service.ota" -#define ESP_RMAKER_SERVICE_TIME "esp.service.time" -#define ESP_RMAKER_SERVICE_SCHEDULE "esp.service.schedule" -#define ESP_RMAKER_SERVICE_SYSTEM "esp.service.system" -#define ESP_RMAKER_SERVICE_LOCAL_CONTROL "esp.service.local_control" - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_user_mapping.h b/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_user_mapping.h deleted file mode 100644 index 77a153b02f2..00000000000 --- a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_user_mapping.h +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** User-Node Mapping states */ -typedef enum { - /** Mapping does not exist or is not initialized */ - ESP_RMAKER_USER_MAPPING_RESET = 0, - /** Mapping has started */ - ESP_RMAKER_USER_MAPPING_STARTED, - /** Mapping is done */ - ESP_RMAKER_USER_MAPPING_DONE, -} esp_rmaker_user_mapping_state_t; - -/** - * Get User-Node mapping state - * - * This returns the current user-node mapping state. - * - * @return user mapping state - */ -esp_rmaker_user_mapping_state_t esp_rmaker_user_node_mapping_get_state(void); - -/** - * Create User Mapping Endpoint - * - * This will create a custom provisioning endpoint for user-node mapping. - * This should be called after wifi_prov_mgr_init() but before - * wifi_prov_mgr_start_provisioning() - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_user_mapping_endpoint_create(void); - -/** - * Register User Mapping Endpoint - * - * This will register the callback for the custom provisioning endpoint - * for user-node mapping which was created with esp_rmaker_user_mapping_endpoint_create(). - * This should be called immediately after wifi_prov_mgr_start_provisioning(). - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_user_mapping_endpoint_register(void); - -/** Add User-Node mapping - * - * This call will start the user-node mapping workflow on the node. - * This is automatically called if you have used esp_rmaker_user_mapping_endpoint_register(). - * Use this API only if you want to trigger the user-node mapping after the Wi-Fi provisioning - * has already been done. - * - * @param[in] user_id The User identifier received from the client (Phone app/CLI) - * @param[in] secret_key The Secret key received from the client (Phone app/CLI) - * - * @return ESP_OK if the workflow was successfully triggered. This does not guarantee success - * of the actual mapping. The mapping status needs to be checked separately by the clients. - * @return error on failure. - */ -esp_err_t esp_rmaker_start_user_node_mapping(char *user_id, char *secret_key); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32c3/include/fb_gfx/include/fb_gfx.h b/tools/sdk/esp32c3/include/fb_gfx/include/fb_gfx.h index 079ff7bfe4a..158c80f6bf4 100644 --- a/tools/sdk/esp32c3/include/fb_gfx/include/fb_gfx.h +++ b/tools/sdk/esp32c3/include/fb_gfx/include/fb_gfx.h @@ -19,7 +19,7 @@ extern "C" { #endif typedef enum { - FB_RGB888, FB_BGR888, FB_RGB565, FB_BGR565 + FB_RGB888, FB_BGR888, FB_RGB565, FB_BGR565, FB_GRAY } fb_format_t; typedef struct { diff --git a/tools/sdk/esp32c3/ld/libbtbb.a b/tools/sdk/esp32c3/ld/libbtbb.a index e315c7957bc..e58a848e6e9 100644 Binary files a/tools/sdk/esp32c3/ld/libbtbb.a and b/tools/sdk/esp32c3/ld/libbtbb.a differ diff --git a/tools/sdk/esp32c3/ld/libphy.a b/tools/sdk/esp32c3/ld/libphy.a index 9b65b01c3f9..ebf9e4709a6 100644 Binary files a/tools/sdk/esp32c3/ld/libphy.a and b/tools/sdk/esp32c3/ld/libphy.a differ diff --git a/tools/sdk/esp32c3/lib/libapp_update.a b/tools/sdk/esp32c3/lib/libapp_update.a index 1d32e3d3e9a..7743ebfd441 100644 Binary files a/tools/sdk/esp32c3/lib/libapp_update.a and b/tools/sdk/esp32c3/lib/libapp_update.a differ diff --git a/tools/sdk/esp32c3/lib/libdriver.a b/tools/sdk/esp32c3/lib/libdriver.a index 1ecedb27c2f..e66fcd2404c 100644 Binary files a/tools/sdk/esp32c3/lib/libdriver.a and b/tools/sdk/esp32c3/lib/libdriver.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_adc_cal.a b/tools/sdk/esp32c3/lib/libesp_adc_cal.a index 4a41ce31fe4..4b629a84948 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_adc_cal.a and b/tools/sdk/esp32c3/lib/libesp_adc_cal.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_littlefs.a b/tools/sdk/esp32c3/lib/libesp_littlefs.a index 4a3e94011b4..055bca7bf4b 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_littlefs.a and b/tools/sdk/esp32c3/lib/libesp_littlefs.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_phy.a b/tools/sdk/esp32c3/lib/libesp_phy.a index 5b57fac54ce..1ef12e78fc3 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_phy.a and b/tools/sdk/esp32c3/lib/libesp_phy.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_rainmaker.a b/tools/sdk/esp32c3/lib/libesp_rainmaker.a index 6f1187a827b..bd120aaaeaf 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_rainmaker.a and b/tools/sdk/esp32c3/lib/libesp_rainmaker.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_wifi.a b/tools/sdk/esp32c3/lib/libesp_wifi.a index ad75cf9a7c5..a8d464f85ef 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_wifi.a and b/tools/sdk/esp32c3/lib/libesp_wifi.a differ diff --git a/tools/sdk/esp32c3/lib/libfb_gfx.a b/tools/sdk/esp32c3/lib/libfb_gfx.a index 1b373f177d0..23cd0bff10c 100644 Binary files a/tools/sdk/esp32c3/lib/libfb_gfx.a and b/tools/sdk/esp32c3/lib/libfb_gfx.a differ diff --git a/tools/sdk/esp32c3/lib/libhal.a b/tools/sdk/esp32c3/lib/libhal.a index f871ad9fe12..e0eca21289e 100644 Binary files a/tools/sdk/esp32c3/lib/libhal.a and b/tools/sdk/esp32c3/lib/libhal.a differ diff --git a/tools/sdk/esp32c3/lib/liblwip.a b/tools/sdk/esp32c3/lib/liblwip.a index 84d6cf9d895..46caaf3ccc6 100644 Binary files a/tools/sdk/esp32c3/lib/liblwip.a and b/tools/sdk/esp32c3/lib/liblwip.a differ diff --git a/tools/sdk/esp32c3/qspi_qspi/include/sdkconfig.h b/tools/sdk/esp32c3/qspi_qspi/include/sdkconfig.h index 722430e86a6..750b6236242 100644 --- a/tools/sdk/esp32c3/qspi_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32c3/qspi_qspi/include/sdkconfig.h @@ -60,6 +60,7 @@ #define CONFIG_ESP_RMAKER_OTA_AUTOFETCH_PERIOD 0 #define CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE 1024 #define CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES 10 +#define CONFIG_ESP_RMAKER_SCENES_MAX_SCENES 10 #define CONFIG_ENABLE_ARDUINO_DEPENDS 1 #define CONFIG_AUTOSTART_ARDUINO 1 #define CONFIG_ARDUINO_RUN_CORE0 1 @@ -674,5 +675,5 @@ #define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX #define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "c29343eb94" +#define CONFIG_ARDUINO_IDF_COMMIT "b8050b365e" #define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32c3/qspi_qspi/libesp_hw_support.a b/tools/sdk/esp32c3/qspi_qspi/libesp_hw_support.a index 4956ab61ab6..60089e301ee 100644 Binary files a/tools/sdk/esp32c3/qspi_qspi/libesp_hw_support.a and b/tools/sdk/esp32c3/qspi_qspi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32c3/qspi_qspi/libesp_system.a b/tools/sdk/esp32c3/qspi_qspi/libesp_system.a index f5c158fbb41..2cdce053943 100644 Binary files a/tools/sdk/esp32c3/qspi_qspi/libesp_system.a and b/tools/sdk/esp32c3/qspi_qspi/libesp_system.a differ diff --git a/tools/sdk/esp32c3/sdkconfig b/tools/sdk/esp32c3/sdkconfig index 28ea4a3fcca..940e91f67dc 100644 --- a/tools/sdk/esp32c3/sdkconfig +++ b/tools/sdk/esp32c3/sdkconfig @@ -173,6 +173,13 @@ CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE=1024 # CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES=10 # end of ESP RainMaker Scheduling + +# +# ESP RainMaker Scenes +# +CONFIG_ESP_RMAKER_SCENES_MAX_SCENES=10 +# CONFIG_ESP_RMAKER_SCENES_DEACTIVATE_SUPPORT is not set +# end of ESP RainMaker Scenes # end of ESP RainMaker Config # diff --git a/tools/sdk/esp32s2/include/esp_common/include/esp_idf_version.h b/tools/sdk/esp32s2/include/esp_common/include/esp_idf_version.h index 7637b814b65..db04f85f90a 100644 --- a/tools/sdk/esp32s2/include/esp_common/include/esp_idf_version.h +++ b/tools/sdk/esp32s2/include/esp_common/include/esp_idf_version.h @@ -23,7 +23,7 @@ extern "C" { /** Minor version number (x.X.x) */ #define ESP_IDF_VERSION_MINOR 4 /** Patch version number (x.x.X) */ -#define ESP_IDF_VERSION_PATCH 0 +#define ESP_IDF_VERSION_PATCH 1 /** * Macro to convert IDF version number into an integer diff --git a/tools/sdk/esp32s2/include/esp_hw_support/port/esp32s2/regi2c_ctrl.h b/tools/sdk/esp32s2/include/esp_hw_support/port/esp32s2/regi2c_ctrl.h index 5058cbb57ee..49c247499a2 100644 --- a/tools/sdk/esp32s2/include/esp_hw_support/port/esp32s2/regi2c_ctrl.h +++ b/tools/sdk/esp32s2/include/esp_hw_support/port/esp32s2/regi2c_ctrl.h @@ -60,6 +60,10 @@ uint8_t regi2c_ctrl_read_reg_mask(uint8_t block, uint8_t host_id, uint8_t reg_ad void regi2c_ctrl_write_reg(uint8_t block, uint8_t host_id, uint8_t reg_add, uint8_t data); void regi2c_ctrl_write_reg_mask(uint8_t block, uint8_t host_id, uint8_t reg_add, uint8_t msb, uint8_t lsb, uint8_t data); +/* enter the critical section that protects internal registers. Don't use it in SDK. Use the functions above. */ +void regi2c_enter_critical(void); +void regi2c_exit_critical(void); + #endif // BOOTLOADER_BUILD /* Convenience macros for the above functions, these use register definitions diff --git a/tools/sdk/esp32s2/include/esp_littlefs/include/esp_littlefs.h b/tools/sdk/esp32s2/include/esp_littlefs/include/esp_littlefs.h index 7b5abe9248f..07f35231291 100644 --- a/tools/sdk/esp32s2/include/esp_littlefs/include/esp_littlefs.h +++ b/tools/sdk/esp32s2/include/esp_littlefs/include/esp_littlefs.h @@ -1,24 +1,9 @@ #ifndef ESP_LITTLEFS_H__ #define ESP_LITTLEFS_H__ -#include -#include -#include -#include -#include -#include "freertos/FreeRTOS.h" -#include "freertos/semphr.h" #include "esp_err.h" -#include -#include -#include -#include -#include -#include -#include -#include "sdkconfig.h" - #include "littlefs/lfs.h" +#include "sdkconfig.h" #ifdef __cplusplus extern "C" { diff --git a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_console.h b/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_console.h deleted file mode 100644 index 70c02ffeae0..00000000000 --- a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_console.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. - -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Initialize console - * - * Initializes serial console and adds basic commands. - * - * @return ESP_OK on success. - * @return error in case of failures. - */ -esp_err_t esp_rmaker_console_init(void); - -/* Reference for adding custom console commands: -#include - -static int command_console_handler(int argc, char *argv[]) -{ - // Command code here -} - -static void register_console_command() -{ - const esp_console_cmd_t cmd = { - .command = "", - .help = "", - .func = &command_console_handler, - }; - ESP_ERROR_CHECK(esp_console_cmd_register(&cmd)); -} -*/ - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_core.h b/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_core.h deleted file mode 100644 index f9d96be4ee6..00000000000 --- a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_core.h +++ /dev/null @@ -1,893 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -#define ESP_RMAKER_CONFIG_VERSION "2020-03-20" - -/* Maximum length of the alert message that can be passed to esp_rmaker_raise_alert() */ -#define ESP_RMAKER_MAX_ALERT_LEN 100 - -/** @cond **/ -/** ESP RainMaker Event Base */ -ESP_EVENT_DECLARE_BASE(RMAKER_EVENT); -/** @endcond **/ - -/** ESP RainMaker Events */ -typedef enum { - /** RainMaker Core Initialisation Done */ - RMAKER_EVENT_INIT_DONE = 1, - /** Self Claiming Started */ - RMAKER_EVENT_CLAIM_STARTED, - /** Self Claiming was Successful */ - RMAKER_EVENT_CLAIM_SUCCESSFUL, - /** Self Claiming Failed */ - RMAKER_EVENT_CLAIM_FAILED, - /** Node side communication for User-Node mapping done. - * Actual mapping state will be managed by the ESP RainMaker cloud based on the user side communication. - * Associated data is the NULL terminated user id. - */ - RMAKER_EVENT_USER_NODE_MAPPING_DONE, - /** Local control started. Associated data is the NULL terminated Service Name */ - RMAKER_EVENT_LOCAL_CTRL_STARTED, - /* User reset request successfully sent to ESP RainMaker Cloud */ - RMAKER_EVENT_USER_NODE_MAPPING_RESET, -} esp_rmaker_event_t; - -/** ESP RainMaker Node information */ -typedef struct { - /** Name of the Node */ - char *name; - /** Type of the Node */ - char *type; - /** Firmware Version (Optional). If not set, PROJECT_VER is used as default (recommended)*/ - char *fw_version; - /** Model (Optional). If not set, PROJECT_NAME is used as default (recommended)*/ - char *model; -} esp_rmaker_node_info_t; - -/** ESP RainMaker Configuration */ -typedef struct { - /** Enable Time Sync - * Setting this true will enable SNTP and fetch the current time before - * attempting to connect to the ESP RainMaker service - */ - bool enable_time_sync; -} esp_rmaker_config_t; - -/** ESP RainMaker Parameter Value type */ -typedef enum { - /** Invalid */ - RMAKER_VAL_TYPE_INVALID = 0, - /** Boolean */ - RMAKER_VAL_TYPE_BOOLEAN, - /** Integer. Mapped to a 32 bit signed integer */ - RMAKER_VAL_TYPE_INTEGER, - /** Floating point number */ - RMAKER_VAL_TYPE_FLOAT, - /** NULL terminated string */ - RMAKER_VAL_TYPE_STRING, - /** NULL terminated JSON Object string Eg. {"name":"value"} */ - RMAKER_VAL_TYPE_OBJECT, - /** NULL terminated JSON Array string Eg. [1,2,3] */ - RMAKER_VAL_TYPE_ARRAY, -} esp_rmaker_val_type_t; - -/** ESP RainMaker Value */ -typedef union { - /** Boolean */ - bool b; - /** Integer */ - int i; - /** Float */ - float f; - /** NULL terminated string */ - char *s; -} esp_rmaker_val_t; - -/** ESP RainMaker Parameter Value */ -typedef struct { - /** Type of Value */ - esp_rmaker_val_type_t type; - /** Actual value. Depends on the type */ - esp_rmaker_val_t val; -} esp_rmaker_param_val_t; - -/** Param property flags */ -typedef enum { - PROP_FLAG_WRITE = (1 << 0), - PROP_FLAG_READ = (1 << 1), - PROP_FLAG_TIME_SERIES = (1 << 2), - PROP_FLAG_PERSIST = (1 << 3) -} esp_param_property_flags_t; - -/** System Service Reboot Flag */ -#define SYSTEM_SERV_FLAG_REBOOT (1 << 0) - -/** System Service Factory Reset Flag */ -#define SYSTEM_SERV_FLAG_FACTORY_RESET (1 << 1) - -/** System Service Wi-Fi Reset Flag */ -#define SYSTEM_SERV_FLAG_WIFI_RESET (1 << 2) - -/** System Service All Flags */ -#define SYSTEM_SERV_FLAGS_ALL (SYSTEM_SERV_FLAG_REBOOT | SYSTEM_SERV_FLAG_FACTORY_RESET | SYSTEM_SERV_FLAG_WIFI_RESET) - -/** Generic ESP RainMaker handle */ -typedef size_t esp_rmaker_handle_t; - -/** ESP RainMaker Node Handle */ -typedef esp_rmaker_handle_t esp_rmaker_node_t; - -/** ESP RainMaker Device Handle */ -typedef esp_rmaker_handle_t esp_rmaker_device_t; - -/** ESP RainMaker Parameter Handle */ -typedef esp_rmaker_handle_t esp_rmaker_param_t; - -/** Parameter read/write request source */ -typedef enum { - /** Request triggered in the init sequence i.e. when a value is found - * in persistent memory for parameters with PROP_FLAG_PERSIST. - */ - ESP_RMAKER_REQ_SRC_INIT, - /** Request received from cloud */ - ESP_RMAKER_REQ_SRC_CLOUD, - /** Request received when a schedule has triggered */ - ESP_RMAKER_REQ_SRC_SCHEDULE, - /** Request received from a local controller */ - ESP_RMAKER_REQ_SRC_LOCAL, - /** This will always be the last value. Any value equal to or - * greater than this should be considered invalid. - */ - ESP_RMAKER_REQ_SRC_MAX, -} esp_rmaker_req_src_t; - -/** Write request Context */ -typedef struct { - /** Source of request */ - esp_rmaker_req_src_t src; -} esp_rmaker_write_ctx_t; - -/** Read request context */ -typedef struct { - /** Source of request */ - esp_rmaker_req_src_t src; -} esp_rmaker_read_ctx_t; - -/** System service configuration */ -typedef struct { - /** Logical OR of system service flags (SYSTEM_SERV_FLAG_REBOOT, - * SYSTEM_SERV_FLAG_FACTORY_RESET, SYSTEM_SERV_FLAG_WIFI_RESET) as required - * or SYSTEM_SERV_FLAGS_ALL. - */ - uint16_t flags; - /** Time in seconds after which the device should reboot. - * Value of zero would trigger an immediate reboot if a write is received for - * the Reboot parameter. - * Recommended value: 2 - */ - int8_t reboot_seconds; - /** Time in seconds after which the device should reset (Wi-Fi or factory). - * Value of zero would trigger an immediate action if a write is received for - * the Wi-Fi reset or Factory reset parameter. - * Recommended value: 2 - */ - int8_t reset_seconds; - /** Time in seconds after which the device should reboot after it has been reset. - * Value of zero would mean that there won't be any reboot after the reset. - * Recommended value: 2 - */ - int8_t reset_reboot_seconds; -} esp_rmaker_system_serv_config_t; - -/** Callback for parameter value write requests. - * - * The callback should call the esp_rmaker_param_update_and_report() API if the new value is to be set - * and reported back. - * - * @param[in] device Device handle. - * @param[in] param Parameter handle. - * @param[in] param Pointer to \ref esp_rmaker_param_val_t. Use appropriate elements as per the value type. - * @param[in] priv_data Pointer to the private data paassed while creating the device. - * @param[in] ctx Context associated with the request. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -typedef esp_err_t (*esp_rmaker_device_write_cb_t)(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param, - const esp_rmaker_param_val_t val, void *priv_data, esp_rmaker_write_ctx_t *ctx); - -/** Callback for parameter value changes - * - * The callback should call the esp_rmaker_param_update_and_report() API if the new value is to be set - * and reported back. - * - * @note Currently, the read callback never gets invoked as the communication between clients (mobile phones, CLI, etc.) - * and node is asynchronous. So, the read request does not reach the node. This callback will however be used in future. - * - * @param[in] device Device handle. - * @param[in] param Parameter handle. - * @param[in] priv_data Pointer to the private data passed while creating the device. - * @param[in] ctx Context associated with the request. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -typedef esp_err_t (*esp_rmaker_device_read_cb_t)(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param, - void *priv_data, esp_rmaker_read_ctx_t *ctx); - -/** Convert device callback source to string - * - * Device read/write callback can be via different sources. This is a helper API - * to give the source in string format for printing. - * - * Example Usage: - * @code{c} - * static esp_err_t write_cb(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param, - * const esp_rmaker_param_val_t val, void *priv_data, esp_rmaker_write_ctx_t *ctx) -{ - if (ctx) { - ESP_LOGI(TAG, "Received write request via : %s", esp_rmaker_device_cb_src_to_str(ctx->src)); - } - * @endcode - * - * @param[in] src The src field as received in the callback context. - * - * @return NULL terminated source string on success - * @return NULL on failure - */ -const char *esp_rmaker_device_cb_src_to_str(esp_rmaker_req_src_t src); - -/** - * Initialise a Boolean value - * - * @param[in] bval Initialising value. - * - * @return Value structure. - */ -esp_rmaker_param_val_t esp_rmaker_bool(bool bval); - -/** - * Initialise an Integer value - * - * @param[in] ival Initialising value. - * - * @return Value structure. - */ -esp_rmaker_param_val_t esp_rmaker_int(int ival); - -/** - * Initialise a Float value - * - * @param[in] fval Initialising value. - * - * @return Value structure. - */ -esp_rmaker_param_val_t esp_rmaker_float(float fval); - -/** - * Initialise a String value - * - * @param[in] sval Initialising value. - * - * @return Value structure. - */ -esp_rmaker_param_val_t esp_rmaker_str(const char *sval); - -/** - * Initialise a json object value - * - * @note the object will not be validated internally. it is the application's - * responsibility to ensure that the object is a valid json object. - * eg. esp_rmaker_obj("{\"name\":\"value\"}"); - * - * param[in] val initialising value - * - * return value structure - */ -esp_rmaker_param_val_t esp_rmaker_obj(const char *val); - -/** - * Initialise a json array value - * - * @note the array will not be validated internally. it is the application's - * responsibility to ensure that the array is a valid json array. - * eg. esp_rmaker_array("[1,2,3]"); - * - * param[in] val initialising value - * - * return value structure - */ -esp_rmaker_param_val_t esp_rmaker_array(const char *val); - - -/** Initialize ESP RainMaker Node - * - * This initializes the ESP RainMaker agent and creates the node. - * The model and firmware version for the node are set internally as per - * the project name and version. These can be overridden (but not recommended) using the - * esp_rmaker_node_add_fw_version() and esp_rmaker_node_add_model() APIs. - * - * @note This should be the first call before using any other ESP RainMaker API. - * - * @param[in] config Configuration to be used by the ESP RainMaker. - * @param[in] name Name of the node. - * @param[in] type Type of the node. - * - * @return Node handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_node_t *esp_rmaker_node_init(const esp_rmaker_config_t *config, const char *name, const char *type); - -/** Start ESP RainMaker Agent - * - * This call starts the actual ESP RainMaker thread. This should preferably be called after a - * successful Wi-Fi connection in order to avoid unnecessary failures. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_start(void); - -/** Stop ESP RainMaker Agent - * - * This call stops the ESP RainMaker Agent instance started earlier by esp_rmaker_start(). - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_stop(void); - -/** Deinitialize ESP RainMaker Node - * - * This API deinitializes the ESP RainMaker agent and the node created using esp_rmaker_node_init(). - * - * @note This should be called after rainmaker has stopped. - * - * @param[in] node Node Handle returned by esp_rmaker_node_init(). - * - * @retur ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_deinit(const esp_rmaker_node_t *node); - -/** Get a handle to the Node - * - * This API returns handle to a node created using esp_rmaker_node_init(). - * - * @return Node handle on success. - * @return NULL in case of failure. - */ -const esp_rmaker_node_t *esp_rmaker_get_node(void); - -/** Get Node Id - * - * Returns pointer to the NULL terminated Node ID string. - * - * @return Pointer to a NULL terminated Node ID string. - */ -char *esp_rmaker_get_node_id(void); - -/** Get Node Info - * - * Returns pointer to the node info as configured during initialisation. - * - * @param node Node handle. - * - * @return Pointer to the node info on success. - * @return NULL in case of failure. - */ -esp_rmaker_node_info_t *esp_rmaker_node_get_info(const esp_rmaker_node_t *node); - -/** Add Node attribute - * - * Adds a new attribute as the metadata for the node. For the sake of simplicity, - * only string values are allowed. - * - * @param node Node handle. - * @param[in] attr_name Name of the attribute. - * @param[in] val Value for the attribute. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_add_attribute(const esp_rmaker_node_t *node, const char *attr_name, const char *val); - -/** Add FW version for a node (Not recommended) - * - * FW version is set internally to the project version. This API can be used to - * override that version. - * - * @param node Node handle. - * @param[in] fw_version New firmware version. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_add_fw_version(const esp_rmaker_node_t *node, const char *fw_version); - -/** Add model for a node (Not recommended) - * - * Model is set internally to the project name. This API can be used to - * override that name. - * - * @param node Node handle. - * @param[in] model New model string. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_add_model(const esp_rmaker_node_t *node, const char *model); - -/** - * Create a Device - * - * This API will create a virtual "Device". - * This could be something like a Switch, Lightbulb, etc. - * - * @note The device created needs to be added to a node using esp_rmaker_node_add_device(). - * - * @param[in] dev_name The unique device name. - * @param[in] type Optional device type. Can be kept NULL. - * @param[in] priv_data (Optional) Private data associated with the device. This will be passed to callbacks. - * It should stay allocated throughout the lifetime of the device. - * - * @return Device handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_device_create(const char *dev_name, const char *type, void *priv_data); - -/** - * Create a Service - * - * This API will create a "Service". It is exactly same like a device in terms of structure and so, all - * APIs for device are also valid for a service. - * A service could be something like OTA, diagnostics, etc. - * - * @note Name of a service should not clash with name of a device. - * @note The service created needs to be added to a node using esp_rmaker_node_add_device(). - * - * @param[in] serv_name The unique service name. - * @param[in] type Optional service type. Can be kept NULL. - * @param[in] priv_data (Optional) Private data associated with the service. This will be passed to callbacks. - * It should stay allocated throughout the lifetime of the device. - * - * @return Device handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_service_create(const char *serv_name, const char *type, void *priv_data); - -/** - * Delete a Device/Service - * - * This API will delete a device created using esp_rmaker_device_create(). - * - * @note The device should first be removed from the node using esp_rmaker_node_remove_device() before deleting. - * - * @param[in] device Device handle. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_delete(const esp_rmaker_device_t *device); - -/** - * Add callbacks for a device/service - * - * Add read/write callbacks for a device that will be invoked as per requests received from the cloud (or other paths - * as may be added in future). - * - * @param[in] device Device handle. - * @param[in] write_cb Write callback. - * @param[in] read_cb Read callback. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_add_cb(const esp_rmaker_device_t *device, esp_rmaker_device_write_cb_t write_cb, esp_rmaker_device_read_cb_t read_cb); - -/** - * Add a device to a node - * - * @param[in] node Node handle. - * @param[in] device Device handle. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_add_device(const esp_rmaker_node_t *node, const esp_rmaker_device_t *device); - -/** - * Remove a device from a node - * - * @param[in] node Node handle. - * @param[in] device Device handle. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_remove_device(const esp_rmaker_node_t *node, const esp_rmaker_device_t *device); - -/** Get device by name - * - * Get handle for a device based on the name. - * - * @param[in] node Node handle. - * @param[in] device_name Device name to search. - * - * @return Device handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_device_t *esp_rmaker_node_get_device_by_name(const esp_rmaker_node_t *node, const char *device_name); - -/** Add a Device attribute - * - * @note Device attributes are reported only once after a boot-up as part of the node - * configuration. - * Eg. Serial Number - * - * @param[in] device Device handle. - * @param[in] attr_name Name of the attribute. - * @param[in] val Value of the attribute. - * - * @return ESP_OK if the attribute was added successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_add_attribute(const esp_rmaker_device_t *device, const char *attr_name, const char *val); - -/** Add a Device subtype - * - * This can be something like esp.subtype.rgb-light for a device of type esp.device.lightbulb. - * This would primarily be used by the phone apps to render different icons for the same device type. - * - * @param[in] device Device handle. - * @param[in] subtype String describing the sub type. - * - * @return ESP_OK if the subtype was added successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_add_subtype(const esp_rmaker_device_t *device, const char *subtype); - -/** Get device name from handle - * - * @param[in] device Device handle. - * - * @return NULL terminated device name string on success. - * @return NULL in case of failure. - */ -char *esp_rmaker_device_get_name(const esp_rmaker_device_t *device); - -/** Get device type from handle - * - * @param[in] device Device handle. - * - * @return NULL terminated device type string on success. - * @return NULL in case of failure, or if the type wasn't provided while creating the device. - */ -char *esp_rmaker_device_get_type(const esp_rmaker_device_t *device); - -/** - * Add a parameter to a device/service - * - * @param[in] device Device handle. - * @param[in] param Parameter handle. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_add_param(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param); - - -/** Get parameter by type - * - * Get handle for a parameter based on the type. - * - * @note If there are multiple parameters with the same type, this will return the first one. The API - * esp_rmaker_device_get_param_by_name() can be used to get a specific parameter, because the parameter - * names in a device are unique. - * - * @param[in] device Device handle. - * @param[in] param_type Parameter type to search. - * - * @return Parameter handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_param_t *esp_rmaker_device_get_param_by_type(const esp_rmaker_device_t *device, const char *param_type); - -/** Get parameter by name - * - * Get handle for a parameter based on the name. - * - * @param[in] device Device handle. - * @param[in] param_name Parameter name to search. - * - * @return Parameter handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_param_t *esp_rmaker_device_get_param_by_name(const esp_rmaker_device_t *device, const char *param_name); - -/** Assign a primary parameter - * - * Assign a parameter (already added using esp_rmaker_device_add_param()) as a primary parameter, - * which can be used by clients (phone apps specifically) to give prominence to it. - * - * @param[in] device Device handle. - * @param[in] param Parameter handle. - * - * @return ESP_OK if the parameter was assigned as the primary successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_assign_primary_param(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param); - -/** - * Create a Parameter - * - * Parameter can be something like Temperature, Outlet state, Lightbulb brightness, etc. - * - * Any changes should be reported using the esp_rmaker_param_update_and_report() API. - * Any remote changes will be reported to the application via the device callback, if registered. - * - * @note The parameter created needs to be added to a device using esp_rmaker_device_add_param(). - * Parameter name should be unique in a given device. - * - * @param[in] param_name Name of the parameter. - a* @param[in] type Optional parameter type. Can be kept NULL. - * @param[in] val Value of the parameter. This also specifies the type that will be assigned - * to this parameter. You can use esp_rmaker_bool(), esp_rmaker_int(), esp_rmaker_float() - * or esp_rmaker_str() functions as the argument here. Eg, esp_rmaker_bool(true). - * @param[in] properties Properties of the parameter, which will be a logical OR of flags in - * \ref esp_param_property_flags_t. - * - * @return Parameter handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_param_t *esp_rmaker_param_create(const char *param_name, const char *type, - esp_rmaker_param_val_t val, uint8_t properties); - -/** - * Add a UI Type to a parameter - * - * This will be used by the Phone apps (or other clients) to render appropriate UI for the given - * parameter. Please refer the RainMaker documetation for supported UI Types. - * - * @param[in] param Parameter handle. - * @param[in] ui_type String describing the UI Type. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_param_add_ui_type(const esp_rmaker_param_t *param, const char *ui_type); - -/** - * Add bounds for an integer/float parameter - * - * This can be used to add bounds (min/max values) for a given integer parameter. Eg. brightness - * will have bounds as 0 and 100 if it is a percentage. - * Eg. esp_rmaker_param_add_bounds(brightness_param, esp_rmaker_int(0), esp_rmaker_int(100), esp_rmaker_int(5)); - * - * @note The RainMaker core does not check the bounds. It is upto the application to handle it. - * - * @param[in] param Parameter handle. - * @param[in] min Minimum allowed value. - * @param[in] max Maximum allowed value. - * @param[in] step Minimum stepping (set to 0 if no specific value is desired). - * - * @return ESP_OK on success. - * return error in case of failure. - */ -esp_err_t esp_rmaker_param_add_bounds(const esp_rmaker_param_t *param, - esp_rmaker_param_val_t min, esp_rmaker_param_val_t max, esp_rmaker_param_val_t step); - -/** - * Add a list of valid strings for a string parameter - * - * This can be used to add a list of valid strings for a given string parameter. - * - * Eg. - * static const char *valid_strs[] = {"None","Yes","No","Can't Say"}; - * esp_rmaker_param_add_valid_str_list(param, valid_strs, 4); - * - * @note The RainMaker core does not check the values. It is upto the application to handle it. - * - * @param[in] param Parameter handle. - * @param[in] strs Pointer to an array of strings. Note that this memory should stay allocated - * throughout the lifetime of this parameter. - * @param[in] count Number of strings in the above array. - * - * @return ESP_OK on success. - * return error in case of failure. - */ -esp_err_t esp_rmaker_param_add_valid_str_list(const esp_rmaker_param_t *param, const char *strs[], uint8_t count); - -/** Add max count for an array parameter - * - * This can be used to put a limit on the maximum number of elements in an array. - * - * @note The RainMaker core does not check the values. It is upto the application to handle it. - * - * @param[in] param Parameter handle. - * @param[in] count Max number of elements allowed in the array. - * - * @return ESP_OK on success. - * return error in case of failure. - */ -esp_err_t esp_rmaker_param_add_array_max_count(const esp_rmaker_param_t *param, int count); - - -/* Update a parameter - * - * This will just update the value of a parameter with esp rainmaker core, without actually reporting - * it. This can be used when multiple parameters need to be reported together. - * Eg. If x parameters are to be reported, this API can be used for the first x -1 parameters - * and the last one can be updated using esp_rmaker_param_update_and_report(). - * This will report all parameters which were updated prior to this call. - * - * Sample: - * - * esp_rmaker_param_update(param1, esp_rmaker_float(10.2)); - * esp_rmaker_param_update(param2, esp_rmaker_int(55)); - * esp_rmaker_param_update(param3, esp_rmaker_int(95)); - * esp_rmaker_param_update_and_report(param1, esp_rmaker_bool(true)); - * - * @param[in] param Parameter handle. - * @param[in] val New value of the parameter. - * - * @return ESP_OK if the parameter was updated successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_param_update(const esp_rmaker_param_t *param, esp_rmaker_param_val_t val); - -/** Update and report a parameter - * - * Calling this API will update the parameter and report it to ESP RainMaker cloud. - * This should be used whenever there is any local change. - * - * @param[in] param Parameter handle. - * @param[in] val New value of the parameter. - * - * @return ESP_OK if the parameter was updated successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_param_update_and_report(const esp_rmaker_param_t *param, esp_rmaker_param_val_t val); - -/** Update and notify a parameter - * - * Calling this API will update the parameter and report it to ESP RainMaker cloud similar to - * esp_rmaker_param_update_and_report(). However, additionally, it will also trigger a notification - * on the phone apps (if enabled). - * - * @note This should be used only when some local change requires explicit notification even when the - * phone app is in background, not otherwise. - * Eg. Alarm got triggered, temperature exceeded some threshold, etc. - * - * Alternatively, the esp_rmaker_raise_alert() API can also be used to trigger notification - * on the phone apps with pre-formatted text. - * - * @param[in] param Parameter handle. - * @param[in] val New value of the parameter. - * - * @return ESP_OK if the parameter was updated successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_param_update_and_notify(const esp_rmaker_param_t *param, esp_rmaker_param_val_t val); - -/** Trigger an alert on the phone app - * - * This API will trigger a notification alert on the phone apps (if enabled) using the formatted text - * provided. Note that this does not send a notification directly to the phone, but reports the alert - * to the ESP RainMaker cloud which then uses the Notification framework to send notifications to the - * phone apps. The value does not get stored anywhere, nor is it linked to any node parameters. - * - * @note This should be used only if some event requires explicitly alerting the user even when the - * phone app is in background, not otherwise. - * Eg. "Motion Detected", "Fire alarm triggered" - * - * @param[in] alert_str NULL terminated pre-formatted alert string. - * Maximum length can be ESP_RMAKER_MAX_ALERT_LEN, excluding NULL character. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_raise_alert(const char *alert_str); - -/** Get parameter name from handle - * - * @param[in] param Parameter handle. - * - * @return NULL terminated parameter name string on success. - * @return NULL in case of failure. - */ -char *esp_rmaker_param_get_name(const esp_rmaker_param_t *param); - -/** Get parameter type from handle - * - * @param[in] param Parameter handle. - * - * @return NULL terminated parameter type string on success. - * @return NULL in case of failure, or if the type wasn't provided while creating the parameter. - */ -char *esp_rmaker_param_get_type(const esp_rmaker_param_t *param); - -/** Get parameter value - * - * This gives the parameter value that is stored in the RainMaker core. - * - * @note This does not call any explicit functions to read value from hardware/driver. - * - * @param[in] param Parameter handle - * - * @return Pointer to parameter value on success. - * @return NULL in case of failure. - */ -esp_rmaker_param_val_t *esp_rmaker_param_get_val(esp_rmaker_param_t *param); - -/** Report the node details to the cloud - * - * This API reports node details i.e. the node configuration and values of all the parameters to the ESP RainMaker cloud. - * Eg. If a new device is created (with some parameters and attributes), then this API should be called after that - * to send the node details to the cloud again and the changes to be reflected in the clients (like phone apps). - * - * @note Please use this API only if you need to create or delete devices after esp_rmaker_start() has already - * been called, for use cases like bridges or hubs. - * - * @return ESP_OK if the node details are successfully queued to be published. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_report_node_details(void); - -/** Enable Timezone Service - * - * This enables the ESP RainMaker standard timezone service which can be used to set - * timezone, either in POSIX or location string format. Please refer the specifications - * for additional details. - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_timezone_service_enable(void); - -/** Enable System Service - * - * This enables the ESP RainMaker standard system service which can be - * used for operations like reboot, factory reset and Wi-Fi reset. - * - * Please refer the specifications for additional details. - * - * @param[in] config Configuration for the system service. - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_system_service_enable(esp_rmaker_system_serv_config_t *config); - -/** - * Check if local_ctrl service has started - * - * @return true if service has started - * @return false if the service has not started - */ -bool esp_rmaker_local_ctrl_service_started(void); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_mqtt.h b/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_mqtt.h deleted file mode 100644 index 1cc6cd5156e..00000000000 --- a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_mqtt.h +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -esp_rmaker_mqtt_conn_params_t *esp_rmaker_mqtt_get_conn_params(void); - -/** Initialize ESP RainMaker MQTT - * - * @param[in] config The MQTT configuration data - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_init(esp_rmaker_mqtt_conn_params_t *conn_params); - -/** MQTT Connect - * - * Starts the connection attempts to the MQTT broker as per the configuration - * provided during initializing. - * This should ideally be called after successful network connection. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_connect(void); - -/** MQTT Disconnect - * - * Disconnects from the MQTT broker. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_disconnect(void); - -/** Publish MQTT Message - * - * @param[in] topic The MQTT topic on which the message should be published. - * @param[in] data Data to be published - * @param[in] data_len Length of the data - * @param[in] qos Quality of Service for the Publish. Can be 0, 1 or 2. Also depends on what the MQTT broker supports. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_publish(const char *topic, void *data, size_t data_len, uint8_t qos, int *msg_id); - -/** Subscribe to MQTT topic - * - * @param[in] topic The topic to be subscribed to. - * @param[in] cb The callback to be invoked when a message is received on the given topic. - * @param[in] priv_data Optional private data to be passed to the callback - * @param[in] qos Quality of Service for the Subscription. Can be 0, 1 or 2. Also depends on what the MQTT broker supports. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_subscribe(const char *topic, esp_rmaker_mqtt_subscribe_cb_t cb, uint8_t qos, void *priv_data); - -/** Unsubscribe from MQTT topic - * - * @param[in] topic Topic from which to unsubscribe. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_unsubscribe(const char *topic); -esp_err_t esp_rmaker_mqtt_setup(esp_rmaker_mqtt_config_t mqtt_config); -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_ota.h b/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_ota.h deleted file mode 100644 index e66b95705bc..00000000000 --- a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_ota.h +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Default ESP RainMaker OTA Server Certificate */ -extern const char *ESP_RMAKER_OTA_DEFAULT_SERVER_CERT; - -/** OTA Status to be reported to ESP RainMaker Cloud */ -typedef enum { - /** OTA is in Progress. This can be reported multiple times as the OTA progresses. */ - OTA_STATUS_IN_PROGRESS = 1, - /** OTA Succeeded. This should be reported only once, at the end of OTA. */ - OTA_STATUS_SUCCESS, - /** OTA Failed. This should be reported only once, at the end of OTA. */ - OTA_STATUS_FAILED, - /** OTA was delayed by the application */ - OTA_STATUS_DELAYED, -} ota_status_t; - -/** OTA Workflow type */ -typedef enum { - /** OTA will be performed using services and parameters. */ - OTA_USING_PARAMS = 1, - /** OTA will be performed using pre-defined MQTT topics. */ - OTA_USING_TOPICS -} esp_rmaker_ota_type_t; - -/** The OTA Handle to be used by the OTA callback */ -typedef void *esp_rmaker_ota_handle_t; - -/** OTA Data */ -typedef struct { - /** The OTA URL received from ESP RainMaker Cloud */ - char *url; - /** Size of the OTA File. Can be 0 if the file size isn't received from - * the ESP RainMaker Cloud */ - int filesize; - /** The server certificate passed in esp_rmaker_enable_ota() */ - const char *server_cert; - /** The private data passed in esp_rmaker_enable_ota() */ - char *priv; -} esp_rmaker_ota_data_t; - -/** Function prototype for OTA Callback - * - * This function will be invoked by the ESP RainMaker core whenever an OTA is available. - * The esp_rmaker_report_ota_status() API should be used to indicate the progress and - * success/fail status. - * - * @param[in] handle An OTA handle assigned by the ESP RainMaker Core - * @param[in] ota_data The data to be used for the OTA - * - * @return ESP_OK if the OTA was successful - * @return ESP_FAIL if the OTA failed. - */ -typedef esp_err_t (*esp_rmaker_ota_cb_t) (esp_rmaker_ota_handle_t handle, - esp_rmaker_ota_data_t *ota_data); - -/** Function Prototype for Post OTA Diagnostics - * - * If the Application rollback feature is enabled, this callback will be invoked - * as soon as you call esp_rmaker_ota_enable(), if it is the first - * boot after an OTA. You may perform some application specific diagnostics and - * report the status which will decide whether to roll back or not. - * - * @return true if diagnostics are successful, meaning that the new firmware is fine. - * @return false if diagnostics fail and a roolback to previous firmware is required. - */ -typedef bool (*esp_rmaker_post_ota_diag_t)(void); - -/** ESP RainMaker OTA Configuration */ -typedef struct { - /** OTA Callback. - * The callback to be invoked when an OTA Job is available. - * If kept NULL, the internal default callback will be used (Recommended). - */ - esp_rmaker_ota_cb_t ota_cb; - /** OTA Diagnostics Callback. - * A post OTA diagnostic handler to be invoked if app rollback feature is enabled. - * If kept NULL, the new firmware will be assumed to be fine, - * and no rollback will be performed. - */ - esp_rmaker_post_ota_diag_t ota_diag; - /** Server Certificate. - * The certificate to be passed to the OTA callback for server authentication. - * This is mandatory, unless you have disabled it in ESP HTTPS OTA config option. - * If you are using the ESP RainMaker OTA Service, you can just set this to - * `ESP_RMAKER_OTA_DEFAULT_SERVER_CERT`. - */ - const char *server_cert; - /** Private Data. - * Optional private data to be passed to the OTA callback. - */ - void *priv; -} esp_rmaker_ota_config_t; - -/** Enable OTA - * - * Calling this API enables OTA as per the ESP RainMaker specification. - * Please check the various ESP RainMaker configuration options to - * use the different variants of OTA. Refer the documentation for - * additional details. - * - * @param[in] ota_config Pointer to an OTA configuration structure - * @param[in] type The OTA workflow type - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_ota_enable(esp_rmaker_ota_config_t *ota_config, esp_rmaker_ota_type_t type); - -/** Report OTA Status - * - * This API must be called from the OTA Callback to indicate the status of the OTA. The OTA_STATUS_IN_PROGRESS - * can be reported multiple times with appropriate additional information. The final success/failure should - * be reported only once, at the end. - * - * This can be ignored if you are using the default internal OTA callback. - * - * @param[in] ota_handle The OTA handle received by the callback - * @param[in] status Status to be reported - * @param[in] additional_info NULL terminated string indicating additional information for the status - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_ota_report_status(esp_rmaker_ota_handle_t ota_handle, ota_status_t status, char *additional_info); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_schedule.h b/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_schedule.h deleted file mode 100644 index 383c0949188..00000000000 --- a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_schedule.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. - -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Enable Schedules - * - * This API enables the scheduling service for the node. For more information, - * check [here](https://rainmaker.espressif.com/docs/scheduling.html) - * - * It is recommended to set the timezone while using schedules. Check [here](https://rainmaker.espressif.com/docs/time-service.html#time-zone) for more information on timezones - * - * @note This API should be called after esp_rmaker_node_init() but before esp_rmaker_start(). - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_schedule_enable(void); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_standard_devices.h b/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_standard_devices.h deleted file mode 100644 index db9480672ba..00000000000 --- a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_standard_devices.h +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. - -#pragma once -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Create a standard Switch device - * - * This creates a Switch device with the mandatory parameters and also assigns - * the primary parameter. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] dev_name The unique device name - * @param[in] priv_data (Optional) Private data associated with the device. This should stay - * allocated throughout the lifetime of the device - * #@param[in] power Default value of the mandatory parameter "power" - * - * @return Device handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_device_t *esp_rmaker_switch_device_create(const char *dev_name, - void *priv_data, bool power); - -/** Create a standard Lightbulb device - * - * This creates a Lightbulb device with the mandatory parameters and also assigns - * the primary parameter. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] dev_name The unique device name - * @param[in] priv_data (Optional) Private data associated with the device. This should stay - * allocated throughout the lifetime of the device - * @param[in] power Default value of the mandatory parameter "power" - * - * @return Device handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_device_t *esp_rmaker_lightbulb_device_create(const char *dev_name, - void *priv_data, bool power); - -/** Create a standard Fan device - * - * This creates a Fan device with the mandatory parameters and also assigns - * the primary parameter. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] dev_name The unique device name - * @param[in] priv_data (Optional) Private data associated with the device. This should stay - * allocated throughout the lifetime of the device - * @param[in] power Default value of the mandatory parameter "power" - * - * @return Device handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_device_t *esp_rmaker_fan_device_create(const char *dev_name, - void *priv_data, bool power); - -/** Create a standard Temperature Sensor device - * - * This creates a Temperature Sensor device with the mandatory parameters and also assigns - * the primary parameter. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] dev_name The unique device name - * @param[in] priv_data (Optional) Private data associated with the device. This should stay - * allocated throughout the lifetime of the device - * @param[in] temperature Default value of the mandatory parameter "temperature" - * - * @return Device handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_device_t *esp_rmaker_temp_sensor_device_create(const char *dev_name, - void *priv_data, float temperature); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_standard_params.h b/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_standard_params.h deleted file mode 100644 index 6cde69a2935..00000000000 --- a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_standard_params.h +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Suggested default names for the parameters. - * These will also be used by default if you use any standard device helper APIs. - * - * @note These names are not mandatory. You can use the ESP RainMaker Core APIs - * to create your own parameters with custom names, if required. - */ - -#define ESP_RMAKER_DEF_NAME_PARAM "Name" -#define ESP_RMAKER_DEF_POWER_NAME "Power" -#define ESP_RMAKER_DEF_BRIGHTNESS_NAME "Brightness" -#define ESP_RMAKER_DEF_HUE_NAME "Hue" -#define ESP_RMAKER_DEF_SATURATION_NAME "Saturation" -#define ESP_RMAKER_DEF_INTENSITY_NAME "Intensity" -#define ESP_RMAKER_DEF_CCT_NAME "CCT" -#define ESP_RMAKER_DEF_DIRECTION_NAME "Direction" -#define ESP_RMAKER_DEF_SPEED_NAME "Speed" -#define ESP_RMAKER_DEF_TEMPERATURE_NAME "Temperature" -#define ESP_RMAKER_DEF_OTA_STATUS_NAME "Status" -#define ESP_RMAKER_DEF_OTA_INFO_NAME "Info" -#define ESP_RMAKER_DEF_OTA_URL_NAME "URL" -#define ESP_RMAKER_DEF_TIMEZONE_NAME "TZ" -#define ESP_RMAKER_DEF_TIMEZONE_POSIX_NAME "TZ-POSIX" -#define ESP_RMAKER_DEF_SCHEDULE_NAME "Schedules" -#define ESP_RMAKER_DEF_REBOOT_NAME "Reboot" -#define ESP_RMAKER_DEF_FACTORY_RESET_NAME "Factory-Reset" -#define ESP_RMAKER_DEF_WIFI_RESET_NAME "Wi-Fi-Reset" -#define ESP_RMAKER_DEF_LOCAL_CONTROL_POP "POP" -#define ESP_RMAKER_DEF_LOCAL_CONTROL_TYPE "Type" - -/** - * Create standard name param - * - * This will create the standard name parameter. - * This should be added to all devices for which you want a user customisable name. - * The value should be same as the device name. - * - * All standard device creation APIs will add this internally. - * No application registered callback will be called for this parameter, - * and changes will be managed internally. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_name_param_create(const char *param_name, const char *val); - -/** - * Create standard Power param - * - * This will create the standard power parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_power_param_create(const char *param_name, bool val); - -/** - * Create standard Brightness param - * - * This will create the standard brightness parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_brightness_param_create(const char *param_name, int val); - -/** - * Create standard Hue param - * - * This will create the standard hue parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_hue_param_create(const char *param_name, int val); - -/** - * Create standard Saturation param - * - * This will create the standard saturation parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_saturation_param_create(const char *param_name, int val); - -/** - * Create standard Intensity param - * - * This will create the standard intensity parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_intensity_param_create(const char *param_name, int val); - -/** - * Create standard CCT param - * - * This will create the standard cct parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_cct_param_create(const char *param_name, int val); - -/** - * Create standard Direction param - * - * This will create the standard direction parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_direction_param_create(const char *param_name, int val); - -/** - * Create standard Speed param - * - * This will create the standard speed parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_speed_param_create(const char *param_name, int val); - -/** - * Create standard Temperature param - * - * This will create the standard temperature parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_temperature_param_create(const char *param_name, float val); - -/** - * Create standard OTA Status param - * - * This will create the standard ota status parameter. Default value - * is set internally. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_ota_status_param_create(const char *param_name); - -/** - * Create standard OTA Info param - * - * This will create the standard ota info parameter. Default value - * is set internally. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_ota_info_param_create(const char *param_name); - -/** - * Create standard OTA URL param - * - * This will create the standard ota url parameter. Default value - * is set internally. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_ota_url_param_create(const char *param_name); - -/** - * Create standard Timezone param - * - * This will create the standard timezone parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter (Eg. "Asia/Shanghai"). Can be kept NULL. - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_timezone_param_create(const char *param_name, const char *val); - -/** - * Create standard POSIX Timezone param - * - * This will create the standard posix timezone parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter (Eg. "CST-8"). Can be kept NULL. - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_timezone_posix_param_create(const char *param_name, const char *val); - -/** - * Create standard Schedules param - * - * This will create the standard schedules parameter. Default value - * is set internally. - * - * @param[in] param_name Name of the parameter - * @param[in] max_schedules Maximum number of schedules allowed - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_schedules_param_create(const char *param_name, int max_schedules); - -/** - * Create standard Reboot param - * - * This will create the standard reboot parameter. - * Set value to true (via write param) for the action to trigger. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_reboot_param_create(const char *param_name); - -/** - * Create standard Factory Reset param - * - * This will create the standard factory reset parameter. - * Set value to true (via write param) for the action to trigger. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_factory_reset_param_create(const char *param_name); - -/** - * Create standard Wi-Fi Reset param - * - * This will create the standard Wi-Fi Reset parameter. - * Set value to true (via write param) for the action to trigger. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_wifi_reset_param_create(const char *param_name); - -/** - * Create standard Local Control POP param - * - * This will create the standard Local Control POP parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter (Eg. "abcd1234"). Can be kept NULL. - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_local_control_pop_param_create(const char *param_name, const char *val); - -/** - * Create standard Local Control Type param - * - * This will create the standard Local Control security type parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_local_control_type_param_create(const char *param_name, int val); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_standard_services.h b/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_standard_services.h deleted file mode 100644 index 7dc6dfbad80..00000000000 --- a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_standard_services.h +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. - -#pragma once -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Create a standard OTA service - * - * This creates an OTA service with the mandatory parameters. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] serv_name The unique service name - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_ota_service_create(const char *serv_name, void *priv_data); - -/** Create a standard OTA service - * - * This creates an OTA service with the mandatory parameters. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] serv_name The unique service name - * @param[in] timezone Default value of timezone string (Eg. "Asia/Shanghai"). Can be kept NULL. - * @param[in] timezone_posix Default value of posix timezone string (Eg. "CST-8"). Can be kept NULL. - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_time_service_create(const char *serv_name, const char *timezone, - const char *timezone_posix, void *priv_data); - -/** Create a standard Schedule service - * - * This creates a Schedule service with the mandatory parameters. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] serv_name The unique service name - * @param[in] write_cb Write callback. - * @param[in] read_cb Read callback. - * @param[in] max_schedules Maximum number of schedules supported. - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_create_schedule_service(const char *serv_name, esp_rmaker_device_write_cb_t write_cb, esp_rmaker_device_read_cb_t read_cb, int max_schedules, void *priv_data); - -/** Create a standard System service - * - * This creates an empty System service. Appropriate parameters should be added by the caller. - * - * @param[in] serv_name The unique service name - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ - -esp_rmaker_device_t *esp_rmaker_create_system_service(const char *serv_name, void *priv_data); - -/** Create a standard Local Control service - * - * This creates a Local Control service with the mandatory parameters. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] serv_name The unique service name - * @param[in] pop Proof of possession - * @param[in] sec_type Security type - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_create_local_control_service(const char *serv_name, const char *pop, int sec_type, void *priv_data); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_standard_types.h b/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_standard_types.h deleted file mode 100644 index 11eecebcb1c..00000000000 --- a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_standard_types.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -/********** STANDARD UI TYPES **********/ - -#define ESP_RMAKER_UI_TOGGLE "esp.ui.toggle" -#define ESP_RMAKER_UI_SLIDER "esp.ui.slider" -#define ESP_RMAKER_UI_DROPDOWN "esp.ui.dropdown" -#define ESP_RMAKER_UI_TEXT "esp.ui.text" -#define ESP_RMAKER_UI_HUE_SLIDER "esp.ui.hue-slider" - -/********** STANDARD PARAM TYPES **********/ - -#define ESP_RMAKER_PARAM_NAME "esp.param.name" -#define ESP_RMAKER_PARAM_POWER "esp.param.power" -#define ESP_RMAKER_PARAM_BRIGHTNESS "esp.param.brightness" -#define ESP_RMAKER_PARAM_HUE "esp.param.hue" -#define ESP_RMAKER_PARAM_SATURATION "esp.param.saturation" -#define ESP_RMAKER_PARAM_INTENSITY "esp.param.intensity" -#define ESP_RMAKER_PARAM_CCT "esp.param.cct" -#define ESP_RMAKER_PARAM_SPEED "esp.param.speed" -#define ESP_RMAKER_PARAM_DIRECTION "esp.param.direction" -#define ESP_RMAKER_PARAM_TEMPERATURE "esp.param.temperature" -#define ESP_RMAKER_PARAM_OTA_STATUS "esp.param.ota_status" -#define ESP_RMAKER_PARAM_OTA_INFO "esp.param.ota_info" -#define ESP_RMAKER_PARAM_OTA_URL "esp.param.ota_url" -#define ESP_RMAKER_PARAM_TIMEZONE "esp.param.tz" -#define ESP_RMAKER_PARAM_TIMEZONE_POSIX "esp.param.tz_posix" -#define ESP_RMAKER_PARAM_SCHEDULES "esp.param.schedules" -#define ESP_RMAKER_PARAM_REBOOT "esp.param.reboot" -#define ESP_RMAKER_PARAM_FACTORY_RESET "esp.param.factory-reset" -#define ESP_RMAKER_PARAM_WIFI_RESET "esp.param.wifi-reset" -#define ESP_RMAKER_PARAM_LOCAL_CONTROL_POP "esp.param.local_control_pop" -#define ESP_RMAKER_PARAM_LOCAL_CONTROL_TYPE "esp.param.local_control_type" - - -/********** STANDARD DEVICE TYPES **********/ - -#define ESP_RMAKER_DEVICE_SWITCH "esp.device.switch" -#define ESP_RMAKER_DEVICE_LIGHTBULB "esp.device.lightbulb" -#define ESP_RMAKER_DEVICE_FAN "esp.device.fan" -#define ESP_RMAKER_DEVICE_TEMP_SENSOR "esp.device.temperature-sensor" - - -/********** STANDARD SERVICE TYPES **********/ -#define ESP_RMAKER_SERVICE_OTA "esp.service.ota" -#define ESP_RMAKER_SERVICE_TIME "esp.service.time" -#define ESP_RMAKER_SERVICE_SCHEDULE "esp.service.schedule" -#define ESP_RMAKER_SERVICE_SYSTEM "esp.service.system" -#define ESP_RMAKER_SERVICE_LOCAL_CONTROL "esp.service.local_control" - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_user_mapping.h b/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_user_mapping.h deleted file mode 100644 index 77a153b02f2..00000000000 --- a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_user_mapping.h +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** User-Node Mapping states */ -typedef enum { - /** Mapping does not exist or is not initialized */ - ESP_RMAKER_USER_MAPPING_RESET = 0, - /** Mapping has started */ - ESP_RMAKER_USER_MAPPING_STARTED, - /** Mapping is done */ - ESP_RMAKER_USER_MAPPING_DONE, -} esp_rmaker_user_mapping_state_t; - -/** - * Get User-Node mapping state - * - * This returns the current user-node mapping state. - * - * @return user mapping state - */ -esp_rmaker_user_mapping_state_t esp_rmaker_user_node_mapping_get_state(void); - -/** - * Create User Mapping Endpoint - * - * This will create a custom provisioning endpoint for user-node mapping. - * This should be called after wifi_prov_mgr_init() but before - * wifi_prov_mgr_start_provisioning() - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_user_mapping_endpoint_create(void); - -/** - * Register User Mapping Endpoint - * - * This will register the callback for the custom provisioning endpoint - * for user-node mapping which was created with esp_rmaker_user_mapping_endpoint_create(). - * This should be called immediately after wifi_prov_mgr_start_provisioning(). - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_user_mapping_endpoint_register(void); - -/** Add User-Node mapping - * - * This call will start the user-node mapping workflow on the node. - * This is automatically called if you have used esp_rmaker_user_mapping_endpoint_register(). - * Use this API only if you want to trigger the user-node mapping after the Wi-Fi provisioning - * has already been done. - * - * @param[in] user_id The User identifier received from the client (Phone app/CLI) - * @param[in] secret_key The Secret key received from the client (Phone app/CLI) - * - * @return ESP_OK if the workflow was successfully triggered. This does not guarantee success - * of the actual mapping. The mapping status needs to be checked separately by the clients. - * @return error on failure. - */ -esp_err_t esp_rmaker_start_user_node_mapping(char *user_id, char *secret_key); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s2/include/fb_gfx/include/fb_gfx.h b/tools/sdk/esp32s2/include/fb_gfx/include/fb_gfx.h index 079ff7bfe4a..158c80f6bf4 100644 --- a/tools/sdk/esp32s2/include/fb_gfx/include/fb_gfx.h +++ b/tools/sdk/esp32s2/include/fb_gfx/include/fb_gfx.h @@ -19,7 +19,7 @@ extern "C" { #endif typedef enum { - FB_RGB888, FB_BGR888, FB_RGB565, FB_BGR565 + FB_RGB888, FB_BGR888, FB_RGB565, FB_BGR565, FB_GRAY } fb_format_t; typedef struct { diff --git a/tools/sdk/esp32s2/lib/libapp_update.a b/tools/sdk/esp32s2/lib/libapp_update.a index 68d5a9b4fdb..bcc664b67d8 100644 Binary files a/tools/sdk/esp32s2/lib/libapp_update.a and b/tools/sdk/esp32s2/lib/libapp_update.a differ diff --git a/tools/sdk/esp32s2/lib/libdriver.a b/tools/sdk/esp32s2/lib/libdriver.a index 8379b868729..cc05f938461 100644 Binary files a/tools/sdk/esp32s2/lib/libdriver.a and b/tools/sdk/esp32s2/lib/libdriver.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_adc_cal.a b/tools/sdk/esp32s2/lib/libesp_adc_cal.a index 4ef71252dc2..d477a204c64 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_adc_cal.a and b/tools/sdk/esp32s2/lib/libesp_adc_cal.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_littlefs.a b/tools/sdk/esp32s2/lib/libesp_littlefs.a index e4a024952d5..45505f83a70 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_littlefs.a and b/tools/sdk/esp32s2/lib/libesp_littlefs.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_phy.a b/tools/sdk/esp32s2/lib/libesp_phy.a index ce4dc62587f..209fabeb277 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_phy.a and b/tools/sdk/esp32s2/lib/libesp_phy.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_rainmaker.a b/tools/sdk/esp32s2/lib/libesp_rainmaker.a index 2d4c44c4453..c04413157cf 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_rainmaker.a and b/tools/sdk/esp32s2/lib/libesp_rainmaker.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_wifi.a b/tools/sdk/esp32s2/lib/libesp_wifi.a index c5e84328f87..8b98b5c22eb 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_wifi.a and b/tools/sdk/esp32s2/lib/libesp_wifi.a differ diff --git a/tools/sdk/esp32s2/lib/libfb_gfx.a b/tools/sdk/esp32s2/lib/libfb_gfx.a index 3692a70fa92..bdfc8eb32bc 100644 Binary files a/tools/sdk/esp32s2/lib/libfb_gfx.a and b/tools/sdk/esp32s2/lib/libfb_gfx.a differ diff --git a/tools/sdk/esp32s2/lib/libhal.a b/tools/sdk/esp32s2/lib/libhal.a index 0339588e90a..d70960fcbd5 100644 Binary files a/tools/sdk/esp32s2/lib/libhal.a and b/tools/sdk/esp32s2/lib/libhal.a differ diff --git a/tools/sdk/esp32s2/lib/liblwip.a b/tools/sdk/esp32s2/lib/liblwip.a index 0dffa93bff8..b8e1d25645e 100644 Binary files a/tools/sdk/esp32s2/lib/liblwip.a and b/tools/sdk/esp32s2/lib/liblwip.a differ diff --git a/tools/sdk/esp32s2/qspi_qspi/include/sdkconfig.h b/tools/sdk/esp32s2/qspi_qspi/include/sdkconfig.h index 5342b703655..ca14eaf2a3b 100644 --- a/tools/sdk/esp32s2/qspi_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32s2/qspi_qspi/include/sdkconfig.h @@ -62,6 +62,7 @@ #define CONFIG_ESP_RMAKER_OTA_AUTOFETCH_PERIOD 0 #define CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE 1024 #define CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES 10 +#define CONFIG_ESP_RMAKER_SCENES_MAX_SCENES 10 #define CONFIG_ENABLE_ARDUINO_DEPENDS 1 #define CONFIG_AUTOSTART_ARDUINO 1 #define CONFIG_ARDUINO_RUN_CORE0 1 @@ -611,5 +612,5 @@ #define CONFIG_USB_MSC_BUFSIZE CONFIG_TINYUSB_MSC_BUFSIZE #define CONFIG_USB_MSC_ENABLED CONFIG_TINYUSB_MSC_ENABLED #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "c29343eb94" +#define CONFIG_ARDUINO_IDF_COMMIT "b8050b365e" #define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s2/qspi_qspi/libesp_hw_support.a b/tools/sdk/esp32s2/qspi_qspi/libesp_hw_support.a index 7b56d99dc3b..0af7e7ef033 100644 Binary files a/tools/sdk/esp32s2/qspi_qspi/libesp_hw_support.a and b/tools/sdk/esp32s2/qspi_qspi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32s2/qspi_qspi/libesp_system.a b/tools/sdk/esp32s2/qspi_qspi/libesp_system.a index 758dc7b3c4d..066dab31be2 100644 Binary files a/tools/sdk/esp32s2/qspi_qspi/libesp_system.a and b/tools/sdk/esp32s2/qspi_qspi/libesp_system.a differ diff --git a/tools/sdk/esp32s2/sdkconfig b/tools/sdk/esp32s2/sdkconfig index 4aa42bee716..eb40dc14fbb 100644 --- a/tools/sdk/esp32s2/sdkconfig +++ b/tools/sdk/esp32s2/sdkconfig @@ -173,6 +173,13 @@ CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE=1024 # CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES=10 # end of ESP RainMaker Scheduling + +# +# ESP RainMaker Scenes +# +CONFIG_ESP_RMAKER_SCENES_MAX_SCENES=10 +# CONFIG_ESP_RMAKER_SCENES_DEACTIVATE_SUPPORT is not set +# end of ESP RainMaker Scenes # end of ESP RainMaker Config # diff --git a/tools/sdk/esp32s3/include/esp_common/include/esp_idf_version.h b/tools/sdk/esp32s3/include/esp_common/include/esp_idf_version.h index 7637b814b65..db04f85f90a 100644 --- a/tools/sdk/esp32s3/include/esp_common/include/esp_idf_version.h +++ b/tools/sdk/esp32s3/include/esp_common/include/esp_idf_version.h @@ -23,7 +23,7 @@ extern "C" { /** Minor version number (x.X.x) */ #define ESP_IDF_VERSION_MINOR 4 /** Patch version number (x.x.X) */ -#define ESP_IDF_VERSION_PATCH 0 +#define ESP_IDF_VERSION_PATCH 1 /** * Macro to convert IDF version number into an integer diff --git a/tools/sdk/esp32s3/include/esp_hw_support/port/esp32s3/regi2c_ctrl.h b/tools/sdk/esp32s3/include/esp_hw_support/port/esp32s3/regi2c_ctrl.h index 385444d5fe0..a4a3cbce202 100644 --- a/tools/sdk/esp32s3/include/esp_hw_support/port/esp32s3/regi2c_ctrl.h +++ b/tools/sdk/esp32s3/include/esp_hw_support/port/esp32s3/regi2c_ctrl.h @@ -63,6 +63,10 @@ uint8_t regi2c_ctrl_read_reg_mask(uint8_t block, uint8_t host_id, uint8_t reg_ad void regi2c_ctrl_write_reg(uint8_t block, uint8_t host_id, uint8_t reg_add, uint8_t data); void regi2c_ctrl_write_reg_mask(uint8_t block, uint8_t host_id, uint8_t reg_add, uint8_t msb, uint8_t lsb, uint8_t data); +/* enter the critical section that protects internal registers. Don't use it in SDK. Use the functions above. */ +void regi2c_enter_critical(void); +void regi2c_exit_critical(void); + #endif // BOOTLOADER_BUILD /* Convenience macros for the above functions, these use register definitions diff --git a/tools/sdk/esp32s3/include/esp_littlefs/include/esp_littlefs.h b/tools/sdk/esp32s3/include/esp_littlefs/include/esp_littlefs.h index 7b5abe9248f..07f35231291 100644 --- a/tools/sdk/esp32s3/include/esp_littlefs/include/esp_littlefs.h +++ b/tools/sdk/esp32s3/include/esp_littlefs/include/esp_littlefs.h @@ -1,24 +1,9 @@ #ifndef ESP_LITTLEFS_H__ #define ESP_LITTLEFS_H__ -#include -#include -#include -#include -#include -#include "freertos/FreeRTOS.h" -#include "freertos/semphr.h" #include "esp_err.h" -#include -#include -#include -#include -#include -#include -#include -#include "sdkconfig.h" - #include "littlefs/lfs.h" +#include "sdkconfig.h" #ifdef __cplusplus extern "C" { diff --git a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_console.h b/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_console.h deleted file mode 100644 index 70c02ffeae0..00000000000 --- a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_console.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. - -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Initialize console - * - * Initializes serial console and adds basic commands. - * - * @return ESP_OK on success. - * @return error in case of failures. - */ -esp_err_t esp_rmaker_console_init(void); - -/* Reference for adding custom console commands: -#include - -static int command_console_handler(int argc, char *argv[]) -{ - // Command code here -} - -static void register_console_command() -{ - const esp_console_cmd_t cmd = { - .command = "", - .help = "", - .func = &command_console_handler, - }; - ESP_ERROR_CHECK(esp_console_cmd_register(&cmd)); -} -*/ - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_core.h b/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_core.h deleted file mode 100644 index f9d96be4ee6..00000000000 --- a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_core.h +++ /dev/null @@ -1,893 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -#define ESP_RMAKER_CONFIG_VERSION "2020-03-20" - -/* Maximum length of the alert message that can be passed to esp_rmaker_raise_alert() */ -#define ESP_RMAKER_MAX_ALERT_LEN 100 - -/** @cond **/ -/** ESP RainMaker Event Base */ -ESP_EVENT_DECLARE_BASE(RMAKER_EVENT); -/** @endcond **/ - -/** ESP RainMaker Events */ -typedef enum { - /** RainMaker Core Initialisation Done */ - RMAKER_EVENT_INIT_DONE = 1, - /** Self Claiming Started */ - RMAKER_EVENT_CLAIM_STARTED, - /** Self Claiming was Successful */ - RMAKER_EVENT_CLAIM_SUCCESSFUL, - /** Self Claiming Failed */ - RMAKER_EVENT_CLAIM_FAILED, - /** Node side communication for User-Node mapping done. - * Actual mapping state will be managed by the ESP RainMaker cloud based on the user side communication. - * Associated data is the NULL terminated user id. - */ - RMAKER_EVENT_USER_NODE_MAPPING_DONE, - /** Local control started. Associated data is the NULL terminated Service Name */ - RMAKER_EVENT_LOCAL_CTRL_STARTED, - /* User reset request successfully sent to ESP RainMaker Cloud */ - RMAKER_EVENT_USER_NODE_MAPPING_RESET, -} esp_rmaker_event_t; - -/** ESP RainMaker Node information */ -typedef struct { - /** Name of the Node */ - char *name; - /** Type of the Node */ - char *type; - /** Firmware Version (Optional). If not set, PROJECT_VER is used as default (recommended)*/ - char *fw_version; - /** Model (Optional). If not set, PROJECT_NAME is used as default (recommended)*/ - char *model; -} esp_rmaker_node_info_t; - -/** ESP RainMaker Configuration */ -typedef struct { - /** Enable Time Sync - * Setting this true will enable SNTP and fetch the current time before - * attempting to connect to the ESP RainMaker service - */ - bool enable_time_sync; -} esp_rmaker_config_t; - -/** ESP RainMaker Parameter Value type */ -typedef enum { - /** Invalid */ - RMAKER_VAL_TYPE_INVALID = 0, - /** Boolean */ - RMAKER_VAL_TYPE_BOOLEAN, - /** Integer. Mapped to a 32 bit signed integer */ - RMAKER_VAL_TYPE_INTEGER, - /** Floating point number */ - RMAKER_VAL_TYPE_FLOAT, - /** NULL terminated string */ - RMAKER_VAL_TYPE_STRING, - /** NULL terminated JSON Object string Eg. {"name":"value"} */ - RMAKER_VAL_TYPE_OBJECT, - /** NULL terminated JSON Array string Eg. [1,2,3] */ - RMAKER_VAL_TYPE_ARRAY, -} esp_rmaker_val_type_t; - -/** ESP RainMaker Value */ -typedef union { - /** Boolean */ - bool b; - /** Integer */ - int i; - /** Float */ - float f; - /** NULL terminated string */ - char *s; -} esp_rmaker_val_t; - -/** ESP RainMaker Parameter Value */ -typedef struct { - /** Type of Value */ - esp_rmaker_val_type_t type; - /** Actual value. Depends on the type */ - esp_rmaker_val_t val; -} esp_rmaker_param_val_t; - -/** Param property flags */ -typedef enum { - PROP_FLAG_WRITE = (1 << 0), - PROP_FLAG_READ = (1 << 1), - PROP_FLAG_TIME_SERIES = (1 << 2), - PROP_FLAG_PERSIST = (1 << 3) -} esp_param_property_flags_t; - -/** System Service Reboot Flag */ -#define SYSTEM_SERV_FLAG_REBOOT (1 << 0) - -/** System Service Factory Reset Flag */ -#define SYSTEM_SERV_FLAG_FACTORY_RESET (1 << 1) - -/** System Service Wi-Fi Reset Flag */ -#define SYSTEM_SERV_FLAG_WIFI_RESET (1 << 2) - -/** System Service All Flags */ -#define SYSTEM_SERV_FLAGS_ALL (SYSTEM_SERV_FLAG_REBOOT | SYSTEM_SERV_FLAG_FACTORY_RESET | SYSTEM_SERV_FLAG_WIFI_RESET) - -/** Generic ESP RainMaker handle */ -typedef size_t esp_rmaker_handle_t; - -/** ESP RainMaker Node Handle */ -typedef esp_rmaker_handle_t esp_rmaker_node_t; - -/** ESP RainMaker Device Handle */ -typedef esp_rmaker_handle_t esp_rmaker_device_t; - -/** ESP RainMaker Parameter Handle */ -typedef esp_rmaker_handle_t esp_rmaker_param_t; - -/** Parameter read/write request source */ -typedef enum { - /** Request triggered in the init sequence i.e. when a value is found - * in persistent memory for parameters with PROP_FLAG_PERSIST. - */ - ESP_RMAKER_REQ_SRC_INIT, - /** Request received from cloud */ - ESP_RMAKER_REQ_SRC_CLOUD, - /** Request received when a schedule has triggered */ - ESP_RMAKER_REQ_SRC_SCHEDULE, - /** Request received from a local controller */ - ESP_RMAKER_REQ_SRC_LOCAL, - /** This will always be the last value. Any value equal to or - * greater than this should be considered invalid. - */ - ESP_RMAKER_REQ_SRC_MAX, -} esp_rmaker_req_src_t; - -/** Write request Context */ -typedef struct { - /** Source of request */ - esp_rmaker_req_src_t src; -} esp_rmaker_write_ctx_t; - -/** Read request context */ -typedef struct { - /** Source of request */ - esp_rmaker_req_src_t src; -} esp_rmaker_read_ctx_t; - -/** System service configuration */ -typedef struct { - /** Logical OR of system service flags (SYSTEM_SERV_FLAG_REBOOT, - * SYSTEM_SERV_FLAG_FACTORY_RESET, SYSTEM_SERV_FLAG_WIFI_RESET) as required - * or SYSTEM_SERV_FLAGS_ALL. - */ - uint16_t flags; - /** Time in seconds after which the device should reboot. - * Value of zero would trigger an immediate reboot if a write is received for - * the Reboot parameter. - * Recommended value: 2 - */ - int8_t reboot_seconds; - /** Time in seconds after which the device should reset (Wi-Fi or factory). - * Value of zero would trigger an immediate action if a write is received for - * the Wi-Fi reset or Factory reset parameter. - * Recommended value: 2 - */ - int8_t reset_seconds; - /** Time in seconds after which the device should reboot after it has been reset. - * Value of zero would mean that there won't be any reboot after the reset. - * Recommended value: 2 - */ - int8_t reset_reboot_seconds; -} esp_rmaker_system_serv_config_t; - -/** Callback for parameter value write requests. - * - * The callback should call the esp_rmaker_param_update_and_report() API if the new value is to be set - * and reported back. - * - * @param[in] device Device handle. - * @param[in] param Parameter handle. - * @param[in] param Pointer to \ref esp_rmaker_param_val_t. Use appropriate elements as per the value type. - * @param[in] priv_data Pointer to the private data paassed while creating the device. - * @param[in] ctx Context associated with the request. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -typedef esp_err_t (*esp_rmaker_device_write_cb_t)(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param, - const esp_rmaker_param_val_t val, void *priv_data, esp_rmaker_write_ctx_t *ctx); - -/** Callback for parameter value changes - * - * The callback should call the esp_rmaker_param_update_and_report() API if the new value is to be set - * and reported back. - * - * @note Currently, the read callback never gets invoked as the communication between clients (mobile phones, CLI, etc.) - * and node is asynchronous. So, the read request does not reach the node. This callback will however be used in future. - * - * @param[in] device Device handle. - * @param[in] param Parameter handle. - * @param[in] priv_data Pointer to the private data passed while creating the device. - * @param[in] ctx Context associated with the request. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -typedef esp_err_t (*esp_rmaker_device_read_cb_t)(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param, - void *priv_data, esp_rmaker_read_ctx_t *ctx); - -/** Convert device callback source to string - * - * Device read/write callback can be via different sources. This is a helper API - * to give the source in string format for printing. - * - * Example Usage: - * @code{c} - * static esp_err_t write_cb(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param, - * const esp_rmaker_param_val_t val, void *priv_data, esp_rmaker_write_ctx_t *ctx) -{ - if (ctx) { - ESP_LOGI(TAG, "Received write request via : %s", esp_rmaker_device_cb_src_to_str(ctx->src)); - } - * @endcode - * - * @param[in] src The src field as received in the callback context. - * - * @return NULL terminated source string on success - * @return NULL on failure - */ -const char *esp_rmaker_device_cb_src_to_str(esp_rmaker_req_src_t src); - -/** - * Initialise a Boolean value - * - * @param[in] bval Initialising value. - * - * @return Value structure. - */ -esp_rmaker_param_val_t esp_rmaker_bool(bool bval); - -/** - * Initialise an Integer value - * - * @param[in] ival Initialising value. - * - * @return Value structure. - */ -esp_rmaker_param_val_t esp_rmaker_int(int ival); - -/** - * Initialise a Float value - * - * @param[in] fval Initialising value. - * - * @return Value structure. - */ -esp_rmaker_param_val_t esp_rmaker_float(float fval); - -/** - * Initialise a String value - * - * @param[in] sval Initialising value. - * - * @return Value structure. - */ -esp_rmaker_param_val_t esp_rmaker_str(const char *sval); - -/** - * Initialise a json object value - * - * @note the object will not be validated internally. it is the application's - * responsibility to ensure that the object is a valid json object. - * eg. esp_rmaker_obj("{\"name\":\"value\"}"); - * - * param[in] val initialising value - * - * return value structure - */ -esp_rmaker_param_val_t esp_rmaker_obj(const char *val); - -/** - * Initialise a json array value - * - * @note the array will not be validated internally. it is the application's - * responsibility to ensure that the array is a valid json array. - * eg. esp_rmaker_array("[1,2,3]"); - * - * param[in] val initialising value - * - * return value structure - */ -esp_rmaker_param_val_t esp_rmaker_array(const char *val); - - -/** Initialize ESP RainMaker Node - * - * This initializes the ESP RainMaker agent and creates the node. - * The model and firmware version for the node are set internally as per - * the project name and version. These can be overridden (but not recommended) using the - * esp_rmaker_node_add_fw_version() and esp_rmaker_node_add_model() APIs. - * - * @note This should be the first call before using any other ESP RainMaker API. - * - * @param[in] config Configuration to be used by the ESP RainMaker. - * @param[in] name Name of the node. - * @param[in] type Type of the node. - * - * @return Node handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_node_t *esp_rmaker_node_init(const esp_rmaker_config_t *config, const char *name, const char *type); - -/** Start ESP RainMaker Agent - * - * This call starts the actual ESP RainMaker thread. This should preferably be called after a - * successful Wi-Fi connection in order to avoid unnecessary failures. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_start(void); - -/** Stop ESP RainMaker Agent - * - * This call stops the ESP RainMaker Agent instance started earlier by esp_rmaker_start(). - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_stop(void); - -/** Deinitialize ESP RainMaker Node - * - * This API deinitializes the ESP RainMaker agent and the node created using esp_rmaker_node_init(). - * - * @note This should be called after rainmaker has stopped. - * - * @param[in] node Node Handle returned by esp_rmaker_node_init(). - * - * @retur ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_deinit(const esp_rmaker_node_t *node); - -/** Get a handle to the Node - * - * This API returns handle to a node created using esp_rmaker_node_init(). - * - * @return Node handle on success. - * @return NULL in case of failure. - */ -const esp_rmaker_node_t *esp_rmaker_get_node(void); - -/** Get Node Id - * - * Returns pointer to the NULL terminated Node ID string. - * - * @return Pointer to a NULL terminated Node ID string. - */ -char *esp_rmaker_get_node_id(void); - -/** Get Node Info - * - * Returns pointer to the node info as configured during initialisation. - * - * @param node Node handle. - * - * @return Pointer to the node info on success. - * @return NULL in case of failure. - */ -esp_rmaker_node_info_t *esp_rmaker_node_get_info(const esp_rmaker_node_t *node); - -/** Add Node attribute - * - * Adds a new attribute as the metadata for the node. For the sake of simplicity, - * only string values are allowed. - * - * @param node Node handle. - * @param[in] attr_name Name of the attribute. - * @param[in] val Value for the attribute. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_add_attribute(const esp_rmaker_node_t *node, const char *attr_name, const char *val); - -/** Add FW version for a node (Not recommended) - * - * FW version is set internally to the project version. This API can be used to - * override that version. - * - * @param node Node handle. - * @param[in] fw_version New firmware version. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_add_fw_version(const esp_rmaker_node_t *node, const char *fw_version); - -/** Add model for a node (Not recommended) - * - * Model is set internally to the project name. This API can be used to - * override that name. - * - * @param node Node handle. - * @param[in] model New model string. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_add_model(const esp_rmaker_node_t *node, const char *model); - -/** - * Create a Device - * - * This API will create a virtual "Device". - * This could be something like a Switch, Lightbulb, etc. - * - * @note The device created needs to be added to a node using esp_rmaker_node_add_device(). - * - * @param[in] dev_name The unique device name. - * @param[in] type Optional device type. Can be kept NULL. - * @param[in] priv_data (Optional) Private data associated with the device. This will be passed to callbacks. - * It should stay allocated throughout the lifetime of the device. - * - * @return Device handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_device_create(const char *dev_name, const char *type, void *priv_data); - -/** - * Create a Service - * - * This API will create a "Service". It is exactly same like a device in terms of structure and so, all - * APIs for device are also valid for a service. - * A service could be something like OTA, diagnostics, etc. - * - * @note Name of a service should not clash with name of a device. - * @note The service created needs to be added to a node using esp_rmaker_node_add_device(). - * - * @param[in] serv_name The unique service name. - * @param[in] type Optional service type. Can be kept NULL. - * @param[in] priv_data (Optional) Private data associated with the service. This will be passed to callbacks. - * It should stay allocated throughout the lifetime of the device. - * - * @return Device handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_service_create(const char *serv_name, const char *type, void *priv_data); - -/** - * Delete a Device/Service - * - * This API will delete a device created using esp_rmaker_device_create(). - * - * @note The device should first be removed from the node using esp_rmaker_node_remove_device() before deleting. - * - * @param[in] device Device handle. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_delete(const esp_rmaker_device_t *device); - -/** - * Add callbacks for a device/service - * - * Add read/write callbacks for a device that will be invoked as per requests received from the cloud (or other paths - * as may be added in future). - * - * @param[in] device Device handle. - * @param[in] write_cb Write callback. - * @param[in] read_cb Read callback. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_add_cb(const esp_rmaker_device_t *device, esp_rmaker_device_write_cb_t write_cb, esp_rmaker_device_read_cb_t read_cb); - -/** - * Add a device to a node - * - * @param[in] node Node handle. - * @param[in] device Device handle. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_add_device(const esp_rmaker_node_t *node, const esp_rmaker_device_t *device); - -/** - * Remove a device from a node - * - * @param[in] node Node handle. - * @param[in] device Device handle. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_node_remove_device(const esp_rmaker_node_t *node, const esp_rmaker_device_t *device); - -/** Get device by name - * - * Get handle for a device based on the name. - * - * @param[in] node Node handle. - * @param[in] device_name Device name to search. - * - * @return Device handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_device_t *esp_rmaker_node_get_device_by_name(const esp_rmaker_node_t *node, const char *device_name); - -/** Add a Device attribute - * - * @note Device attributes are reported only once after a boot-up as part of the node - * configuration. - * Eg. Serial Number - * - * @param[in] device Device handle. - * @param[in] attr_name Name of the attribute. - * @param[in] val Value of the attribute. - * - * @return ESP_OK if the attribute was added successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_add_attribute(const esp_rmaker_device_t *device, const char *attr_name, const char *val); - -/** Add a Device subtype - * - * This can be something like esp.subtype.rgb-light for a device of type esp.device.lightbulb. - * This would primarily be used by the phone apps to render different icons for the same device type. - * - * @param[in] device Device handle. - * @param[in] subtype String describing the sub type. - * - * @return ESP_OK if the subtype was added successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_add_subtype(const esp_rmaker_device_t *device, const char *subtype); - -/** Get device name from handle - * - * @param[in] device Device handle. - * - * @return NULL terminated device name string on success. - * @return NULL in case of failure. - */ -char *esp_rmaker_device_get_name(const esp_rmaker_device_t *device); - -/** Get device type from handle - * - * @param[in] device Device handle. - * - * @return NULL terminated device type string on success. - * @return NULL in case of failure, or if the type wasn't provided while creating the device. - */ -char *esp_rmaker_device_get_type(const esp_rmaker_device_t *device); - -/** - * Add a parameter to a device/service - * - * @param[in] device Device handle. - * @param[in] param Parameter handle. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_add_param(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param); - - -/** Get parameter by type - * - * Get handle for a parameter based on the type. - * - * @note If there are multiple parameters with the same type, this will return the first one. The API - * esp_rmaker_device_get_param_by_name() can be used to get a specific parameter, because the parameter - * names in a device are unique. - * - * @param[in] device Device handle. - * @param[in] param_type Parameter type to search. - * - * @return Parameter handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_param_t *esp_rmaker_device_get_param_by_type(const esp_rmaker_device_t *device, const char *param_type); - -/** Get parameter by name - * - * Get handle for a parameter based on the name. - * - * @param[in] device Device handle. - * @param[in] param_name Parameter name to search. - * - * @return Parameter handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_param_t *esp_rmaker_device_get_param_by_name(const esp_rmaker_device_t *device, const char *param_name); - -/** Assign a primary parameter - * - * Assign a parameter (already added using esp_rmaker_device_add_param()) as a primary parameter, - * which can be used by clients (phone apps specifically) to give prominence to it. - * - * @param[in] device Device handle. - * @param[in] param Parameter handle. - * - * @return ESP_OK if the parameter was assigned as the primary successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_device_assign_primary_param(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param); - -/** - * Create a Parameter - * - * Parameter can be something like Temperature, Outlet state, Lightbulb brightness, etc. - * - * Any changes should be reported using the esp_rmaker_param_update_and_report() API. - * Any remote changes will be reported to the application via the device callback, if registered. - * - * @note The parameter created needs to be added to a device using esp_rmaker_device_add_param(). - * Parameter name should be unique in a given device. - * - * @param[in] param_name Name of the parameter. - a* @param[in] type Optional parameter type. Can be kept NULL. - * @param[in] val Value of the parameter. This also specifies the type that will be assigned - * to this parameter. You can use esp_rmaker_bool(), esp_rmaker_int(), esp_rmaker_float() - * or esp_rmaker_str() functions as the argument here. Eg, esp_rmaker_bool(true). - * @param[in] properties Properties of the parameter, which will be a logical OR of flags in - * \ref esp_param_property_flags_t. - * - * @return Parameter handle on success. - * @return NULL in case of failure. - */ -esp_rmaker_param_t *esp_rmaker_param_create(const char *param_name, const char *type, - esp_rmaker_param_val_t val, uint8_t properties); - -/** - * Add a UI Type to a parameter - * - * This will be used by the Phone apps (or other clients) to render appropriate UI for the given - * parameter. Please refer the RainMaker documetation for supported UI Types. - * - * @param[in] param Parameter handle. - * @param[in] ui_type String describing the UI Type. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_param_add_ui_type(const esp_rmaker_param_t *param, const char *ui_type); - -/** - * Add bounds for an integer/float parameter - * - * This can be used to add bounds (min/max values) for a given integer parameter. Eg. brightness - * will have bounds as 0 and 100 if it is a percentage. - * Eg. esp_rmaker_param_add_bounds(brightness_param, esp_rmaker_int(0), esp_rmaker_int(100), esp_rmaker_int(5)); - * - * @note The RainMaker core does not check the bounds. It is upto the application to handle it. - * - * @param[in] param Parameter handle. - * @param[in] min Minimum allowed value. - * @param[in] max Maximum allowed value. - * @param[in] step Minimum stepping (set to 0 if no specific value is desired). - * - * @return ESP_OK on success. - * return error in case of failure. - */ -esp_err_t esp_rmaker_param_add_bounds(const esp_rmaker_param_t *param, - esp_rmaker_param_val_t min, esp_rmaker_param_val_t max, esp_rmaker_param_val_t step); - -/** - * Add a list of valid strings for a string parameter - * - * This can be used to add a list of valid strings for a given string parameter. - * - * Eg. - * static const char *valid_strs[] = {"None","Yes","No","Can't Say"}; - * esp_rmaker_param_add_valid_str_list(param, valid_strs, 4); - * - * @note The RainMaker core does not check the values. It is upto the application to handle it. - * - * @param[in] param Parameter handle. - * @param[in] strs Pointer to an array of strings. Note that this memory should stay allocated - * throughout the lifetime of this parameter. - * @param[in] count Number of strings in the above array. - * - * @return ESP_OK on success. - * return error in case of failure. - */ -esp_err_t esp_rmaker_param_add_valid_str_list(const esp_rmaker_param_t *param, const char *strs[], uint8_t count); - -/** Add max count for an array parameter - * - * This can be used to put a limit on the maximum number of elements in an array. - * - * @note The RainMaker core does not check the values. It is upto the application to handle it. - * - * @param[in] param Parameter handle. - * @param[in] count Max number of elements allowed in the array. - * - * @return ESP_OK on success. - * return error in case of failure. - */ -esp_err_t esp_rmaker_param_add_array_max_count(const esp_rmaker_param_t *param, int count); - - -/* Update a parameter - * - * This will just update the value of a parameter with esp rainmaker core, without actually reporting - * it. This can be used when multiple parameters need to be reported together. - * Eg. If x parameters are to be reported, this API can be used for the first x -1 parameters - * and the last one can be updated using esp_rmaker_param_update_and_report(). - * This will report all parameters which were updated prior to this call. - * - * Sample: - * - * esp_rmaker_param_update(param1, esp_rmaker_float(10.2)); - * esp_rmaker_param_update(param2, esp_rmaker_int(55)); - * esp_rmaker_param_update(param3, esp_rmaker_int(95)); - * esp_rmaker_param_update_and_report(param1, esp_rmaker_bool(true)); - * - * @param[in] param Parameter handle. - * @param[in] val New value of the parameter. - * - * @return ESP_OK if the parameter was updated successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_param_update(const esp_rmaker_param_t *param, esp_rmaker_param_val_t val); - -/** Update and report a parameter - * - * Calling this API will update the parameter and report it to ESP RainMaker cloud. - * This should be used whenever there is any local change. - * - * @param[in] param Parameter handle. - * @param[in] val New value of the parameter. - * - * @return ESP_OK if the parameter was updated successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_param_update_and_report(const esp_rmaker_param_t *param, esp_rmaker_param_val_t val); - -/** Update and notify a parameter - * - * Calling this API will update the parameter and report it to ESP RainMaker cloud similar to - * esp_rmaker_param_update_and_report(). However, additionally, it will also trigger a notification - * on the phone apps (if enabled). - * - * @note This should be used only when some local change requires explicit notification even when the - * phone app is in background, not otherwise. - * Eg. Alarm got triggered, temperature exceeded some threshold, etc. - * - * Alternatively, the esp_rmaker_raise_alert() API can also be used to trigger notification - * on the phone apps with pre-formatted text. - * - * @param[in] param Parameter handle. - * @param[in] val New value of the parameter. - * - * @return ESP_OK if the parameter was updated successfully. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_param_update_and_notify(const esp_rmaker_param_t *param, esp_rmaker_param_val_t val); - -/** Trigger an alert on the phone app - * - * This API will trigger a notification alert on the phone apps (if enabled) using the formatted text - * provided. Note that this does not send a notification directly to the phone, but reports the alert - * to the ESP RainMaker cloud which then uses the Notification framework to send notifications to the - * phone apps. The value does not get stored anywhere, nor is it linked to any node parameters. - * - * @note This should be used only if some event requires explicitly alerting the user even when the - * phone app is in background, not otherwise. - * Eg. "Motion Detected", "Fire alarm triggered" - * - * @param[in] alert_str NULL terminated pre-formatted alert string. - * Maximum length can be ESP_RMAKER_MAX_ALERT_LEN, excluding NULL character. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_raise_alert(const char *alert_str); - -/** Get parameter name from handle - * - * @param[in] param Parameter handle. - * - * @return NULL terminated parameter name string on success. - * @return NULL in case of failure. - */ -char *esp_rmaker_param_get_name(const esp_rmaker_param_t *param); - -/** Get parameter type from handle - * - * @param[in] param Parameter handle. - * - * @return NULL terminated parameter type string on success. - * @return NULL in case of failure, or if the type wasn't provided while creating the parameter. - */ -char *esp_rmaker_param_get_type(const esp_rmaker_param_t *param); - -/** Get parameter value - * - * This gives the parameter value that is stored in the RainMaker core. - * - * @note This does not call any explicit functions to read value from hardware/driver. - * - * @param[in] param Parameter handle - * - * @return Pointer to parameter value on success. - * @return NULL in case of failure. - */ -esp_rmaker_param_val_t *esp_rmaker_param_get_val(esp_rmaker_param_t *param); - -/** Report the node details to the cloud - * - * This API reports node details i.e. the node configuration and values of all the parameters to the ESP RainMaker cloud. - * Eg. If a new device is created (with some parameters and attributes), then this API should be called after that - * to send the node details to the cloud again and the changes to be reflected in the clients (like phone apps). - * - * @note Please use this API only if you need to create or delete devices after esp_rmaker_start() has already - * been called, for use cases like bridges or hubs. - * - * @return ESP_OK if the node details are successfully queued to be published. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_report_node_details(void); - -/** Enable Timezone Service - * - * This enables the ESP RainMaker standard timezone service which can be used to set - * timezone, either in POSIX or location string format. Please refer the specifications - * for additional details. - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_timezone_service_enable(void); - -/** Enable System Service - * - * This enables the ESP RainMaker standard system service which can be - * used for operations like reboot, factory reset and Wi-Fi reset. - * - * Please refer the specifications for additional details. - * - * @param[in] config Configuration for the system service. - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_system_service_enable(esp_rmaker_system_serv_config_t *config); - -/** - * Check if local_ctrl service has started - * - * @return true if service has started - * @return false if the service has not started - */ -bool esp_rmaker_local_ctrl_service_started(void); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_mqtt.h b/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_mqtt.h deleted file mode 100644 index 1cc6cd5156e..00000000000 --- a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_mqtt.h +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -esp_rmaker_mqtt_conn_params_t *esp_rmaker_mqtt_get_conn_params(void); - -/** Initialize ESP RainMaker MQTT - * - * @param[in] config The MQTT configuration data - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_init(esp_rmaker_mqtt_conn_params_t *conn_params); - -/** MQTT Connect - * - * Starts the connection attempts to the MQTT broker as per the configuration - * provided during initializing. - * This should ideally be called after successful network connection. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_connect(void); - -/** MQTT Disconnect - * - * Disconnects from the MQTT broker. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_disconnect(void); - -/** Publish MQTT Message - * - * @param[in] topic The MQTT topic on which the message should be published. - * @param[in] data Data to be published - * @param[in] data_len Length of the data - * @param[in] qos Quality of Service for the Publish. Can be 0, 1 or 2. Also depends on what the MQTT broker supports. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_publish(const char *topic, void *data, size_t data_len, uint8_t qos, int *msg_id); - -/** Subscribe to MQTT topic - * - * @param[in] topic The topic to be subscribed to. - * @param[in] cb The callback to be invoked when a message is received on the given topic. - * @param[in] priv_data Optional private data to be passed to the callback - * @param[in] qos Quality of Service for the Subscription. Can be 0, 1 or 2. Also depends on what the MQTT broker supports. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_subscribe(const char *topic, esp_rmaker_mqtt_subscribe_cb_t cb, uint8_t qos, void *priv_data); - -/** Unsubscribe from MQTT topic - * - * @param[in] topic Topic from which to unsubscribe. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_unsubscribe(const char *topic); -esp_err_t esp_rmaker_mqtt_setup(esp_rmaker_mqtt_config_t mqtt_config); -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_ota.h b/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_ota.h deleted file mode 100644 index e66b95705bc..00000000000 --- a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_ota.h +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Default ESP RainMaker OTA Server Certificate */ -extern const char *ESP_RMAKER_OTA_DEFAULT_SERVER_CERT; - -/** OTA Status to be reported to ESP RainMaker Cloud */ -typedef enum { - /** OTA is in Progress. This can be reported multiple times as the OTA progresses. */ - OTA_STATUS_IN_PROGRESS = 1, - /** OTA Succeeded. This should be reported only once, at the end of OTA. */ - OTA_STATUS_SUCCESS, - /** OTA Failed. This should be reported only once, at the end of OTA. */ - OTA_STATUS_FAILED, - /** OTA was delayed by the application */ - OTA_STATUS_DELAYED, -} ota_status_t; - -/** OTA Workflow type */ -typedef enum { - /** OTA will be performed using services and parameters. */ - OTA_USING_PARAMS = 1, - /** OTA will be performed using pre-defined MQTT topics. */ - OTA_USING_TOPICS -} esp_rmaker_ota_type_t; - -/** The OTA Handle to be used by the OTA callback */ -typedef void *esp_rmaker_ota_handle_t; - -/** OTA Data */ -typedef struct { - /** The OTA URL received from ESP RainMaker Cloud */ - char *url; - /** Size of the OTA File. Can be 0 if the file size isn't received from - * the ESP RainMaker Cloud */ - int filesize; - /** The server certificate passed in esp_rmaker_enable_ota() */ - const char *server_cert; - /** The private data passed in esp_rmaker_enable_ota() */ - char *priv; -} esp_rmaker_ota_data_t; - -/** Function prototype for OTA Callback - * - * This function will be invoked by the ESP RainMaker core whenever an OTA is available. - * The esp_rmaker_report_ota_status() API should be used to indicate the progress and - * success/fail status. - * - * @param[in] handle An OTA handle assigned by the ESP RainMaker Core - * @param[in] ota_data The data to be used for the OTA - * - * @return ESP_OK if the OTA was successful - * @return ESP_FAIL if the OTA failed. - */ -typedef esp_err_t (*esp_rmaker_ota_cb_t) (esp_rmaker_ota_handle_t handle, - esp_rmaker_ota_data_t *ota_data); - -/** Function Prototype for Post OTA Diagnostics - * - * If the Application rollback feature is enabled, this callback will be invoked - * as soon as you call esp_rmaker_ota_enable(), if it is the first - * boot after an OTA. You may perform some application specific diagnostics and - * report the status which will decide whether to roll back or not. - * - * @return true if diagnostics are successful, meaning that the new firmware is fine. - * @return false if diagnostics fail and a roolback to previous firmware is required. - */ -typedef bool (*esp_rmaker_post_ota_diag_t)(void); - -/** ESP RainMaker OTA Configuration */ -typedef struct { - /** OTA Callback. - * The callback to be invoked when an OTA Job is available. - * If kept NULL, the internal default callback will be used (Recommended). - */ - esp_rmaker_ota_cb_t ota_cb; - /** OTA Diagnostics Callback. - * A post OTA diagnostic handler to be invoked if app rollback feature is enabled. - * If kept NULL, the new firmware will be assumed to be fine, - * and no rollback will be performed. - */ - esp_rmaker_post_ota_diag_t ota_diag; - /** Server Certificate. - * The certificate to be passed to the OTA callback for server authentication. - * This is mandatory, unless you have disabled it in ESP HTTPS OTA config option. - * If you are using the ESP RainMaker OTA Service, you can just set this to - * `ESP_RMAKER_OTA_DEFAULT_SERVER_CERT`. - */ - const char *server_cert; - /** Private Data. - * Optional private data to be passed to the OTA callback. - */ - void *priv; -} esp_rmaker_ota_config_t; - -/** Enable OTA - * - * Calling this API enables OTA as per the ESP RainMaker specification. - * Please check the various ESP RainMaker configuration options to - * use the different variants of OTA. Refer the documentation for - * additional details. - * - * @param[in] ota_config Pointer to an OTA configuration structure - * @param[in] type The OTA workflow type - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_ota_enable(esp_rmaker_ota_config_t *ota_config, esp_rmaker_ota_type_t type); - -/** Report OTA Status - * - * This API must be called from the OTA Callback to indicate the status of the OTA. The OTA_STATUS_IN_PROGRESS - * can be reported multiple times with appropriate additional information. The final success/failure should - * be reported only once, at the end. - * - * This can be ignored if you are using the default internal OTA callback. - * - * @param[in] ota_handle The OTA handle received by the callback - * @param[in] status Status to be reported - * @param[in] additional_info NULL terminated string indicating additional information for the status - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_ota_report_status(esp_rmaker_ota_handle_t ota_handle, ota_status_t status, char *additional_info); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_schedule.h b/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_schedule.h deleted file mode 100644 index 383c0949188..00000000000 --- a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_schedule.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. - -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Enable Schedules - * - * This API enables the scheduling service for the node. For more information, - * check [here](https://rainmaker.espressif.com/docs/scheduling.html) - * - * It is recommended to set the timezone while using schedules. Check [here](https://rainmaker.espressif.com/docs/time-service.html#time-zone) for more information on timezones - * - * @note This API should be called after esp_rmaker_node_init() but before esp_rmaker_start(). - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_schedule_enable(void); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_standard_devices.h b/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_standard_devices.h deleted file mode 100644 index db9480672ba..00000000000 --- a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_standard_devices.h +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. - -#pragma once -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Create a standard Switch device - * - * This creates a Switch device with the mandatory parameters and also assigns - * the primary parameter. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] dev_name The unique device name - * @param[in] priv_data (Optional) Private data associated with the device. This should stay - * allocated throughout the lifetime of the device - * #@param[in] power Default value of the mandatory parameter "power" - * - * @return Device handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_device_t *esp_rmaker_switch_device_create(const char *dev_name, - void *priv_data, bool power); - -/** Create a standard Lightbulb device - * - * This creates a Lightbulb device with the mandatory parameters and also assigns - * the primary parameter. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] dev_name The unique device name - * @param[in] priv_data (Optional) Private data associated with the device. This should stay - * allocated throughout the lifetime of the device - * @param[in] power Default value of the mandatory parameter "power" - * - * @return Device handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_device_t *esp_rmaker_lightbulb_device_create(const char *dev_name, - void *priv_data, bool power); - -/** Create a standard Fan device - * - * This creates a Fan device with the mandatory parameters and also assigns - * the primary parameter. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] dev_name The unique device name - * @param[in] priv_data (Optional) Private data associated with the device. This should stay - * allocated throughout the lifetime of the device - * @param[in] power Default value of the mandatory parameter "power" - * - * @return Device handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_device_t *esp_rmaker_fan_device_create(const char *dev_name, - void *priv_data, bool power); - -/** Create a standard Temperature Sensor device - * - * This creates a Temperature Sensor device with the mandatory parameters and also assigns - * the primary parameter. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] dev_name The unique device name - * @param[in] priv_data (Optional) Private data associated with the device. This should stay - * allocated throughout the lifetime of the device - * @param[in] temperature Default value of the mandatory parameter "temperature" - * - * @return Device handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_device_t *esp_rmaker_temp_sensor_device_create(const char *dev_name, - void *priv_data, float temperature); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_standard_params.h b/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_standard_params.h deleted file mode 100644 index 6cde69a2935..00000000000 --- a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_standard_params.h +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Suggested default names for the parameters. - * These will also be used by default if you use any standard device helper APIs. - * - * @note These names are not mandatory. You can use the ESP RainMaker Core APIs - * to create your own parameters with custom names, if required. - */ - -#define ESP_RMAKER_DEF_NAME_PARAM "Name" -#define ESP_RMAKER_DEF_POWER_NAME "Power" -#define ESP_RMAKER_DEF_BRIGHTNESS_NAME "Brightness" -#define ESP_RMAKER_DEF_HUE_NAME "Hue" -#define ESP_RMAKER_DEF_SATURATION_NAME "Saturation" -#define ESP_RMAKER_DEF_INTENSITY_NAME "Intensity" -#define ESP_RMAKER_DEF_CCT_NAME "CCT" -#define ESP_RMAKER_DEF_DIRECTION_NAME "Direction" -#define ESP_RMAKER_DEF_SPEED_NAME "Speed" -#define ESP_RMAKER_DEF_TEMPERATURE_NAME "Temperature" -#define ESP_RMAKER_DEF_OTA_STATUS_NAME "Status" -#define ESP_RMAKER_DEF_OTA_INFO_NAME "Info" -#define ESP_RMAKER_DEF_OTA_URL_NAME "URL" -#define ESP_RMAKER_DEF_TIMEZONE_NAME "TZ" -#define ESP_RMAKER_DEF_TIMEZONE_POSIX_NAME "TZ-POSIX" -#define ESP_RMAKER_DEF_SCHEDULE_NAME "Schedules" -#define ESP_RMAKER_DEF_REBOOT_NAME "Reboot" -#define ESP_RMAKER_DEF_FACTORY_RESET_NAME "Factory-Reset" -#define ESP_RMAKER_DEF_WIFI_RESET_NAME "Wi-Fi-Reset" -#define ESP_RMAKER_DEF_LOCAL_CONTROL_POP "POP" -#define ESP_RMAKER_DEF_LOCAL_CONTROL_TYPE "Type" - -/** - * Create standard name param - * - * This will create the standard name parameter. - * This should be added to all devices for which you want a user customisable name. - * The value should be same as the device name. - * - * All standard device creation APIs will add this internally. - * No application registered callback will be called for this parameter, - * and changes will be managed internally. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_name_param_create(const char *param_name, const char *val); - -/** - * Create standard Power param - * - * This will create the standard power parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_power_param_create(const char *param_name, bool val); - -/** - * Create standard Brightness param - * - * This will create the standard brightness parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_brightness_param_create(const char *param_name, int val); - -/** - * Create standard Hue param - * - * This will create the standard hue parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_hue_param_create(const char *param_name, int val); - -/** - * Create standard Saturation param - * - * This will create the standard saturation parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_saturation_param_create(const char *param_name, int val); - -/** - * Create standard Intensity param - * - * This will create the standard intensity parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_intensity_param_create(const char *param_name, int val); - -/** - * Create standard CCT param - * - * This will create the standard cct parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_cct_param_create(const char *param_name, int val); - -/** - * Create standard Direction param - * - * This will create the standard direction parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_direction_param_create(const char *param_name, int val); - -/** - * Create standard Speed param - * - * This will create the standard speed parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_speed_param_create(const char *param_name, int val); - -/** - * Create standard Temperature param - * - * This will create the standard temperature parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_temperature_param_create(const char *param_name, float val); - -/** - * Create standard OTA Status param - * - * This will create the standard ota status parameter. Default value - * is set internally. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_ota_status_param_create(const char *param_name); - -/** - * Create standard OTA Info param - * - * This will create the standard ota info parameter. Default value - * is set internally. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_ota_info_param_create(const char *param_name); - -/** - * Create standard OTA URL param - * - * This will create the standard ota url parameter. Default value - * is set internally. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_ota_url_param_create(const char *param_name); - -/** - * Create standard Timezone param - * - * This will create the standard timezone parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter (Eg. "Asia/Shanghai"). Can be kept NULL. - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_timezone_param_create(const char *param_name, const char *val); - -/** - * Create standard POSIX Timezone param - * - * This will create the standard posix timezone parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter (Eg. "CST-8"). Can be kept NULL. - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_timezone_posix_param_create(const char *param_name, const char *val); - -/** - * Create standard Schedules param - * - * This will create the standard schedules parameter. Default value - * is set internally. - * - * @param[in] param_name Name of the parameter - * @param[in] max_schedules Maximum number of schedules allowed - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_schedules_param_create(const char *param_name, int max_schedules); - -/** - * Create standard Reboot param - * - * This will create the standard reboot parameter. - * Set value to true (via write param) for the action to trigger. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_reboot_param_create(const char *param_name); - -/** - * Create standard Factory Reset param - * - * This will create the standard factory reset parameter. - * Set value to true (via write param) for the action to trigger. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_factory_reset_param_create(const char *param_name); - -/** - * Create standard Wi-Fi Reset param - * - * This will create the standard Wi-Fi Reset parameter. - * Set value to true (via write param) for the action to trigger. - * - * @param[in] param_name Name of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_wifi_reset_param_create(const char *param_name); - -/** - * Create standard Local Control POP param - * - * This will create the standard Local Control POP parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter (Eg. "abcd1234"). Can be kept NULL. - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_local_control_pop_param_create(const char *param_name, const char *val); - -/** - * Create standard Local Control Type param - * - * This will create the standard Local Control security type parameter. - * - * @param[in] param_name Name of the parameter - * @param[in] val Default Value of the parameter - * - * @return Parameter handle on success. - * @return NULL in case of failures. - */ -esp_rmaker_param_t *esp_rmaker_local_control_type_param_create(const char *param_name, int val); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_standard_services.h b/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_standard_services.h deleted file mode 100644 index 7dc6dfbad80..00000000000 --- a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_standard_services.h +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. - -#pragma once -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Create a standard OTA service - * - * This creates an OTA service with the mandatory parameters. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] serv_name The unique service name - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_ota_service_create(const char *serv_name, void *priv_data); - -/** Create a standard OTA service - * - * This creates an OTA service with the mandatory parameters. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] serv_name The unique service name - * @param[in] timezone Default value of timezone string (Eg. "Asia/Shanghai"). Can be kept NULL. - * @param[in] timezone_posix Default value of posix timezone string (Eg. "CST-8"). Can be kept NULL. - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_time_service_create(const char *serv_name, const char *timezone, - const char *timezone_posix, void *priv_data); - -/** Create a standard Schedule service - * - * This creates a Schedule service with the mandatory parameters. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] serv_name The unique service name - * @param[in] write_cb Write callback. - * @param[in] read_cb Read callback. - * @param[in] max_schedules Maximum number of schedules supported. - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_create_schedule_service(const char *serv_name, esp_rmaker_device_write_cb_t write_cb, esp_rmaker_device_read_cb_t read_cb, int max_schedules, void *priv_data); - -/** Create a standard System service - * - * This creates an empty System service. Appropriate parameters should be added by the caller. - * - * @param[in] serv_name The unique service name - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ - -esp_rmaker_device_t *esp_rmaker_create_system_service(const char *serv_name, void *priv_data); - -/** Create a standard Local Control service - * - * This creates a Local Control service with the mandatory parameters. The default parameter names will be used. - * Refer \ref esp_rmaker_standard_params.h for default names. - * - * @param[in] serv_name The unique service name - * @param[in] pop Proof of possession - * @param[in] sec_type Security type - * @param[in] priv_data (Optional) Private data associated with the service. This should stay - * allocated throughout the lifetime of the service. - * - * @return service_handle on success. - * @return NULL in case of any error. - */ -esp_rmaker_device_t *esp_rmaker_create_local_control_service(const char *serv_name, const char *pop, int sec_type, void *priv_data); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_standard_types.h b/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_standard_types.h deleted file mode 100644 index 11eecebcb1c..00000000000 --- a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_standard_types.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -/********** STANDARD UI TYPES **********/ - -#define ESP_RMAKER_UI_TOGGLE "esp.ui.toggle" -#define ESP_RMAKER_UI_SLIDER "esp.ui.slider" -#define ESP_RMAKER_UI_DROPDOWN "esp.ui.dropdown" -#define ESP_RMAKER_UI_TEXT "esp.ui.text" -#define ESP_RMAKER_UI_HUE_SLIDER "esp.ui.hue-slider" - -/********** STANDARD PARAM TYPES **********/ - -#define ESP_RMAKER_PARAM_NAME "esp.param.name" -#define ESP_RMAKER_PARAM_POWER "esp.param.power" -#define ESP_RMAKER_PARAM_BRIGHTNESS "esp.param.brightness" -#define ESP_RMAKER_PARAM_HUE "esp.param.hue" -#define ESP_RMAKER_PARAM_SATURATION "esp.param.saturation" -#define ESP_RMAKER_PARAM_INTENSITY "esp.param.intensity" -#define ESP_RMAKER_PARAM_CCT "esp.param.cct" -#define ESP_RMAKER_PARAM_SPEED "esp.param.speed" -#define ESP_RMAKER_PARAM_DIRECTION "esp.param.direction" -#define ESP_RMAKER_PARAM_TEMPERATURE "esp.param.temperature" -#define ESP_RMAKER_PARAM_OTA_STATUS "esp.param.ota_status" -#define ESP_RMAKER_PARAM_OTA_INFO "esp.param.ota_info" -#define ESP_RMAKER_PARAM_OTA_URL "esp.param.ota_url" -#define ESP_RMAKER_PARAM_TIMEZONE "esp.param.tz" -#define ESP_RMAKER_PARAM_TIMEZONE_POSIX "esp.param.tz_posix" -#define ESP_RMAKER_PARAM_SCHEDULES "esp.param.schedules" -#define ESP_RMAKER_PARAM_REBOOT "esp.param.reboot" -#define ESP_RMAKER_PARAM_FACTORY_RESET "esp.param.factory-reset" -#define ESP_RMAKER_PARAM_WIFI_RESET "esp.param.wifi-reset" -#define ESP_RMAKER_PARAM_LOCAL_CONTROL_POP "esp.param.local_control_pop" -#define ESP_RMAKER_PARAM_LOCAL_CONTROL_TYPE "esp.param.local_control_type" - - -/********** STANDARD DEVICE TYPES **********/ - -#define ESP_RMAKER_DEVICE_SWITCH "esp.device.switch" -#define ESP_RMAKER_DEVICE_LIGHTBULB "esp.device.lightbulb" -#define ESP_RMAKER_DEVICE_FAN "esp.device.fan" -#define ESP_RMAKER_DEVICE_TEMP_SENSOR "esp.device.temperature-sensor" - - -/********** STANDARD SERVICE TYPES **********/ -#define ESP_RMAKER_SERVICE_OTA "esp.service.ota" -#define ESP_RMAKER_SERVICE_TIME "esp.service.time" -#define ESP_RMAKER_SERVICE_SCHEDULE "esp.service.schedule" -#define ESP_RMAKER_SERVICE_SYSTEM "esp.service.system" -#define ESP_RMAKER_SERVICE_LOCAL_CONTROL "esp.service.local_control" - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_user_mapping.h b/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_user_mapping.h deleted file mode 100644 index 77a153b02f2..00000000000 --- a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_user_mapping.h +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/** User-Node Mapping states */ -typedef enum { - /** Mapping does not exist or is not initialized */ - ESP_RMAKER_USER_MAPPING_RESET = 0, - /** Mapping has started */ - ESP_RMAKER_USER_MAPPING_STARTED, - /** Mapping is done */ - ESP_RMAKER_USER_MAPPING_DONE, -} esp_rmaker_user_mapping_state_t; - -/** - * Get User-Node mapping state - * - * This returns the current user-node mapping state. - * - * @return user mapping state - */ -esp_rmaker_user_mapping_state_t esp_rmaker_user_node_mapping_get_state(void); - -/** - * Create User Mapping Endpoint - * - * This will create a custom provisioning endpoint for user-node mapping. - * This should be called after wifi_prov_mgr_init() but before - * wifi_prov_mgr_start_provisioning() - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_user_mapping_endpoint_create(void); - -/** - * Register User Mapping Endpoint - * - * This will register the callback for the custom provisioning endpoint - * for user-node mapping which was created with esp_rmaker_user_mapping_endpoint_create(). - * This should be called immediately after wifi_prov_mgr_start_provisioning(). - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_user_mapping_endpoint_register(void); - -/** Add User-Node mapping - * - * This call will start the user-node mapping workflow on the node. - * This is automatically called if you have used esp_rmaker_user_mapping_endpoint_register(). - * Use this API only if you want to trigger the user-node mapping after the Wi-Fi provisioning - * has already been done. - * - * @param[in] user_id The User identifier received from the client (Phone app/CLI) - * @param[in] secret_key The Secret key received from the client (Phone app/CLI) - * - * @return ESP_OK if the workflow was successfully triggered. This does not guarantee success - * of the actual mapping. The mapping status needs to be checked separately by the clients. - * @return error on failure. - */ -esp_err_t esp_rmaker_start_user_node_mapping(char *user_id, char *secret_key); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/fb_gfx/include/fb_gfx.h b/tools/sdk/esp32s3/include/fb_gfx/include/fb_gfx.h index 079ff7bfe4a..158c80f6bf4 100644 --- a/tools/sdk/esp32s3/include/fb_gfx/include/fb_gfx.h +++ b/tools/sdk/esp32s3/include/fb_gfx/include/fb_gfx.h @@ -19,7 +19,7 @@ extern "C" { #endif typedef enum { - FB_RGB888, FB_BGR888, FB_RGB565, FB_BGR565 + FB_RGB888, FB_BGR888, FB_RGB565, FB_BGR565, FB_GRAY } fb_format_t; typedef struct { diff --git a/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_common_events.h b/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_common_events.h deleted file mode 100644 index b77f8a3d142..00000000000 --- a/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_common_events.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2021 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#ifdef __cplusplus -extern "C" -{ -#endif - -/** ESP RainMaker Common Event Base */ -ESP_EVENT_DECLARE_BASE(RMAKER_COMMON_EVENT); - -typedef enum { - /** Node reboot has been triggered. The associated event data is the time in seconds - * (type: uint8_t) after which the node will reboot. Note that this time may not be - * accurate as the events are received asynchronously.*/ - RMAKER_EVENT_REBOOT, - /** Wi-Fi credentials reset. Triggered after calling esp_rmaker_wifi_reset() */ - RMAKER_EVENT_WIFI_RESET, - /** Node reset to factory defaults. Triggered after calling esp_rmaker_factory_reset() */ - RMAKER_EVENT_FACTORY_RESET, - /** Connected to MQTT Broker */ - RMAKER_MQTT_EVENT_CONNECTED, - /** Disconnected from MQTT Broker */ - RMAKER_MQTT_EVENT_DISCONNECTED, - /** MQTT message published successfully. - * Event data will contain the message ID (integer) of published message. - */ - RMAKER_MQTT_EVENT_PUBLISHED, - /** POSIX Timezone Changed. Associated data would be NULL terminated POSIX Timezone - * Eg. "PST8PDT,M3.2.0,M11.1.0" */ - RMAKER_EVENT_TZ_POSIX_CHANGED, - /** Timezone Changed. Associated data would be NULL terminated Timezone. - * Eg. "America/Los_Angeles" - * Note that whenever this event is received, the RMAKER_EVENT_TZ_POSIX_CHANGED event - * will also be received, but not necessarily vice versa. - */ - RMAKER_EVENT_TZ_CHANGED, - /** - * MQTT message deleted from the outbox if the message couldn't have been sent and acknowledged. - * Event data will contain the message ID (integer) of deleted message. - * Valid only if CONFIG_MQTT_REPORT_DELETED_MESSAGES is enabled. - */ - RMAKER_MQTT_EVENT_MSG_DELETED, -} esp_rmaker_common_event_t; -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_factory.h b/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_factory.h deleted file mode 100644 index 9ef781b798b..00000000000 --- a/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_factory.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2021 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#ifdef __cplusplus -extern "C" -{ -#endif - -/** Initialize Factory NVS - * - * This initializes the Factory NVS partition which will store data - * that should not be cleared even after a reset to factory. - * - * @return ESP_OK on success. - * @return error on failure. - */ -esp_err_t esp_rmaker_factory_init(void); - -/** Get value from factory NVS - * - * This will search for the specified key in the Factory NVS partition, - * allocate the required memory to hold it, copy the value and return - * the pointer to it. It is responsibility of the caller to free the - * memory when the value is no more required. - * - * @param[in] key The key of the value to be read from factory NVS. - * - * @return pointer to the value on success. - * @return NULL on failure. - */ -void *esp_rmaker_factory_get(const char *key); - -/** Set a value in factory NVS - * - * This will write the value for the specified key into factory NVS. - * - * @param[in] key The key for the value to be set in factory NVS. - * @param[in] data Pointer to the value. - * @param[in] len Length of the value. - * - * @return ESP_OK on success. - * @return error on failure. - */ -esp_err_t esp_rmaker_factory_set(const char *key, void *value, size_t len); -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_mqtt_glue.h b/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_mqtt_glue.h deleted file mode 100644 index 95744bdf58c..00000000000 --- a/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_mqtt_glue.h +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2021 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#ifdef __cplusplus -extern "C" -{ -#endif - -#define RMAKER_MQTT_QOS0 0 -#define RMAKER_MQTT_QOS1 1 - -/** MQTT Connection parameters */ -typedef struct { - /** MQTT Host */ - char *mqtt_host; - /** Client ID */ - char *client_id; - /** Client Certificate in NULL terminated PEM format */ - char *client_cert; - /** Client Key in NULL terminated PEM format */ - char *client_key; - /** Server Certificate in NULL terminated PEM format */ - char *server_cert; -} esp_rmaker_mqtt_conn_params_t; - -/** MQTT Get Connection Parameters function prototype - * - * @return Pointer to \ref esp_rmaker_mqtt_conn_params_t on success. - * @return NULL on failure. - */ -typedef esp_rmaker_mqtt_conn_params_t *(*esp_rmaker_mqtt_get_conn_params_t)(void); - -/** MQTT Subscribe callback prototype - * - * @param[in] topic Topic on which the message was received - * @param[in] payload Data received in the message - * @param[in] payload_len Length of the data - * @param[in] priv_data The private data passed during subscription - */ -typedef void (*esp_rmaker_mqtt_subscribe_cb_t)(const char *topic, void *payload, size_t payload_len, void *priv_data); - -/** MQTT Init function prototype - * - * @param[in] conn_params The MQTT connection parameters. If NULL is passed, it should internally use the - * \ref esp_rmaker_mqtt_get_conn_params call if registered. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -typedef esp_err_t (*esp_rmaker_mqtt_init_t)(esp_rmaker_mqtt_conn_params_t *conn_params); - -/** MQTT Deinit function prototype - * - * Call this function after MQTT has disconnected. - */ -typedef void (*esp_rmaker_mqtt_deinit_t)(void); - -/** MQTT Connect function prototype - * - * Starts the connection attempts to the MQTT broker. - * This should ideally be called after successful network connection. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -typedef esp_err_t (*esp_rmaker_mqtt_connect_t)(void); - -/** MQTT Disconnect function prototype - * - * Disconnects from the MQTT broker. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -typedef esp_err_t (*esp_rmaker_mqtt_disconnect_t)(void); - -/** MQTT Publish Message function prototype - * - * @param[in] topic The MQTT topic on which the message should be published. - * @param[in] data Data to be published. - * @param[in] data_len Length of the data. - * @param[in] qos Quality of service for the message. - * @param[out] msg_id If a non NULL pointer is passed, the id of the published message will be returned in this. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -typedef esp_err_t (*esp_rmaker_mqtt_publish_t)(const char *topic, void *data, size_t data_len, uint8_t qos, int *msg_id); - -/** MQTT Subscribe function prototype - * - * @param[in] topic The topic to be subscribed to. - * @param[in] cb The callback to be invoked when a message is received on the given topic. - * @param[in] qos Quality of service for the subscription. - * @param[in] priv_data Optional private data to be passed to the callback. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -typedef esp_err_t (*esp_rmaker_mqtt_subscribe_t)(const char *topic, esp_rmaker_mqtt_subscribe_cb_t cb, uint8_t qos, void *priv_data); - -/** MQTT Unsubscribe function prototype - * - * @param[in] topic Topic from which to unsubscribe. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -typedef esp_err_t (*esp_rmaker_mqtt_unsubscribe_t)(const char *topic); - -/** MQTT configuration */ -typedef struct { - /** Flag to indicate if the MQTT config setup is done */ - bool setup_done; - /** Pointer to the Get MQTT params function. */ - esp_rmaker_mqtt_get_conn_params_t get_conn_params; - /** Pointer to MQTT Init function. */ - esp_rmaker_mqtt_init_t init; - /** Pointer to MQTT Deinit function. */ - esp_rmaker_mqtt_deinit_t deinit; - /** Pointer to MQTT Connect function. */ - esp_rmaker_mqtt_connect_t connect; - /** Pointer to MQTQ Disconnect function */ - esp_rmaker_mqtt_disconnect_t disconnect; - /** Pointer to MQTT Publish function */ - esp_rmaker_mqtt_publish_t publish; - /** Pointer to MQTT Subscribe function */ - esp_rmaker_mqtt_subscribe_t subscribe; - /** Pointer to MQTT Unsubscribe function */ - esp_rmaker_mqtt_unsubscribe_t unsubscribe; -} esp_rmaker_mqtt_config_t; - -/** Setup MQTT Glue - * - * This function initializes MQTT glue layer with all the default functions. - * - * @param[out] mqtt_config Pointer to an allocated MQTT configuration structure. - * - * @return ESP_OK on success. - * @return error in case of any error. - */ -esp_err_t esp_rmaker_mqtt_glue_setup(esp_rmaker_mqtt_config_t *mqtt_config); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_utils.h b/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_utils.h deleted file mode 100644 index 86ab691d492..00000000000 --- a/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_utils.h +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright 2021 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -#ifdef CONFIG_SPIRAM -#define MEM_ALLOC_EXTRAM(size) heap_caps_malloc(size, MALLOC_CAP_SPIRAM) -#define MEM_CALLOC_EXTRAM(num, size) heap_caps_calloc(num, size, MALLOC_CAP_SPIRAM) -#define MEM_REALLOC_EXTRAM(ptr, size) heap_caps_realloc(ptr, size, MALLOC_CAP_SPIRAM) -#else -#define MEM_ALLOC_EXTRAM(size) malloc(size) -#define MEM_CALLOC_EXTRAM(num, size) calloc(num, size) -#define MEM_REALLOC_EXTRAM(ptr, size) realloc(ptr, size) -#endif - -typedef struct esp_rmaker_time_config { - /** If not specified, then 'CONFIG_ESP_RMAKER_SNTP_SERVER_NAME' is used as the SNTP server. */ - char *sntp_server_name; - /** Optional callback to invoke, whenever time is synchronised. This will be called - * periodically as per the SNTP polling interval (which is 60min by default). - * If kept NULL, the default callback will be invoked, which will just print the - * current local time. - */ - sntp_sync_time_cb_t sync_time_cb; -} esp_rmaker_time_config_t; - -/** Reboot the device after a delay - * - * This API just starts a reboot timer and returns immediately. - * The actual reboot is trigerred asynchronously in the timer callback. - * This is useful if you want to reboot after a delay, to allow other tasks to finish - * their operations (Eg. MQTT publish to indicate OTA success). The \ref RMAKER_EVENT_REBOOT - * event is triggered when the reboot timer is started. - * - * @param[in] seconds Time in seconds after which the device should reboot. - * - * @return ESP_OK on success. - * @return error on failure. - */ -esp_err_t esp_rmaker_reboot(int8_t seconds); - -/** Reset Wi-Fi credentials and (optionally) reboot - * - * This will reset just the Wi-Fi credentials and (optionally) trigger a reboot. - * This is useful when you want to keep all the entries in NVS memory - * intact, but just change the Wi-Fi credentials. The \ref RMAKER_EVENT_WIFI_RESET - * event is triggered when this API is called. The actual reset will happen after a - * delay if reset_seconds is not zero. - * - * @note This reset and reboot operations will happen asynchronously depending - * on the values passed to the API. - * - * @param[in] reset_seconds Time in seconds after which the reset should get triggered. - * This will help other modules take some actions before the device actually resets. - * If set to zero, the operation would be performed immediately. - * @param[in] reboot_seconds Time in seconds after which the device should reboot. If set - * to negative value, the device will not reboot at all. - * - * @return ESP_OK on success. - * @return error on failure. - */ -esp_err_t esp_rmaker_wifi_reset(int8_t reset_seconds, int8_t reboot_seconds); - -/** Reset to factory defaults and reboot - * - * This will clear entire NVS partition and (optionally) trigger a reboot. - * The \ref RMAKER_EVENT_FACTORY_RESET event is triggered when this API is called. - * The actual reset will happen after a delay if reset_seconds is not zero. - * - * @note This reset and reboot operations will happen asynchronously depending - * on the values passed to the API. - * - * @param[in] reset_seconds Time in seconds after which the reset should get triggered. - * This will help other modules take some actions before the device actually resets. - * If set to zero, the operation would be performed immediately. - * @param[in] reboot_seconds Time in seconds after which the device should reboot. If set - * to negative value, the device will not reboot at all. - * - * @return ESP_OK on success. - * @return error on failure. - */ -esp_err_t esp_rmaker_factory_reset(int8_t reset_seconds, int8_t reboot_seconds); - -/** Initialize time synchronization - * - * This API initializes SNTP for time synchronization. - * - * @param[in] config Configuration to be used for SNTP time synchronization. The default configuration is used if NULL is passed. - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_time_sync_init(esp_rmaker_time_config_t *config); - -/** Check if current time is updated - * - * This API checks if the current system time is updated against the reference time of 1-Jan-2019. - * - * @return true if time is updated - * @return false if time is not updated - */ -bool esp_rmaker_time_check(void); - -/** Wait for time synchronization - * - * This API waits for the system time to be updated against the reference time of 1-Jan-2019. - * This is a blocking call. - * - * @param[in] ticks_to_wait Number of ticks to wait for time synchronization. Accepted values: 0 to portMAX_DELAY. - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_time_wait_for_sync(uint32_t ticks_to_wait); - -/** Set POSIX timezone - * - * Set the timezone (TZ environment variable) as per the POSIX format - * specified in the [GNU libc documentation](https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html). - * Eg. For China: "CST-8" - * For US Pacific Time (including daylight saving information): "PST8PDT,M3.2.0,M11.1.0" - * - * @param[in] tz_posix NULL terminated TZ POSIX string - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_time_set_timezone_posix(const char *tz_posix); - -/** Set timezone location string - * - * Set the timezone as a user friendly location string. - * Check [here](https://rainmaker.espressif.com/docs/time-service.html) for a list of valid values. - * - * Eg. For China: "Asia/Shanghai" - * For US Pacific Time: "America/Los_Angeles" - * - * @note Setting timezone using this API internally also sets the POSIX timezone string. - * - * @param[in] tz NULL terminated Timezone location string - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_time_set_timezone(const char *tz); - -/** Get the current POSIX timezone - * - * This fetches the current timezone in POSIX format, read from NVS. - * - * @return Pointer to a NULL terminated POSIX timezone string on success. - * Freeing this is the responsibility of the caller. - * @return NULL on failure. - */ -char *esp_rmaker_time_get_timezone_posix(void); - -/** Get the current timezone - * - * This fetches the current timezone in POSIX format, read from NVS. - * - * @return Pointer to a NULL terminated timezone string on success. - * Freeing this is the responsibility of the caller. - * @return NULL on failure. - */ -char *esp_rmaker_time_get_timezone(void); - -/** Get printable local time string - * - * Get a printable local time string, with information of timezone and Daylight Saving. - * Eg. "Tue Sep 1 09:04:38 2020 -0400[EDT], DST: Yes" - * "Tue Sep 1 21:04:04 2020 +0800[CST], DST: No" - * - * - * @param[out] buf Pointer to a pre-allocated buffer into which the time string will - * be populated. - * @param[in] buf_len Length of the above buffer. - * - * @return ESP_OK on success - * @return error on failure - */ -esp_err_t esp_rmaker_get_local_time_str(char *buf, size_t buf_len); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_work_queue.h b/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_work_queue.h deleted file mode 100644 index 0e696d46848..00000000000 --- a/tools/sdk/esp32s3/include/rmaker_common/include/esp_rmaker_work_queue.h +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2021 Espressif Systems (Shanghai) PTE LTD -// -// 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. -#pragma once -#include -#include -#include -#ifdef __cplusplus -extern "C" -{ -#endif -/** Prototype for ESP RainMaker Work Queue Function - * - * @param[in] priv_data The private data associated with the work function. - */ -typedef void (*esp_rmaker_work_fn_t)(void *priv_data); - -/** Initializes the Work Queue - * - * This initializes the work queue, which is basically a mechanism to run - * tasks in the context of a dedicated thread. You can start queueing tasks - * after this, but they will get executed only after calling - * esp_rmaker_work_queue_start(). - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_work_queue_init(void); - -/** De-initialize the Work Queue - * - * This de-initializes the work queue. Note that the work queue needs to - * be stopped using esp_rmaker_work_queue_stop() before calling this. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_work_queue_deinit(void); - -/** Start the Work Queue - * - * This starts the Work Queue thread which then starts executing the tasks queued. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_work_queue_start(void); - -/** Stop the Work Queue - * - * This stops a running Work Queue. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_work_queue_stop(void); - -/** Queue execution of a function in the Work Queue's context - * - * This API queues a work function for execution in the Work Queue Task's context. - * - * @param[in] work_fn The Work function to be queued. - * @param[in] priv_data Private data to be passed to the work function. - * - * @return ESP_OK on success. - * @return error in case of failure. - */ -esp_err_t esp_rmaker_work_queue_add_task(esp_rmaker_work_fn_t work_fn, void *priv_data); - -#ifdef __cplusplus -} -#endif diff --git a/tools/sdk/esp32s3/ld/libbtbb.a b/tools/sdk/esp32s3/ld/libbtbb.a index 0b7d3d48fa0..88c2b9f9e23 100644 Binary files a/tools/sdk/esp32s3/ld/libbtbb.a and b/tools/sdk/esp32s3/ld/libbtbb.a differ diff --git a/tools/sdk/esp32s3/ld/libphy.a b/tools/sdk/esp32s3/ld/libphy.a index c8be3a24e3f..dba6f1b2928 100644 Binary files a/tools/sdk/esp32s3/ld/libphy.a and b/tools/sdk/esp32s3/ld/libphy.a differ diff --git a/tools/sdk/esp32s3/lib/libapp_update.a b/tools/sdk/esp32s3/lib/libapp_update.a index 2c1b438b4d9..916a28ee901 100644 Binary files a/tools/sdk/esp32s3/lib/libapp_update.a and b/tools/sdk/esp32s3/lib/libapp_update.a differ diff --git a/tools/sdk/esp32s3/lib/libdriver.a b/tools/sdk/esp32s3/lib/libdriver.a index 086efe126b1..daeccfcc46c 100644 Binary files a/tools/sdk/esp32s3/lib/libdriver.a and b/tools/sdk/esp32s3/lib/libdriver.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_littlefs.a b/tools/sdk/esp32s3/lib/libesp_littlefs.a index 7bdae6f7e20..0c62c8e100a 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_littlefs.a and b/tools/sdk/esp32s3/lib/libesp_littlefs.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_phy.a b/tools/sdk/esp32s3/lib/libesp_phy.a index 3bfdb2dd85a..eaa7460b5d7 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_phy.a and b/tools/sdk/esp32s3/lib/libesp_phy.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_rainmaker.a b/tools/sdk/esp32s3/lib/libesp_rainmaker.a index 3f6cf880938..5e08124e9b0 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_rainmaker.a and b/tools/sdk/esp32s3/lib/libesp_rainmaker.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_wifi.a b/tools/sdk/esp32s3/lib/libesp_wifi.a index 947e30d673e..b83922d22e9 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_wifi.a and b/tools/sdk/esp32s3/lib/libesp_wifi.a differ diff --git a/tools/sdk/esp32s3/lib/libfb_gfx.a b/tools/sdk/esp32s3/lib/libfb_gfx.a index e7f5d23df0a..50fc5b069a8 100644 Binary files a/tools/sdk/esp32s3/lib/libfb_gfx.a and b/tools/sdk/esp32s3/lib/libfb_gfx.a differ diff --git a/tools/sdk/esp32s3/lib/libhal.a b/tools/sdk/esp32s3/lib/libhal.a index 63e887f9d5e..cffeb7557d8 100644 Binary files a/tools/sdk/esp32s3/lib/libhal.a and b/tools/sdk/esp32s3/lib/libhal.a differ diff --git a/tools/sdk/esp32s3/lib/liblwip.a b/tools/sdk/esp32s3/lib/liblwip.a index 7d5706cd614..dc954044287 100644 Binary files a/tools/sdk/esp32s3/lib/liblwip.a and b/tools/sdk/esp32s3/lib/liblwip.a differ diff --git a/tools/sdk/esp32s3/opi_opi/include/sdkconfig.h b/tools/sdk/esp32s3/opi_opi/include/sdkconfig.h index 6643e20a3a8..85121ebafa0 100644 --- a/tools/sdk/esp32s3/opi_opi/include/sdkconfig.h +++ b/tools/sdk/esp32s3/opi_opi/include/sdkconfig.h @@ -62,6 +62,7 @@ #define CONFIG_ESP_RMAKER_OTA_AUTOFETCH_PERIOD 0 #define CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE 1024 #define CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES 10 +#define CONFIG_ESP_RMAKER_SCENES_MAX_SCENES 10 #define CONFIG_ENABLE_ARDUINO_DEPENDS 1 #define CONFIG_AUTOSTART_ARDUINO 1 #define CONFIG_ARDUINO_RUN_CORE1 1 @@ -989,5 +990,5 @@ #define CONFIG_USB_MSC_BUFSIZE CONFIG_TINYUSB_MSC_BUFSIZE #define CONFIG_USB_MSC_ENABLED CONFIG_TINYUSB_MSC_ENABLED #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "c29343eb94" +#define CONFIG_ARDUINO_IDF_COMMIT "b8050b365e" #define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s3/opi_opi/libesp_hw_support.a b/tools/sdk/esp32s3/opi_opi/libesp_hw_support.a index 04f953198f2..8c0266c0a50 100644 Binary files a/tools/sdk/esp32s3/opi_opi/libesp_hw_support.a and b/tools/sdk/esp32s3/opi_opi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32s3/opi_opi/libesp_system.a b/tools/sdk/esp32s3/opi_opi/libesp_system.a index 553753f652f..fc20120ffbd 100644 Binary files a/tools/sdk/esp32s3/opi_opi/libesp_system.a and b/tools/sdk/esp32s3/opi_opi/libesp_system.a differ diff --git a/tools/sdk/esp32s3/opi_qspi/include/sdkconfig.h b/tools/sdk/esp32s3/opi_qspi/include/sdkconfig.h index 5fe547f40f1..34a97254f39 100644 --- a/tools/sdk/esp32s3/opi_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32s3/opi_qspi/include/sdkconfig.h @@ -62,6 +62,7 @@ #define CONFIG_ESP_RMAKER_OTA_AUTOFETCH_PERIOD 0 #define CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE 1024 #define CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES 10 +#define CONFIG_ESP_RMAKER_SCENES_MAX_SCENES 10 #define CONFIG_ENABLE_ARDUINO_DEPENDS 1 #define CONFIG_AUTOSTART_ARDUINO 1 #define CONFIG_ARDUINO_RUN_CORE1 1 @@ -987,5 +988,5 @@ #define CONFIG_USB_MSC_BUFSIZE CONFIG_TINYUSB_MSC_BUFSIZE #define CONFIG_USB_MSC_ENABLED CONFIG_TINYUSB_MSC_ENABLED #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "c29343eb94" +#define CONFIG_ARDUINO_IDF_COMMIT "b8050b365e" #define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s3/opi_qspi/libesp_hw_support.a b/tools/sdk/esp32s3/opi_qspi/libesp_hw_support.a index 6920bc8eb68..64e69f5885b 100644 Binary files a/tools/sdk/esp32s3/opi_qspi/libesp_hw_support.a and b/tools/sdk/esp32s3/opi_qspi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32s3/opi_qspi/libesp_system.a b/tools/sdk/esp32s3/opi_qspi/libesp_system.a index b7340b1355c..105a6a344e0 100644 Binary files a/tools/sdk/esp32s3/opi_qspi/libesp_system.a and b/tools/sdk/esp32s3/opi_qspi/libesp_system.a differ diff --git a/tools/sdk/esp32s3/opi_qspi/sections.ld b/tools/sdk/esp32s3/opi_qspi/sections.ld index 7723c681ffc..b4a705d5024 100644 --- a/tools/sdk/esp32s3/opi_qspi/sections.ld +++ b/tools/sdk/esp32s3/opi_qspi/sections.ld @@ -365,8 +365,8 @@ SECTIONS *(.ext_ram.bss*) *(.bss .bss.*) - *(.ext_ram.bss .ext_ram.bss.*) *(.dynbss .dynsbss .gnu.linkonce.b .gnu.linkonce.b.* .gnu.linkonce.sb .gnu.linkonce.sb.* .gnu.linkonce.sb2 .gnu.linkonce.sb2.* .sbss .sbss.* .sbss2 .sbss2.* .scommon .share.mem) + *(.ext_ram.bss .ext_ram.bss.*) *(COMMON) _bt_bss_start = ABSOLUTE(.); *libbt.a:(.bss .bss.* COMMON) diff --git a/tools/sdk/esp32s3/qspi_opi/include/sdkconfig.h b/tools/sdk/esp32s3/qspi_opi/include/sdkconfig.h index 1e959037afb..4be92f58374 100644 --- a/tools/sdk/esp32s3/qspi_opi/include/sdkconfig.h +++ b/tools/sdk/esp32s3/qspi_opi/include/sdkconfig.h @@ -61,6 +61,7 @@ #define CONFIG_ESP_RMAKER_OTA_AUTOFETCH_PERIOD 0 #define CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE 1024 #define CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES 10 +#define CONFIG_ESP_RMAKER_SCENES_MAX_SCENES 10 #define CONFIG_ENABLE_ARDUINO_DEPENDS 1 #define CONFIG_AUTOSTART_ARDUINO 1 #define CONFIG_ARDUINO_RUN_CORE1 1 @@ -989,5 +990,5 @@ #define CONFIG_USB_MSC_BUFSIZE CONFIG_TINYUSB_MSC_BUFSIZE #define CONFIG_USB_MSC_ENABLED CONFIG_TINYUSB_MSC_ENABLED #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "c29343eb94" +#define CONFIG_ARDUINO_IDF_COMMIT "b8050b365e" #define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s3/qspi_opi/libesp_hw_support.a b/tools/sdk/esp32s3/qspi_opi/libesp_hw_support.a index 04f953198f2..8c0266c0a50 100644 Binary files a/tools/sdk/esp32s3/qspi_opi/libesp_hw_support.a and b/tools/sdk/esp32s3/qspi_opi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32s3/qspi_opi/libesp_system.a b/tools/sdk/esp32s3/qspi_opi/libesp_system.a index b38d8ac77be..1fc0762395c 100644 Binary files a/tools/sdk/esp32s3/qspi_opi/libesp_system.a and b/tools/sdk/esp32s3/qspi_opi/libesp_system.a differ diff --git a/tools/sdk/esp32s3/qspi_opi/sections.ld b/tools/sdk/esp32s3/qspi_opi/sections.ld index 721eecae0cb..37bd95eb26b 100644 --- a/tools/sdk/esp32s3/qspi_opi/sections.ld +++ b/tools/sdk/esp32s3/qspi_opi/sections.ld @@ -363,8 +363,8 @@ SECTIONS *(.ext_ram.bss*) *(.bss .bss.*) - *(.ext_ram.bss .ext_ram.bss.*) *(.dynbss .dynsbss .gnu.linkonce.b .gnu.linkonce.b.* .gnu.linkonce.sb .gnu.linkonce.sb.* .gnu.linkonce.sb2 .gnu.linkonce.sb2.* .sbss .sbss.* .sbss2 .sbss2.* .scommon .share.mem) + *(.ext_ram.bss .ext_ram.bss.*) *(COMMON) _bt_bss_start = ABSOLUTE(.); *libbt.a:(.bss .bss.* COMMON) diff --git a/tools/sdk/esp32s3/qspi_qspi/include/sdkconfig.h b/tools/sdk/esp32s3/qspi_qspi/include/sdkconfig.h index af72f3ea2d5..e63d91dc98b 100644 --- a/tools/sdk/esp32s3/qspi_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32s3/qspi_qspi/include/sdkconfig.h @@ -61,6 +61,7 @@ #define CONFIG_ESP_RMAKER_OTA_AUTOFETCH_PERIOD 0 #define CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE 1024 #define CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES 10 +#define CONFIG_ESP_RMAKER_SCENES_MAX_SCENES 10 #define CONFIG_ENABLE_ARDUINO_DEPENDS 1 #define CONFIG_AUTOSTART_ARDUINO 1 #define CONFIG_ARDUINO_RUN_CORE1 1 @@ -987,5 +988,5 @@ #define CONFIG_USB_MSC_BUFSIZE CONFIG_TINYUSB_MSC_BUFSIZE #define CONFIG_USB_MSC_ENABLED CONFIG_TINYUSB_MSC_ENABLED #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "c29343eb94" +#define CONFIG_ARDUINO_IDF_COMMIT "b8050b365e" #define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s3/qspi_qspi/libesp_hw_support.a b/tools/sdk/esp32s3/qspi_qspi/libesp_hw_support.a index 6920bc8eb68..64e69f5885b 100644 Binary files a/tools/sdk/esp32s3/qspi_qspi/libesp_hw_support.a and b/tools/sdk/esp32s3/qspi_qspi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32s3/qspi_qspi/libesp_system.a b/tools/sdk/esp32s3/qspi_qspi/libesp_system.a index e94857a0c26..aad064f7eea 100644 Binary files a/tools/sdk/esp32s3/qspi_qspi/libesp_system.a and b/tools/sdk/esp32s3/qspi_qspi/libesp_system.a differ diff --git a/tools/sdk/esp32s3/sdkconfig b/tools/sdk/esp32s3/sdkconfig index 1a519cf461f..07f6a585cea 100644 --- a/tools/sdk/esp32s3/sdkconfig +++ b/tools/sdk/esp32s3/sdkconfig @@ -174,6 +174,13 @@ CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE=1024 # CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES=10 # end of ESP RainMaker Scheduling + +# +# ESP RainMaker Scenes +# +CONFIG_ESP_RMAKER_SCENES_MAX_SCENES=10 +# CONFIG_ESP_RMAKER_SCENES_DEACTIVATE_SUPPORT is not set +# end of ESP RainMaker Scenes # end of ESP RainMaker Config #