diff --git a/README.md b/README.md index f1d0a8c..5023fcb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Tested on -1. [ESP32 ESP-IDF v5.5.1](https://docs.espressif.com/projects/esp-idf/en/v5.5.1/esp32/index.html) +1. [ESP32 ESP-IDF v5.5.3](https://docs.espressif.com/projects/esp-idf/en/v5.5.3/esp32/index.html) ## SAST Tools @@ -19,7 +19,7 @@ In an existing project, run the following command to install the component: ```text cd ../your_project/components -git clone http://git.zh.com.ru/esp_components/zh_vector +git clone https://github.com/aZholtikov/zh_vector ``` In the application, add the component: diff --git a/include/zh_vector.h b/include/zh_vector.h index 73f66fd..a7dd37d 100644 --- a/include/zh_vector.h +++ b/include/zh_vector.h @@ -34,7 +34,7 @@ extern "C" * * @return ESP_OK if success or an error code otherwise. */ - esp_err_t zh_vector_init(zh_vector_t *vector, uint16_t unit); + esp_err_t zh_vector_init(zh_vector_t *vector, uint16_t unit, ...); /** * @brief Deinitialize vector. Free all allocated memory. diff --git a/version.txt b/version.txt index e6d5cb8..1cc5f65 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.2 \ No newline at end of file +1.1.0 \ No newline at end of file diff --git a/zh_vector.c b/zh_vector.c index a4e3ae0..cdc4242 100644 --- a/zh_vector.c +++ b/zh_vector.c @@ -15,7 +15,7 @@ static const char *TAG = "zh_vector"; static esp_err_t _resize(zh_vector_t *vector, uint16_t capacity); -esp_err_t zh_vector_init(zh_vector_t *vector, uint16_t unit) +esp_err_t zh_vector_init(zh_vector_t *vector, uint16_t unit, ...) { ZH_LOGI("Vector initialization begin."); ZH_ERROR_CHECK(vector != NULL && unit != 0, ESP_ERR_INVALID_ARG, NULL, "Vector initialization failed. Invalid argument.");