diff --git a/README.md b/README.md index 266bc34..3a462ae 100644 --- a/README.md +++ b/README.md @@ -22,15 +22,32 @@ You should be careful with your GitHub PAT and putting it in the source code. I ## Usage -via the Espressif Component Registry: +### esp-idf via Espressif Component Registry: ```bash idf.py add-dependency Fishwaldo/ghota^0.0.1 ``` +#### Platform IO Registry: + +add this to your platform.ini file: + +```ini +lib_deps = + Fishwaldo/ghota@^0.0.1 +``` + +You also need to copy the contents of [Kconfig](Kconfig) into your project's Kconfig file, and run pio run -t menuconfig to configure the component. + +#### API Documentation: + +More details on the API are available [here](https://esp-github-ota.readthedocs.io/en/latest/index.html) + ## Example After Initilizing Network Access, Start a timer to periodically check for new releases: +(if you a reading this from https://components.espressif.com, please note that this website munges the examples below. Please refer to https://github.com/Fishwaldo/esp_ghota for the correct examples) + ```c ghota_config_t ghconfig = { .filenamematch = "GithubOTA-esp32.bin", // Glob Pattern to match against the Firmware file diff --git a/idf_component.yml b/idf_component.yml index f4a7f7d..4fdb6f1 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -1,5 +1,5 @@ # Version of the component [Required, if not passed during upload] -version: "0.0.1" +# version: "0.0.1" # Short description for the project [Recommended] description: esp32 OTA Component to update firmware from Github Releases # Github repo or a home [Recommended] diff --git a/library.json b/library.json new file mode 100644 index 0000000..f81a50e --- /dev/null +++ b/library.json @@ -0,0 +1,34 @@ +{ + "name": "esp_ghota", + "version": "0.0.1", + "description": "a OTA library to upgrade your firmware via the Github Releases API", + "keywords": "esp32 ota github", + "repository": + { + "type": "git", + "url": "https://github.com/Fishwaldo/esp_ghota.git" + }, + "authors": + [ + { + "name": "Justin Hammond", + "email": "justin@dynam.ac", + "url": "https://github.com/Fishwaldo", + "maintainer": true + } + ], + "license": "MIT", + "frameworks": "espidf", + "platforms": "espressif32", + "headers": ["include/esp_ghota.h", "include/semver.h"], + "examples": [ + { + "name": "esp_ghota_example", + "base": "examples/esp_ghota_example", + "files" : [ + "main/main.c", + "spiffs/test.txt" + ] + } + ] + } \ No newline at end of file