Update Readme and add PlatformIO library.json file

This commit is contained in:
Justin Hammond 2022-11-28 19:59:53 +08:00
parent b72159f31d
commit e1f297b16c
3 changed files with 53 additions and 2 deletions

View file

@ -22,15 +22,32 @@ You should be careful with your GitHub PAT and putting it in the source code. I
## Usage ## Usage
via the Espressif Component Registry: ### esp-idf via Espressif Component Registry:
```bash ```bash
idf.py add-dependency Fishwaldo/ghota^0.0.1 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 ## Example
After Initilizing Network Access, Start a timer to periodically check for new releases: 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 ```c
ghota_config_t ghconfig = { ghota_config_t ghconfig = {
.filenamematch = "GithubOTA-esp32.bin", // Glob Pattern to match against the Firmware file .filenamematch = "GithubOTA-esp32.bin", // Glob Pattern to match against the Firmware file

View file

@ -1,5 +1,5 @@
# Version of the component [Required, if not passed during upload] # Version of the component [Required, if not passed during upload]
version: "0.0.1" # version: "0.0.1"
# Short description for the project [Recommended] # Short description for the project [Recommended]
description: esp32 OTA Component to update firmware from Github Releases description: esp32 OTA Component to update firmware from Github Releases
# Github repo or a home [Recommended] # Github repo or a home [Recommended]

34
library.json Normal file
View file

@ -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"
]
}
]
}