From cb25d34e2ec585cd05da8f5b1f28e077447a19e6 Mon Sep 17 00:00:00 2001 From: UncleRus Date: Wed, 2 Aug 2023 04:30:57 +0500 Subject: [PATCH] feat: add new python devtool, remove ruby devtool, update metadata format, new ci workflow --- .github/labeler.yml | 713 -------- .github/workflows/README.md | 238 --- .../action-check-components-and-examples.yml | 83 - .../action-check-components-label.yml | 110 -- .github/workflows/actions-on-pr-by-label.yml | 55 - .github/workflows/build.yml | 1427 ----------------- .github/workflows/ci.yml | 373 +++++ .github/workflows/doc.yml | 59 - .../workflows/labeler-by-workflow-status.yml | 84 - .github/workflows/labeler.yml | 33 - .github/workflows/metadata.yml | 61 - .gitignore | 3 + CONTRIBUTING.md | 4 +- Metadata.md | 90 +- README.md | 384 ++--- components/ads111x/.eil.yml | 47 +- components/ads130e08/.eil.yml | 36 +- components/aht/.eil.yml | 46 +- components/am2320/.eil.yml | 46 +- components/bh1750/.eil.yml | 48 +- components/bh1900nux/.eil.yml | 42 +- components/bme680/.eil.yml | 53 +- components/bmp180/.eil.yml | 51 +- components/bmp280/.eil.yml | 51 +- components/button/.eil.yml | 40 +- components/ccs811/.eil.yml | 50 +- components/color/.eil.yml | 40 +- components/dht/.eil.yml | 52 +- components/dps310/.eil.yml | 47 +- components/ds1302/.eil.yml | 50 +- components/ds1307/.eil.yml | 44 +- components/ds18x20/.eil.yml | 54 +- components/ds3231/.eil.yml | 52 +- components/ds3502/.eil.yml | 42 +- components/encoder/.eil.yml | 45 +- components/esp_idf_lib_helpers/.eil.yml | 43 +- components/example/.eil.yml | 42 +- components/framebuffer/.eil.yml | 38 +- components/hd44780/.eil.yml | 41 +- components/hdc1000/.eil.yml | 47 +- components/hmc5883l/.eil.yml | 45 +- components/ht16k33/.eil.yml | 40 +- components/hts221/.eil.yml | 45 +- components/hx711/.eil.yml | 45 +- components/i2cdev/.eil.yml | 44 +- components/icm42670/.eil.yml | 42 +- components/ina219/.eil.yml | 42 +- components/ina260/.eil.yml | 42 +- components/ina3221/.eil.yml | 47 +- components/lc709203f/.eil.yml | 41 +- components/led_strip/.eil.yml | 42 +- components/led_strip_spi/.eil.yml | 51 +- components/lib8tion/.eil.yml | 36 +- components/lm75/.eil.yml | 45 +- components/ls7366r/.eil.yml | 36 +- components/max1704x/.eil.yml | 42 +- components/max31725/.eil.yml | 42 +- components/max31855/.eil.yml | 38 +- components/max31865/.eil.yml | 38 +- components/max7219/.eil.yml | 38 +- components/mcp23008/.eil.yml | 42 +- components/mcp23x17/.eil.yml | 42 +- components/mcp342x/.eil.yml | 42 +- components/mcp4725/.eil.yml | 42 +- components/mcp960x/.eil.yml | 42 +- components/mcp9808/.eil.yml | 42 +- components/mhz19b/.eil.yml | 49 +- components/mpu6050/.eil.yml | 55 +- components/mpu6050/README.md | 5 +- components/ms5611/.eil.yml | 49 +- components/noise/.eil.yml | 38 +- components/onewire/.eil.yml | 52 +- components/pca9557/.eil.yml | 42 +- components/pca9685/.eil.yml | 42 +- components/pcf8563/.eil.yml | 42 +- components/pcf8574/.eil.yml | 42 +- components/pcf8575/.eil.yml | 42 +- components/pcf8591/.eil.yml | 47 +- components/qmc5883l/.eil.yml | 42 +- components/rda5807m/.eil.yml | 42 +- components/scd30/.eil.yml | 54 +- components/scd4x/.eil.yml | 49 +- components/sgm58031/.eil.yml | 45 +- components/sgp40/.eil.yml | 42 +- components/sht3x/.eil.yml | 49 +- components/sht4x/.eil.yml | 45 +- components/si7021/.eil.yml | 50 +- components/sts21/.eil.yml | 44 +- components/sts21/sts21.c | 4 +- components/sts21/sts21.h | 4 +- components/sts3x/.eil.yml | 53 +- components/sts3x/sts3x.c | 4 +- components/sts3x/sts3x.h | 4 +- components/tca9548/.eil.yml | 43 +- components/tca95x5/.eil.yml | 43 +- components/tda74xx/.eil.yml | 42 +- components/tsl2561/.eil.yml | 47 +- components/tsl2591/.eil.yml | 42 +- components/tsl4531/.eil.yml | 47 +- components/tsys01/.eil.yml | 43 +- components/ultrasonic/.eil.yml | 44 +- components/veml7700/.eil.yml | 42 +- components/wiegand/.eil.yml | 44 +- devtools/.rubocop.yml | 134 -- devtools/README.md.erb | 151 -- devtools/Rakefile | 44 - devtools/cmake-get-requires/.gitignore | 4 - devtools/cmake-get-requires/CMakeLists.txt | 23 - devtools/devtool.py | 200 +++ devtools/devtool/__init__.py | 2 + devtools/devtool/const.py | 8 + devtools/devtool/errors.py | 70 + devtools/devtool/metadata.py | 197 +++ devtools/devtool/templates/README.md | 113 ++ devtools/groups.yml | 2 - devtools/persons.yml | 36 +- devtools/requirements.txt | 3 + devtools/spec/component.rb | 117 -- devtools/spec/component_spec.rb | 169 -- devtools/spec/copyright.rb | 50 - devtools/spec/group.rb | 47 - devtools/spec/group_list.rb | 35 - devtools/spec/groups_spec.rb | 66 - devtools/spec/license.rb | 17 - devtools/spec/metadata.rb | 41 - devtools/spec/person.rb | 100 -- devtools/spec/person_list.rb | 34 - devtools/spec/persons_spec.rb | 34 - devtools/spec/spec_helper.rb | 13 - devtools/spec/target.rb | 65 - devtools/spec/target_list.rb | 6 - devtools/spec/targets_spec.rb | 28 - devtools/targets.yml | 8 +- 133 files changed, 2932 insertions(+), 6315 deletions(-) delete mode 100644 .github/labeler.yml delete mode 100644 .github/workflows/README.md delete mode 100644 .github/workflows/action-check-components-and-examples.yml delete mode 100644 .github/workflows/action-check-components-label.yml delete mode 100644 .github/workflows/actions-on-pr-by-label.yml delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/doc.yml delete mode 100644 .github/workflows/labeler-by-workflow-status.yml delete mode 100644 .github/workflows/labeler.yml delete mode 100644 .github/workflows/metadata.yml delete mode 100644 devtools/.rubocop.yml delete mode 100644 devtools/README.md.erb delete mode 100644 devtools/Rakefile delete mode 100644 devtools/cmake-get-requires/.gitignore delete mode 100644 devtools/cmake-get-requires/CMakeLists.txt create mode 100755 devtools/devtool.py create mode 100644 devtools/devtool/__init__.py create mode 100644 devtools/devtool/const.py create mode 100644 devtools/devtool/errors.py create mode 100644 devtools/devtool/metadata.py create mode 100644 devtools/devtool/templates/README.md create mode 100644 devtools/requirements.txt delete mode 100644 devtools/spec/component.rb delete mode 100644 devtools/spec/component_spec.rb delete mode 100644 devtools/spec/copyright.rb delete mode 100644 devtools/spec/group.rb delete mode 100644 devtools/spec/group_list.rb delete mode 100644 devtools/spec/groups_spec.rb delete mode 100644 devtools/spec/license.rb delete mode 100644 devtools/spec/metadata.rb delete mode 100644 devtools/spec/person.rb delete mode 100644 devtools/spec/person_list.rb delete mode 100644 devtools/spec/persons_spec.rb delete mode 100644 devtools/spec/spec_helper.rb delete mode 100644 devtools/spec/target.rb delete mode 100644 devtools/spec/target_list.rb delete mode 100644 devtools/spec/targets_spec.rb diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index f43c2b7b..00000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,713 +0,0 @@ ---- - -# see https://github.com/fuxingloh/multi-labeler -version: v1 -labels: - - # these labels are used to draft releases. - - label: "enhancement" - matcher: - branch: "^(feat|feature)-.*" - - label: "bugfix" - matcher: - branch: "^(bugfix|fix)-.*" - - label: "doc" - matcher: - branch: "^(doc|documentation)-.*" - - label: "ci" - matcher: - branch: "^ci-.*" - - label: "chore" - matcher: - branch: "^chore-.*" - - # area indicates which files are modified in the PR. - - label: "area:docs" - sync: true - matcher: - files: - any: - - "docs/**" - - "*.md" - - label: "area:docs-only" - sync: true - matcher: - files: - any: - - "docs/**" - - "*.md" - all: - - "!components" - - "!.github/**" - - label: "area:ci" - sync: true - matcher: - files: - - ".github/**" - - label: "area:components" - sync: true - matcher: - files: "components/**" - - label: "area:components:ads111x" - sync: true - matcher: - files: - any: - - "components/ads111x/**" - - "components/ads111x/.eil.yml" - - "examples/ads111x/**" - - label: "area:components:aht" - sync: true - matcher: - files: - any: - - "components/aht/**" - - "components/aht/.eil.yml" - - "examples/aht/**" - - label: "area:components:bh1750" - sync: true - matcher: - files: - any: - - "components/bh1750/**" - - "components/bh1750/.eil.yml" - - "examples/bh1750/**" - - label: "area:components:bh1900nux" - sync: true - matcher: - files: - any: - - "components/bh1900nux/**" - - "components/bh1900nux/.eil.yml" - - "examples/bh1900nux/**" - - label: "area:components:bme680" - sync: true - matcher: - files: - any: - - "components/bme680/**" - - "components/bme680/.eil.yml" - - "examples/bme680/**" - - label: "area:components:bmp180" - sync: true - matcher: - files: - any: - - "components/bmp180/**" - - "components/bmp180/.eil.yml" - - "examples/bmp180/**" - - label: "area:components:bmp280" - sync: true - matcher: - files: - any: - - "components/bmp280/**" - - "components/bmp280/.eil.yml" - - "examples/bmp280/**" - - label: "area:components:button" - sync: true - matcher: - files: - any: - - "components/button/**" - - "components/button/.eil.yml" - - "examples/button/**" - - label: "area:components:ccs811" - sync: true - matcher: - files: - any: - - "components/ccs811/**" - - "components/ccs811/.eil.yml" - - "examples/ccs811/**" - - label: "area:components:color" - sync: true - matcher: - files: - any: - - "components/color/**" - - "components/color/.eil.yml" - - "examples/color/**" - - label: "area:components:dht" - sync: true - matcher: - files: - any: - - "components/dht/**" - - "components/dht/.eil.yml" - - "examples/dht/**" - - label: "area:components:dps310" - sync: true - matcher: - files: - any: - - "components/dps310/**" - - "components/dps310/.eil.yml" - - "examples/dps310/**" - - label: "area:components:ds1302" - sync: true - matcher: - files: - any: - - "components/ds1302/**" - - "components/ds1302/.eil.yml" - - "examples/ds1302/**" - - label: "area:components:ds1307" - sync: true - matcher: - files: - any: - - "components/ds1307/**" - - "components/ds1307/.eil.yml" - - "examples/ds1307/**" - - label: "area:components:ds18x20" - sync: true - matcher: - files: - any: - - "components/ds18x20/**" - - "components/ds18x20/.eil.yml" - - "examples/ds18x20/**" - - label: "area:components:ds3231" - sync: true - matcher: - files: - any: - - "components/ds3231/**" - - "components/ds3231/.eil.yml" - - "examples/ds3231/**" - - label: "area:components:ds3502" - sync: true - matcher: - files: - any: - - "components/ds3502/**" - - "components/ds3502/.eil.yml" - - "examples/ds3502/**" - - label: "area:components:encoder" - sync: true - matcher: - files: - any: - - "components/encoder/**" - - "components/encoder/.eil.yml" - - "examples/encoder/**" - - label: "area:components:esp_idf_lib_helpers" - sync: true - matcher: - files: - any: - - "components/esp_idf_lib_helpers/**" - - "components/esp_idf_lib_helpers/.eil.yml" - - "examples/esp_idf_lib_helpers/**" - - label: "area:components:example" - sync: true - matcher: - files: - any: - - "components/example/**" - - "components/example/.eil.yml" - - "examples/example/**" - - label: "area:components:framebuffer" - sync: true - matcher: - files: - any: - - "components/framebuffer/**" - - "components/framebuffer/.eil.yml" - - "examples/framebuffer/**" - - label: "area:components:hd44780" - sync: true - matcher: - files: - any: - - "components/hd44780/**" - - "components/hd44780/.eil.yml" - - "examples/hd44780/**" - - label: "area:components:hdc1000" - sync: true - matcher: - files: - any: - - "components/hdc1000/**" - - "components/hdc1000/.eil.yml" - - "examples/hdc1000/**" - - label: "area:components:hmc5883l" - sync: true - matcher: - files: - any: - - "components/hmc5883l/**" - - "components/hmc5883l/.eil.yml" - - "examples/hmc5883l/**" - - label: "area:components:ht16k33" - sync: true - matcher: - files: - any: - - "components/ht16k33/**" - - "components/ht16k33/.eil.yml" - - "examples/ht16k33/**" - - label: "area:components:hts221" - sync: true - matcher: - files: - any: - - "components/hts221/**" - - "components/hts221/.eil.yml" - - "examples/hts221/**" - - label: "area:components:hx711" - sync: true - matcher: - files: - any: - - "components/hx711/**" - - "components/hx711/.eil.yml" - - "examples/hx711/**" - - label: "area:components:i2cdev" - sync: true - matcher: - files: - any: - - "components/i2cdev/**" - - "components/i2cdev/.eil.yml" - - "examples/i2cdev/**" - - label: "area:components:icm42670" - sync: true - matcher: - files: - any: - - "components/icm42670/**" - - "components/icm42670/.eil.yml" - - "examples/icm42670/**" - - label: "area:components:ina219" - sync: true - matcher: - files: - any: - - "components/ina219/**" - - "components/ina219/.eil.yml" - - "examples/ina219/**" - - label: "area:components:ina260" - sync: true - matcher: - files: - any: - - "components/ina260/**" - - "components/ina260/.eil.yml" - - "examples/ina260/**" - - label: "area:components:ina3221" - sync: true - matcher: - files: - any: - - "components/ina3221/**" - - "components/ina3221/.eil.yml" - - "examples/ina3221/**" - - label: "area:components:lc709203f" - sync: true - matcher: - files: - any: - - "components/lc709203f/**" - - "components/lc709203f/.eil.yml" - - "examples/lc709203f/**" - - label: "area:components:led_strip" - sync: true - matcher: - files: - any: - - "components/led_strip/**" - - "components/led_strip/.eil.yml" - - "examples/led_strip/**" - - label: "area:components:led_strip_spi" - sync: true - matcher: - files: - any: - - "components/led_strip_spi/**" - - "components/led_strip_spi/.eil.yml" - - "examples/led_strip_spi/**" - - label: "area:components:lib8tion" - sync: true - matcher: - files: - any: - - "components/lib8tion/**" - - "components/lib8tion/.eil.yml" - - "examples/lib8tion/**" - - label: "area:components:lm75" - sync: true - matcher: - files: - any: - - "components/lm75/**" - - "components/lm75/.eil.yml" - - "examples/lm75/**" - - label: "area:components:ls7366r" - sync: true - matcher: - files: - any: - - "components/ls7366r/**" - - "components/ls7366r/.eil.yml" - - "examples/ls7366r/**" - - label: "area:components:max31725" - sync: true - matcher: - files: - any: - - "components/max31725/**" - - "components/max31725/.eil.yml" - - "examples/max31725/**" - - label: "area:components:max31855" - sync: true - matcher: - files: - any: - - "components/max31855/**" - - "components/max31855/.eil.yml" - - "examples/max31855/**" - - label: "area:components:max31865" - sync: true - matcher: - files: - any: - - "components/max31865/**" - - "components/max31865/.eil.yml" - - "examples/max31865/**" - - label: "area:components:max7219" - sync: true - matcher: - files: - any: - - "components/max7219/**" - - "components/max7219/.eil.yml" - - "examples/max7219/**" - - label: "area:components:mcp23008" - sync: true - matcher: - files: - any: - - "components/mcp23008/**" - - "components/mcp23008/.eil.yml" - - "examples/mcp23008/**" - - label: "area:components:mcp23x17" - sync: true - matcher: - files: - any: - - "components/mcp23x17/**" - - "components/mcp23x17/.eil.yml" - - "examples/mcp23x17/**" - - label: "area:components:mcp342x" - sync: true - matcher: - files: - any: - - "components/mcp342x/**" - - "components/mcp342x/.eil.yml" - - "examples/mcp342x/**" - - label: "area:components:mcp4725" - sync: true - matcher: - files: - any: - - "components/mcp4725/**" - - "components/mcp4725/.eil.yml" - - "examples/mcp4725/**" - - label: "area:components:mcp960x" - sync: true - matcher: - files: - any: - - "components/mcp960x/**" - - "components/mcp960x/.eil.yml" - - "examples/mcp960x/**" - - label: "area:components:mcp9808" - sync: true - matcher: - files: - any: - - "components/mcp9808/**" - - "components/mcp9808/.eil.yml" - - "examples/mcp9808/**" - - label: "area:components:mhz19b" - sync: true - matcher: - files: - any: - - "components/mhz19b/**" - - "components/mhz19b/.eil.yml" - - "examples/mhz19b/**" - - label: "area:components:mpu6050" - sync: true - matcher: - files: - any: - - "components/mpu6050/**" - - "examples/mpu6050/**" - - label: "area:components:ms5611" - sync: true - matcher: - files: - any: - - "components/ms5611/**" - - "components/ms5611/.eil.yml" - - "examples/ms5611/**" - - label: "area:components:noise" - sync: true - matcher: - files: - any: - - "components/noise/**" - - "components/noise/.eil.yml" - - "examples/noise/**" - - label: "area:components:onewire" - sync: true - matcher: - files: - any: - - "components/onewire/**" - - "components/onewire/.eil.yml" - - "examples/onewire/**" - - label: "area:components:pca9557" - sync: true - matcher: - files: - any: - - "components/pca9557/**" - - "components/pca9557/.eil.yml" - - "examples/pca9557/**" - - label: "area:components:pca9685" - sync: true - matcher: - files: - any: - - "components/pca9685/**" - - "components/pca9685/.eil.yml" - - "examples/pca9685/**" - - label: "area:components:pcf8563" - sync: true - matcher: - files: - any: - - "components/pcf8563/**" - - "components/pcf8563/.eil.yml" - - "examples/pcf8563/**" - - label: "area:components:pcf8574" - sync: true - matcher: - files: - any: - - "components/pcf8574/**" - - "components/pcf8574/.eil.yml" - - "examples/pcf8574/**" - - label: "area:components:pcf8575" - sync: true - matcher: - files: - any: - - "components/pcf8575/**" - - "components/pcf8575/.eil.yml" - - "examples/pcf8575/**" - - label: "area:components:pcf8591" - sync: true - matcher: - files: - any: - - "components/pcf8591/**" - - "components/pcf8591/.eil.yml" - - "examples/pcf8591/**" - - label: "area:components:qmc5883l" - sync: true - matcher: - files: - any: - - "components/qmc5883l/**" - - "components/qmc5883l/.eil.yml" - - "examples/qmc5883l/**" - - label: "area:components:rda5807m" - sync: true - matcher: - files: - any: - - "components/rda5807m/**" - - "components/rda5807m/.eil.yml" - - "examples/rda5807m/**" - - label: "area:components:scd30" - sync: true - matcher: - files: - any: - - "components/scd30/**" - - "components/scd30/.eil.yml" - - "examples/scd30/**" - - label: "area:components:scd4x" - sync: true - matcher: - files: - any: - - "components/scd4x/**" - - "components/scd4x/.eil.yml" - - "examples/scd4x/**" - - label: "area:components:sgm58031" - sync: true - matcher: - files: - any: - - "components/sgm58031/**" - - "components/sgm58031/.eil.yml" - - "examples/sgm58031/**" - - label: "area:components:sgp40" - sync: true - matcher: - files: - any: - - "components/sgp40/**" - - "components/sgp40/.eil.yml" - - "examples/sgp40/**" - - label: "area:components:sht3x" - sync: true - matcher: - files: - any: - - "components/sht3x/**" - - "components/sht3x/.eil.yml" - - "examples/sht3x/**" - - label: "area:components:sht4x" - sync: true - matcher: - files: - any: - - "components/sht4x/**" - - "components/sht4x/.eil.yml" - - "examples/sht4x/**" - - label: "area:components:si7021" - sync: true - matcher: - files: - any: - - "components/si7021/**" - - "components/si7021/.eil.yml" - - "examples/si7021/**" - - label: "area:components:sts21" - sync: true - matcher: - files: - any: - - "components/sts21/**" - - "components/sts21/.eil.yml" - - "examples/sts21/**" - - label: "area:components:tca9548" - sync: true - matcher: - files: - any: - - "components/tca9548/**" - - "components/tca9548/.eil.yml" - - "examples/tca9548/**" - - label: "area:components:tca95x5" - sync: true - matcher: - files: - any: - - "components/tca95x5/**" - - "components/tca95x5/.eil.yml" - - "examples/tca95x5/**" - - label: "area:components:tda74xx" - sync: true - matcher: - files: - any: - - "components/tda74xx/**" - - "components/tda74xx/.eil.yml" - - "examples/tda74xx/**" - - label: "area:components:tsl2561" - sync: true - matcher: - files: - any: - - "components/tsl2561/**" - - "components/tsl2561/.eil.yml" - - "examples/tsl2561/**" - - label: "area:components:tsl2591" - sync: true - matcher: - files: - any: - - "components/tsl2591/**" - - "components/tsl2591/.eil.yml" - - "examples/tsl2591/**" - - label: "area:components:tsl4531" - sync: true - matcher: - files: - any: - - "components/tsl4531/**" - - "components/tsl4531/.eil.yml" - - "examples/tsl4531/**" - - label: "area:components:tsys01" - sync: true - matcher: - files: - any: - - "components/tsys01/**" - - "components/tsys01/.eil.yml" - - "examples/tsys01/**" - - label: "area:components:ultrasonic" - sync: true - matcher: - files: - any: - - "components/ultrasonic/**" - - "components/ultrasonic/.eil.yml" - - "examples/ultrasonic/**" - - label: "area:components:wiegand" - sync: true - matcher: - files: - any: - - "components/wiegand/**" - - "components/wiegand/.eil.yml" - - "examples/wiegand/**" - - label: "area:components:ads130e08" - sync: true - matcher: - files: - any: - - "components/ads130e08/**" - - "components/ads130e08/.eil.yml" - - "examples/ads130e08/**" - - label: "area:components:veml7700" - sync: true - matcher: - files: - any: - - "components/veml7700/**" - - "components/veml7700/.eil.yml" - - "examples/veml7700/**" - - label: "area:components:am2320" - sync: true - matcher: - files: - any: - - "components/am2320/**" - - "components/am2320/.eil.yml" - - "examples/am2320/**" - - label: "area:components:sts3x" - sync: true - matcher: - files: - any: - - "components/sts3x/**" - - "components/sts3x/.eil.yml" - - "examples/sts3x/**" - - label: "area:components:max1704x" - sync: true - matcher: - files: - any: - - "components/max1704x/**" - - "components/max1704x/.eil.yml" - - "examples/max1704x/**" diff --git a/.github/workflows/README.md b/.github/workflows/README.md deleted file mode 100644 index c05c24b0..00000000 --- a/.github/workflows/README.md +++ /dev/null @@ -1,238 +0,0 @@ -# Workflows - -This document describes how GitHub Actions workflows work in the repository. - - - -* [Overview](#overview) -* [Labeler workflow](#labeler-workflow) - * [Labels used by the CI](#labels-used-by-the-ci) - * [The triggering labeler workflow and Personal Access Token](#the-triggering-labeler-workflow-and-personal-access-token) - * [Creating a Personal Access Token](#creating-a-personal-access-token) - * [Using a Personal Access Token](#using-a-personal-access-token) - * [Security considerations](#security-considerations) -* [Action workflow](#action-workflow) - * [Security considerations](#security-considerations-1) - - - -## Overview - -The workflows consist of _action_ and _labeler_ workflows. - -An action workflow is a typical workflow that builds sources, runs lint -programs, or performs other CI tests. Other actions include "Add a comment to -PR", or "Mention code owners when their code is modified by the PR", or -"Create a draft release notes". - -Action workflows are triggered by labels added or removed to PRs. This is -achieved by a job in the action workflows that tests if the PR has a specific -label. - -The responsibility of an action workflow is to take actions. An action -workflow should not decide when to perform actions, which is a responsibility -of labeler workflows. - -A labeler action manages which action workflow to invoke. `labeler*.yml` add -or remove labels to/from the PR. These workflows control action workflows -that perform actions. For instance, [labeler.yml](labeler.yml) and its -configuration file, [labeler.yml](../labeler.yml), add labels to -the PR by modified files. The labels are used by action workflows, and if the -label is the one defined in the action workflow, the action workflow runs. - -The responsibility of a labeler action is to add or remove labels, or when to -invoke action workflow. A labeler action should not take actions, such as -build sources. - -## Labeler workflow - -labeler workflow is the logic for action workflows. By removing logics (when -a workflow should run) from the workflow, it is easier to see why a workflow -runs or not. - -In a labeler workflow, add or remove labels by using -[actions/github-script](https://github.com/actions/github-script), which -enable to use JavaScript code and GitHub REST APIs. It is possible to use -shell instead, but not very practical. - -### Labels used by the CI - -| Label | Description | -|-------------------|--------------------------------------| -| `area:components` | Code under `components` is modified. | -| `area:components:${NAME}` | Code of a specific component is modified. `${NAME}` is the name of the component. | -| `area:ci` | The CI is modified. | - -### The triggering labeler workflow and Personal Access Token - -Events triggered by a workflow do not run another workflow. -[Triggering a workflow from a workflow](https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow) -says: - -> When you use the repository's GITHUB_TOKEN to perform tasks, events -> triggered by the GITHUB_TOKEN will not create a new workflow run. This -> prevents you from accidentally creating recursive workflow runs. - -That means `pull_request` event with type `labeled` will not be fired when a -workflow labels a PR (but it will be if you manually label a PR). - -To trigger other workflows from a labeler, the labeler workflow needs a -Personal Access Token, or a PAT, instead of `GITHUB_TOKEN`. - -> If you do want to trigger a workflow from within a workflow run, you can use -> a personal access token instead of GITHUB_TOKEN to trigger events that -> require a token. - -### Creating a Personal Access Token - -To create a PAT, visit [Settings](https://github.com/settings/profile) in your -profile, and `Developer settings` > `Personal access token`. Click `Generate -new token`. - -Choose `Expiration`. If you choose an expiration date for the token, the token -will expire after GitHub send a notification that reminds you of the -expiration. Obviously, you need to create a new token after the expiration -date. If you choose `No expiration`, the token will not expire, but GitHub -does not recommend it. - -Choose `public_repo` scope for the access token. - -Click `Generate token`. - -See -[Creating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) -for details. - -### Using a Personal Access Token - -To use the generated PAT, it must be passed to workflows by a repository -secret. That way, the token is available `${{ secrets.* }}` in workflows -without hard-coding it in public code. - -After creating a PAT, create a repository secret. The name should be -`LABELER_TOKEN` (this is the key of repository secrets used in labeler -workflows), and the value should be the token. See -[Managing encrypted secrets for your repository and organization for Codespaces](https://docs.github.com/en/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces) -for details. - -```yaml -jobs: - labeler: - name: Labeler - runs-on: ubuntu-latest - steps: - - uses: fuxingloh/multi-labeler@v2 - with: - github-token: ${{secrets.LABELER_TOKEN}} - config-path: .github/labeler.yml -``` - -Note that if the labeler merely labels PRs just for human-being, not to run -another workflow, the labeler does not need a PAT. Use `GITHUB_TOKEN` in that -case. - -```yaml -jobs: - labeler: - name: Labeler - runs-on: ubuntu-latest - steps: - - uses: fuxingloh/multi-labeler@v2 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - config-path: .github/labeler.yml -``` - -### Security considerations - -Labeler workflow needs write access to the repository because they modifies -PRs by adding or removing labels. This means labeler workflows have to run in -the privileged context. In that context, the workflow has full access to the -repository and the security token. - -On the other hand, PRs are opened by repository members and (possibly -untrusted) third-party members. This means a labeler workflow is run by a -third-party with privileged access to the repository. For this reason, a -labeler workflow should add or remove label only. - -A labeler workflow must use `pull_request_target` event as a trigger. - -```yaml ---- -name: Label PR -on: - pull_request_target: -``` -See -[pull_request_target](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target) -in the official documentation for details. - -## Action workflow - -Action workflow is, typically, a workflow that performs tests, such as -linting, or building sources. Other actions include "Writing a comment in the -PR". - -In an action workflow, see if the PR has a specific label first, and if the PR -has the label, run the actions. Otherwise, skip. - -Note that the action should run not only when an label is added (`labeled`), -but also when the PR is updated (`synchronize`). Typically, you need the -following `on` condition in the workflow: - -```yaml ---- -name: Build examples -on: - pull_request: - branches: - - main - types: - - labeled - - synchronize -``` - -If an action workflow needs to add a label depending on the outcome of the -test, use [labeler-by-workflow-status.yml](labeler-by-workflow-status.yml) -because, in the `pull_request` context, it is not possible. - -See an example at: [FIXME] - -### Security considerations - -Most of action workflow do not need privileged access to the repository. -Typically, an action workflow should run in unprivileged context. That means -most of action workflows should use `pull_request` event as a trigger. - -```yaml -name: An example action workflow -on: - pull_request: - branches: - - master -``` - -In the unprivileged context, the action workflow does not have write access to -the repository. The action workflow may build untrusted code (i.e. the code -from forks). The action workflow cannot modify the repository (i.e. adding -comment or labels). - -Action workflow might need write access to the repository if the action to take -is an action that modifies the repository, such as adding a comment to PRs. -When this is the case, the action workflow should use `pull_request_target` -event. - -```yaml -name: An example action workflow with privileged access -on: - pull_request_target: -``` - -In this context, some extra privileges are granted. The `pull_request_target` -is designed for adding labels to PRs, or writing comments to PRs. The action -workflow must not build sources, or run untrusted code (i.e. the code from -forks). - -See -[pull_request_target](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target) -in the official documentation for details. diff --git a/.github/workflows/action-check-components-and-examples.yml b/.github/workflows/action-check-components-and-examples.yml deleted file mode 100644 index 143c4175..00000000 --- a/.github/workflows/action-check-components-and-examples.yml +++ /dev/null @@ -1,83 +0,0 @@ ---- -# A workflow to test all the components have one or more of examples. -name: Check components and examples -on: - pull_request: - types: - - labeled - - synchronize - -jobs: - pre_build: - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.result }} - steps: - - id: skip_check - uses: actions/github-script@v6 - with: - result-encoding: string - script: | - console.log("context"); - console.log(JSON.stringify(context, null, 2)); - let should_skip = false; - - switch(context.payload.action) { - case "labeled": - if (context.payload.label.name != "area:components") { - should_skip = true; - } - if (context.payload.label.name == "area:ci") { - should_skip = false; - } - break; - case "synchronize": - let labels = context.payload.pull_request.labels.map(label => { return label.name }); - if (!labels.includes("area:components")) { - should_skip = true; - } - if (labels.includes("area:ci")) { - should_skip = false; - } - break; - } - return should_skip; - - check_components_and_examples: - runs-on: ubuntu-latest - needs: pre_build - if: ${{ needs.pre_build.outputs.should_skip != 'true' }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Check components and examples - run: | - all_components=`ls -1 components` - exit_status=0 - - for component in ${all_components}; do - echo "Checking component \"${component}\"" - echo -n "it has examples/${component} directory: " - if [ -d "examples/${component}" ]; then - echo "yes" - else - echo "no" - echo "the example directory for ${component} does not exist. create examples/${component} directory, and create an example for ${component} under examples/${component}/default." - exit_status=1 - fi - echo -n "it has the default example directory: " - - # allow both directory and symlink - if [ -d "examples/${component}/default" ] || [ -L "examples/${component}/default" ]; then - echo "yes" - else - echo "no" - echo "the default example directory for ${component} does not exist. create examples/${component}/default directory, and create an example in that directory" - exit_status=1 - fi - done - if [ $exit_status -eq 1 ]; then - echo "Some tests failed. See the above log for details" - fi - exit ${exit_status} diff --git a/.github/workflows/action-check-components-label.yml b/.github/workflows/action-check-components-label.yml deleted file mode 100644 index 739a8ee4..00000000 --- a/.github/workflows/action-check-components-label.yml +++ /dev/null @@ -1,110 +0,0 @@ ---- -# A workflow to test all the components have a label for components, such as -# `area:components:foo` -name: Check components label -on: - pull_request: - types: - - labeled - - synchronize - -jobs: - pre_build: - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.result }} - steps: - - id: skip_check - uses: actions/github-script@v6 - with: - result-encoding: string - script: | - console.log("context"); - console.log(JSON.stringify(context, null, 2)); - let should_skip = false; - - switch(context.payload.action) { - case "labeled": - if (context.payload.label.name != "area:components") { - should_skip = true; - } - if (context.payload.label.name == "area:ci") { - should_skip = false; - } - break; - case "synchronize": - let labels = context.payload.pull_request.labels.map(label => { return label.name }); - if (!labels.includes("area:components")) { - should_skip = true; - } - if (labels.includes("area:ci")) { - should_skip = false; - } - break; - } - return should_skip; - check_labels: - runs-on: ubuntu-latest - needs: pre_build - if: ${{ needs.pre_build.outputs.should_skip != 'true' }} - outputs: - should_skip: ${{ steps.skip_check.outputs.result }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install yq to parse YAML files - run: | - YQ_VERSION=v4.25.3 - YQ_BINARY=yq_linux_amd64 - YQ_COMMAND="/usr/bin/yq" - wget "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_BINARY}" -O ./yq - sudo mv ./yq "${YQ_COMMAND}" - sudo chmod +x "${YQ_COMMAND}" - "${YQ_COMMAND}" --version - - - name: Check all components have a label for components - run: | - COMPONENTS_DIR="components" - echo "COMPONENTS_DIR: $COMPONENTS_DIR" - YAML_FILE=".github/labeler.yml" - echo "YAML_FILE: ${YAML_FILE}" - ALL_COMPONENTS=`ls -1 "${COMPONENTS_DIR}"` - echo "ALL_COMPONENTS:" - echo "${ALL_COMPONENTS}" - COMPONENTS_LABELS=`yq '.labels[] | select (.label == "area:components:*") | .label' "${YAML_FILE}"` - echo "COMPONENTS_LABELS:" - echo "${COMPONENTS_LABELS}" - EXIT_STATUS=0 - MISSING_COMPONENTS="" - for COMPONENT in ${ALL_COMPONENTS}; do - echo "Check if \"${COMPONENT}\" has its own label, \"area:components:${COMPONENT}\", in \"${YAML_FILE}\"" - FOUND=0 - for COMPONENTS_LABEL in ${COMPONENTS_LABELS}; do - if [ "area:components:${COMPONENT}" = "${COMPONENTS_LABEL}" ]; then - FOUND=1 - fi - done - if [ ${FOUND} -eq 1 ]; then - echo "Found \"${COMPONENT}\" in COMPONENTS_LABELS" - else - echo "\"${COMPONENT}\" could not be found in COMPONENTS_LABELS" - EXIT_STATUS=1 - MISSING_COMPONENTS="${MISSING_COMPONENTS} ${COMPONENT}" - fi - done - if [ ${EXIT_STATUS} -eq 1 ]; then - echo "Some components could not be found in COMPONENTS_LABELS" - echo "MISSING_COMPONENTS: \"${MISSING_COMPONENTS}\"" - echo "Add the following to \"${YAML_FILE}\"" - for NAME in ${MISSING_COMPONENTS}; do - echo " - label: \"area:components:${NAME}\"" - echo " sync: true" - echo " matcher:" - echo " files:" - echo " any:" - echo " - \"components/${NAME}/**\"" - echo " - \"examples/${NAME}/**\"" - done - fi - exit "${EXIT_STATUS}" diff --git a/.github/workflows/actions-on-pr-by-label.yml b/.github/workflows/actions-on-pr-by-label.yml deleted file mode 100644 index 89acaf91..00000000 --- a/.github/workflows/actions-on-pr-by-label.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: Actions on PR by label -on: - pull_request_target: - types: - - labeled - -# by default, do not allow write access as pull_request_target has more write -# access than pull_request. assign necessary permissions as required in jobs. -permissions: read-all - -jobs: - on-labeled-ci-failure: - # when a workflow fails, the PR is labeled with - # `ci/${WORKFLOW_NAME}/failure`. - if: ${{ startsWith(github.event.label.name, 'ci/') && endsWith(github.event.label.name, '/failure') }} - runs-on: ubuntu-latest - # this job needs write access to PRs because it modifies the PR by - # creating a comment. - permissions: - pull-requests: write - steps: - - name: Dump context for debugging - uses: actions/github-script@v6 - with: - script: | - console.log(JSON.stringify(context, null, 2)) - - - name: ci/Metadata/failure - if: ${{ github.event.label.name == 'ci/Metadata/failure' }} - uses: actions/github-script@v6 - with: - script: | - const util = require("util"); - try { - await github.rest.issues.createComment({ - issue_number: context.payload.pull_request.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: util.format( - "@%s CI `Metadata` failed. Did you update README.md? Please run:\n" + - "\n" + - "```console\n" + - "bundle exec rake -C devtools readme > README.md\n" + - "```\n" + - "\n" + - "at the repository root directory and commit the changes.\n" + - "See also [Updating README](https://github.com/UncleRus/esp-idf-lib/blob/master/CONTRIBUTING.md#updating-readmemd)" + - "section in CONTRIBUTING.md. Thank you.", - context.payload.pull_request.user.login) - }); - } catch(e) { - core.error(e); - core.setFailed(e.message); - } diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index e55c901c..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,1427 +0,0 @@ ---- -name: Build examples -on: - pull_request: - types: - - labeled - - synchronize - -jobs: - pre_build: - - # A job to see if the entrire jobs should be skipped. each job for a - # target should have: - # - # needs: pre_build - # if: ${{ needs.pre_build.outputs.should_skip != 'true' }} - # - # Another output, component_labels, includes all the component labels of - # the PR, e.g. "area:components:foo,area:components:bar". - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.result }} - component_labels: ${{ steps.get_component_labels.outputs.result }} - components_to_build: ${{ steps.select_components_to_build.outputs.components_to_build }} - steps: - - id: skip_check - uses: actions/github-script@v6 - with: - result-encoding: string - script: | - console.log("context"); - console.log(JSON.stringify(context, null, 2)); - let should_skip = false; - - switch(context.payload.action) { - case "labeled": - console.log("context.payload.label.name"); - console.log(JSON.stringify(context.payload.label.name)); - console.log("skip if the added label is not area:components nor area:components:*"); - // " - if (context.payload.label.name != "area:components" && !context.payload.label.name.startsWith("area:components:")) { - // " - should_skip = true; - } - - console.log("but if it is area:ci label, don't skip because changes to the CI affect everything."); - if (context.payload.label.name == "area:ci") { - should_skip = false; - } - break; - case "synchronize": - let labels = context.payload.pull_request.labels.map(label => { return label.name }); - console.log("labels"); - console.log(JSON.stringify(labels)); - - console.log("skip if labels does not include area:components"); - if (!labels.includes("area:components")) { - console.log("area:components found in the labels"); - should_skip = true; - } - - console.log("but if labels include area:components:, do not skip"); - for (let i = 0; i < labels.length; i++) { - if (labels[i].startsWith("area:components:")) { // " - console.log("they does, do not skip"); - should_skip = false; - } - } - - console.log("but if labels include area:ci label, don't skip because changes to the CI affect everything."); - if (labels.includes("area:ci")) { - console.log("they does, do not skip"); - should_skip = false; - } - break; - } - return should_skip; - - - name: See if the PR has area:ci label - id: has_area_ci_label - uses: actions/github-script@v6 - with: - result-encoding: string - script: | - let result = false; - try { - pr = await github.rest.issues.get({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.number, - }); - console.log("pr"); - console.log(JSON.stringify(pr, null, 2)); - for (i = 0; i < pr.data.labels.length; i++) { - if (pr.data.labels[i].name == "area:ci") { - result = true; - } - } - - } catch(e) { - core.error(e); - core.setFailed(e.message); - } - return result; - - - name: Get all area:components:* lables - # this step returns a list of labels that start with "area:components:". - # the output includes comma-separated list of labels, such as "area: - # components:foo,area:components:bar". - id: get_component_labels - uses: actions/github-script@v6 - with: - result-encoding: string - script: | - console.log("context"); - console.log(JSON.stringify(context, null, 2)); - let i = 0; - let component_labels = []; - - switch(context.payload.action) { - case "labeled": - try { - pr = await github.rest.issues.get({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.number, - }); - console.log("pr"); - console.log(JSON.stringify(pr, null, 2)); - - for (i = 0; i < pr.data.labels.length; i++) { - if (pr.data.labels[i].name.startsWith("area:components:")) { - // " vim syntax cannot parse above line, breaking syntax highlight - component_labels.push(pr.data.labels[i].name); - } - } - } catch(e) { - core.error(e); - core.setFailed(e.message); - } - break; - // append all labels that start with "area:components:" - case "synchronize": - let labels = context.payload.pull_request.labels.map(label => { return label.name }); - for (i = 0; i < labels.length; i++) { - if (labels[i].startsWith("area:components:")) { - // " - component_labels.push(labels[i]); - } - } - break; - } - return component_labels; - - - name: Checkout - uses: actions/checkout@v3 - - - name: Select components to build - # this step returns a list of components to build - id: select_components_to_build - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - run: | - component_labels=`echo ${{ steps.get_component_labels.outputs.result }} | sed -e 's/,/ /g'` - echo "The PR has the following component labels:" - for component_label in ${component_labels}; do - echo "${component_label}" - done - all_components=`ls -1 components` - echo "The repository has the following components:" - for component in ${all_components}; do - echo "${component}" - done - components_to_build="" - for component_label in ${component_labels}; do - component_name=`echo ${component_label} | cut -f 3 -d':'` - components_to_build="${components_to_build} ${component_name}" - echo "components to build by labels" - echo "${components_to_build}" - done - - echo "Get a list of components by REQUIRES" - extra_components_to_build_by_require="" - - # scan all component directories and if a component requires - # one of components_to_build, add it to extra_components_to_build_by_require - for component in ${components_to_build}; do - for c in ${all_components}; do - # the output is: - # REQUIRES:log;color - required=`cmake -DCOMPONENT_NAME:STRING=${c} devtools/cmake-get-requires 2>&1 >/dev/null | grep 'REQUIRES:' | cut -f2 -d':' | sed -e 's/;/ /g'` - echo "component ${c} requires ${required}" - for r in ${required}; do - if echo "${all_components}" | grep -q "${r}"; then - echo "component ${r} is in all_components" - if [ "${r}" = "${component}" ]; then - echo "component ${c} requires ${component}, adding to extra_components_to_build_by_require" - extra_components_to_build_by_require="${extra_components_to_build_by_require} ${c}" - else - echo "component ${c} does not require ${component}, ignoring" - fi - else - echo "component ${r} is not in all_components, ignoring" - fi - done - done - done - # remove duplicated name from extra_components_to_build_by_require - extra_components_to_build_by_require=`echo "${extra_components_to_build_by_require}" | tr ' ' '\n' | sort -u | tr '\n' ' '` - - echo "The list of components to build by REQUIRES:" - echo "${extra_components_to_build_by_require}" - - # and merge everything - components_to_build="${components_to_build} ${extra_components_to_build_by_require}" - echo "components to build:" - echo "${components_to_build}" - - # if component_labels has "area:ci" build all components - if [ ${{ steps.has_area_ci_label.outputs.result }} == "true" ]; then - echo "the PR has area:ci label, going to build all components" - components_to_build="${all_components}" - fi - echo "The components to build:" - components_to_build=`echo ${components_to_build} | tr "\n" " "` - echo ${components_to_build} - echo "components_to_build=${components_to_build}" > ${GITHUB_OUTPUT} - - # XXX create multiple jobs for major versions - # - # for those who want to _refactor_ the jobs: - # - # in the previous CI implementation, all builds share a single build - # process. that way, you can remove duplications. however, every time a - # version changes the build process, the change affects all other build - # processes. I am tired of tracking changes and workarounds in the build - # process. the result is many `if`s. assuming major version does not change - # (a lot) its build process, creating multiple jobs, and using matrix is the - # only sane way. as GitHub Actions does not support reusable steps, there - # are many duplications. but no need to modify the entire build process to - # adopt changes in master. - build_esp32_master: - needs: pre_build - if: ${{ needs.pre_build.outputs.should_skip != 'true' }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - target: - - esp32 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Install dependencies - run: | - sudo apt-get install \ - bison \ - ccache \ - flex \ - gcc \ - git \ - gperf \ - libffi-dev \ - libncurses-dev \ - libssl-dev \ - make \ - wget - - - name: Set environment variables - id: set_env - run: | - REPO_DIR=`pwd` - EXAMPLE_DIR="${REPO_DIR}/examples" - __PROJECT_PATH=`pwd` - - # XXX actions/checkout does not allow to checkout a repository other - # than under __PROJECT_PATH - IDF_PATH="${__PROJECT_PATH}/idf" - - echo "IDF_PATH=${IDF_PATH}" >> ${GITHUB_ENV} - echo "IDF_TARGET=${{ matrix.target }}" >> ${GITHUB_ENV} - - # XXX prefix all the environment variables with `__PROJECT_` to avoid pollution - echo "__PROJECT_EXAMPLE_DIR=${EXAMPLE_DIR}" >> ${GITHUB_ENV} - - - name: Checkout the SDK - uses: actions/checkout@v3 - with: - repository: espressif/esp-idf - path: idf - submodules: recursive - ref: master - - - name: Run idf_tools.py install - run: | - ${IDF_PATH}/tools/idf_tools.py install - - - name: Run idf_tools.py install-python-env - run: | - ${IDF_PATH}/tools/idf_tools.py install-python-env - - - name: Build (idf.py) - run: | - components_to_build="${{ needs.pre_build.outputs.components_to_build }}" - - echo "The component whose examples need to be built:" - echo "${components_to_build}" - - # find out drivers that do not support the target - EXCLUDE_COMPONENTS="" - ALL_COMPONENTS=`ls -1 components` - for C in ${ALL_COMPONENTS}; do - echo "see if component ${C} supports the target ${IDF_TARGET}" - if [ ! -f "components/${C}/.eil.yml" ]; then - echo "metadata file for component ${C}, components/${C}/.eil.yml, does not exist" - exit 1 - fi - if yq '.components[].targets[].name' "components/${C}/.eil.yml" | grep -q ${IDF_TARGET}; then - echo "component ${C} supports ${IDF_TARGET}" - else - echo "component ${C} does not support ${IDF_TARGET}. adding it to EXCLUDE_COMPONENTS" - EXCLUDE_COMPONENTS="${EXCLUDE_COMPONENTS} ${C}" - fi - done - echo "EXCLUDE_COMPONENTS=${EXCLUDE_COMPONENTS}" - export EXCLUDE_COMPONENTS - - # remove components in EXCLUDE_COMPONENTS from components_to_build - for ec in ${EXCLUDE_COMPONENTS}; do - components_to_build=`echo ${components_to_build} | tr ' ' '\n' | grep -v ${ec} | tr '\n' ' '` - done - - . ${IDF_PATH}/export.sh - - # XXX share cache between examples. - # see "Compiling In Different Directories" in ccache(1) - # | | 4.0.1 | master | - # |----------------------------------------|---------|---------| - # | without ccache | 33m 42s | 50m 27s | - # | CCACHE_BASEDIR and CCACHE_NOHASHDIR | 10m 41s | 16m 38s | - export CCACHE_BASEDIR="${__PROJECT_EXAMPLE_DIR}" - export CCACHE_NOHASHDIR=true - - echo "final components_to_build:" - echo "${components_to_build}" - for component_to_build in ${components_to_build}; do - cd ${GITHUB_WORKSPACE} - echo "Building examples for ${component_to_build} under directory ${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - for i in $(ls -d *); do - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}/${i}" - echo "Building example ${i} for component ${component_to_build} in directory ${PWD}..." - idf.py --ccache build - done - done - - build_esp32_v5_x: - needs: pre_build - if: ${{ needs.pre_build.outputs.should_skip != 'true' }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - target: - - esp32 - - esp32s2 - - esp32s3 - - esp32c2 - - esp32c3 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Install dependencies - run: | - sudo apt-get install \ - bison \ - ccache \ - flex \ - gcc \ - git \ - gperf \ - libffi-dev \ - libncurses-dev \ - libssl-dev \ - make \ - wget - - - name: Set environment variables - id: set_env - run: | - REPO_DIR=`pwd` - EXAMPLE_DIR="${REPO_DIR}/examples" - __PROJECT_PATH=`pwd` - - # XXX actions/checkout does not allow to checkout a repository other - # than under __PROJECT_PATH - IDF_PATH="${__PROJECT_PATH}/idf" - - echo "IDF_PATH=${IDF_PATH}" >> ${GITHUB_ENV} - echo "IDF_TARGET=${{ matrix.target }}" >> ${GITHUB_ENV} - - # XXX prefix all the environment variables with `__PROJECT_` to avoid pollution - echo "__PROJECT_EXAMPLE_DIR=${EXAMPLE_DIR}" >> ${GITHUB_ENV} - - - name: Checkout the SDK - uses: actions/checkout@v3 - with: - repository: espressif/esp-idf - path: idf - submodules: recursive - ref: v5.0-rc1 - - - name: Run idf_tools.py install - run: | - ${IDF_PATH}/tools/idf_tools.py install - - - name: Run idf_tools.py install-python-env - run: | - ${IDF_PATH}/tools/idf_tools.py install-python-env - - - name: Build (idf.py) - run: | - components_to_build="${{ needs.pre_build.outputs.components_to_build }}" - - echo "The component whose examples need to be built:" - echo "${components_to_build}" - - # find out drivers that do not support the target - EXCLUDE_COMPONENTS="" - ALL_COMPONENTS=`ls -1 components` - for C in ${ALL_COMPONENTS}; do - echo "see if component ${C} supports the target ${IDF_TARGET}" - if [ ! -f "components/${C}/.eil.yml" ]; then - echo "metadata file for component ${C}, components/${C}/.eil.yml, does not exist" - exit 1 - fi - if yq '.components[].targets[].name' "components/${C}/.eil.yml" | grep -q ${IDF_TARGET}; then - echo "component ${C} supports ${IDF_TARGET}" - else - echo "component ${C} does not support ${IDF_TARGET}. adding it to EXCLUDE_COMPONENTS" - EXCLUDE_COMPONENTS="${EXCLUDE_COMPONENTS} ${C}" - fi - done - echo "EXCLUDE_COMPONENTS=${EXCLUDE_COMPONENTS}" - export EXCLUDE_COMPONENTS - - # remove components in EXCLUDE_COMPONENTS from components_to_build - for ec in ${EXCLUDE_COMPONENTS}; do - components_to_build=`echo ${components_to_build} | tr ' ' '\n' | grep -v ${ec} | tr '\n' ' '` - done - - . ${IDF_PATH}/export.sh - - # XXX share cache between examples. - # see "Compiling In Different Directories" in ccache(1) - export CCACHE_BASEDIR="${__PROJECT_EXAMPLE_DIR}" - export CCACHE_NOHASHDIR=true - - echo "final components_to_build:" - echo "${components_to_build}" - for component_to_build in ${components_to_build}; do - cd ${GITHUB_WORKSPACE} - echo "Building examples for ${component_to_build} under directory ${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - for i in $(ls -d *); do - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}/${i}" - echo "Building example ${i} for component ${component_to_build} in directory ${PWD}..." - idf.py --ccache build - done - done - - build_esp32_v4_x: - needs: pre_build - if: ${{ needs.pre_build.outputs.should_skip != 'true' }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - build_method: - - idf - - make - branch: - - # for supported versions by espressif, see: - # https://docs.espressif.com/projects/esp-idf/en/latest/esp32/versions.html - - v4.1.3 - #- v4.2.3 - - v4.3.4 - - v4.4.2 - target: - - esp32 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Install dependencies - run: | - sudo apt-get install \ - bison \ - ccache \ - flex \ - gcc \ - git \ - gperf \ - libffi-dev \ - libncurses-dev \ - libssl-dev \ - make \ - wget - - - name: Set environment variables - id: set_env - run: | - SDK_NAME="esp-idf" - GCC_PREFIX="xtensa-${{ matrix.target }}-elf" - GCC_FILE="${GCC_PREFIX}-gcc" - TOOLCHAIN_DIR="${HOME}/.espressif/tools" - case "${{ matrix.branch }}" in - v4.0.*) - TOOLCHAIN_VERSION="esp-2020r3-8.4.0" - ;; - v4.1.*) - TOOLCHAIN_VERSION="esp-2020r3-8.4.0" - ;; - v4.2.*) - TOOLCHAIN_VERSION="esp-2020r3-8.4.0" - ;; - v4.3.*) - TOOLCHAIN_VERSION="esp-2021r2-patch3-8.4.0" - ;; - v4.4.*) - TOOLCHAIN_VERSION="esp-2021r2-patch3-8.4.0" - ;; - *) - echo "Unknown matrix.branch: ${{ matrix.branch }}" - exit 1 - ;; - esac - REPO_DIR=`pwd` - EXAMPLE_DIR="${REPO_DIR}/examples" - DISTFILE_DIR="${HOME}/distfiles" - __PROJECT_PATH=`pwd` - - # XXX actions/checkout does not allow to checkout a repository other - # than under __PROJECT_PATH - IDF_PATH="${__PROJECT_PATH}/idf" - - echo "IDF_PATH=${IDF_PATH}" >> ${GITHUB_ENV} - echo "IDF_TARGET=${{ matrix.target }}" >> ${GITHUB_ENV} - - # cache-idf-tools needs __PROJECT_TOOLCHAIN_DIR - echo "PROJECT_TOOLCHAIN_DIR=${TOOLCHAIN_DIR}" >> $GITHUB_OUTPUT - - # XXX prefix all the environment variables with `__PROJECT_` to avoid pollution - echo "__PROJECT_EXAMPLE_DIR=${EXAMPLE_DIR}" >> ${GITHUB_ENV} - echo "__PROJECT_GCC_FILE=${GCC_FILE}" >> ${GITHUB_ENV} - echo "__PROJECT_GCC_PREFIX=${GCC_PREFIX}" >> ${GITHUB_ENV} - echo "__PROJECT_SDK_NAME=${SDK_NAME}" >> ${GITHUB_ENV} - echo "__PROJECT_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}" >> ${GITHUB_ENV} - echo "__PROJECT_TOOLCHAIN_DIR=${TOOLCHAIN_DIR}" >> ${GITHUB_ENV} - echo "__PROJECT_TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION}" >> ${GITHUB_ENV} - echo "__PROJECT_DISTFILE_DIR=${DISTFILE_DIR}" >> ${GITHUB_ENV} - echo "__PROJECT_PATH=${__PROJECT_PATH}" >> ${GITHUB_ENV} - echo "__PROJECT_BUILD_COMMAND=${__PROJECT_BUILD_COMMAND}" >> ${GITHUB_ENV} - echo "__PROJECT_BUILD_COMMAND_ARG=${__PROJECT_BUILD_COMMAND_ARG}" >> ${GITHUB_ENV} - - - name: Checkout the SDK - uses: actions/checkout@v3 - with: - repository: espressif/esp-idf - path: idf - submodules: recursive - ref: ${{ matrix.branch }} - - - name: Cache esp-idf tools - - # cache esp-idf tools. each tagged branch has fixed versions of tools. - # the versions do not change. the master is an exception as it is a - # moving target. do NOT cache tools if the branch is master. - uses: actions/cache@v3 - id: cache-tools - with: - path: ${{ steps.set_env.outputs.PROJECT_TOOLCHAIN_DIR }} - key: ${{ runner.os }}-${{ matrix.branch }}-${{ matrix.target }}-cache-tools - - - name: Run idf_tools.py install - if: ${{ steps.cache-tools.outputs.cache-hit != 'true' }} - run: | - ${IDF_PATH}/tools/idf_tools.py install - - - name: Run idf_tools.py install-python-env - run: | - ${IDF_PATH}/tools/idf_tools.py install-python-env - - - name: Build (idf.py) - if: ${{ matrix.build_method == 'idf' }} - run: | - components_to_build="${{ needs.pre_build.outputs.components_to_build }}" - - echo "The component whose examples need to be built:" - echo "${components_to_build}" - - # find out drivers that do not support the target - EXCLUDE_COMPONENTS="" - ALL_COMPONENTS=`ls -1 components` - for C in ${ALL_COMPONENTS}; do - echo "see if component ${C} supports the target ${IDF_TARGET}" - if [ ! -f "components/${C}/.eil.yml" ]; then - echo "metadata file for component ${C}, components/${C}/.eil.yml, does not exist" - exit 1 - fi - if yq '.components[].targets[].name' "components/${C}/.eil.yml" | grep -q ${IDF_TARGET}; then - echo "component ${C} supports ${IDF_TARGET}" - else - echo "component ${C} does not support ${IDF_TARGET}. adding it to EXCLUDE_COMPONENTS" - EXCLUDE_COMPONENTS="${EXCLUDE_COMPONENTS} ${C}" - fi - done - echo "EXCLUDE_COMPONENTS=${EXCLUDE_COMPONENTS}" - export EXCLUDE_COMPONENTS - - # remove components in EXCLUDE_COMPONENTS from components_to_build - for ec in ${EXCLUDE_COMPONENTS}; do - components_to_build=`echo ${components_to_build} | tr ' ' '\n' | grep -v ${ec} | tr '\n' ' '` - done - - . ${IDF_PATH}/export.sh - - # XXX share cache between examples. - # see "Compiling In Different Directories" in ccache(1) - # | | 4.0.1 | master | - # |----------------------------------------|---------|---------| - # | without ccache | 33m 42s | 50m 27s | - # | CCACHE_BASEDIR and CCACHE_NOHASHDIR | 10m 41s | 16m 38s | - export CCACHE_BASEDIR="${__PROJECT_EXAMPLE_DIR}" - export CCACHE_NOHASHDIR=true - - echo "final components_to_build:" - echo "${components_to_build}" - for component_to_build in ${components_to_build}; do - cd ${GITHUB_WORKSPACE} - echo "Building examples for ${component_to_build} under directory ${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - for i in $(ls -d *); do - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}/${i}" - echo "Building example ${i} for component ${component_to_build} in directory ${PWD}..." - idf.py --ccache build - done - done - - - name: Setup ccache (make) - - # XXX ccache needs to be configured here - # unlike idf.py, esp-idf does nothing to setup ccache for make. - # IDF_CCACHE_ENABLE does not work either. - if: ${{ matrix.build_method == 'make' }} - run: | - GCC_BIN_DIR="${__PROJECT_TOOLCHAIN_DIR}/${__PROJECT_GCC_PREFIX}/${__PROJECT_TOOLCHAIN_VERSION}/${__PROJECT_GCC_PREFIX}/bin" - CCACHE_BIN_DIR="${HOME}/ccache_bin" - mkdir -p "${CCACHE_BIN_DIR}" - (cd "${CCACHE_BIN_DIR}" && ln -s /usr/bin/ccache "${__PROJECT_GCC_FILE}") - export PATH="${CCACHE_BIN_DIR}:$PATH:${GCC_BIN_DIR}" - echo "PATH=${PATH}" >> ${GITHUB_ENV} - echo "CCACHE_BASEDIR=${__PROJECT_EXAMPLE_DIR}" >> ${GITHUB_ENV} - echo "CCACHE_NOHASHDIR=true" >> ${GITHUB_ENV} - - - name: Build (make) - if: ${{ matrix.build_method == 'make' }} - run: | - components_to_build="${{ needs.pre_build.outputs.components_to_build }}" - - echo "The component whose examples need to be built:" - echo "${components_to_build}" - - # make sure gcc is in $PATH - echo ${PATH} - ${__PROJECT_GCC_FILE} --version - - # find out drivers that do not support the target - EXCLUDE_COMPONENTS="" - ALL_COMPONENTS=`ls -1 components` - for C in ${ALL_COMPONENTS}; do - echo "see if component ${C} supports the target ${IDF_TARGET}" - if [ ! -f "components/${C}/.eil.yml" ]; then - echo "metadata file for component ${C}, components/${C}/.eil.yml, does not exist" - exit 1 - fi - if yq '.components[].targets[].name' "components/${C}/.eil.yml" | grep -q ${IDF_TARGET}; then - echo "component ${C} supports ${IDF_TARGET}" - else - echo "component ${C} does not support ${IDF_TARGET}. adding it to EXCLUDE_COMPONENTS" - EXCLUDE_COMPONENTS="${EXCLUDE_COMPONENTS} ${C}" - fi - done - echo "EXCLUDE_COMPONENTS=${EXCLUDE_COMPONENTS}" - export EXCLUDE_COMPONENTS - - # remove components in EXCLUDE_COMPONENTS from components_to_build - for ec in ${EXCLUDE_COMPONENTS}; do - components_to_build=`echo ${components_to_build} | tr ' ' '\n' | grep -v ${ec} | tr '\n' ' '` - done - - . ${IDF_PATH}/export.sh - - # XXX share cache between examples. - # see "Compiling In Different Directories" in ccache(1) - # | | 4.0.1 | master | - # |----------------------------------------|---------|---------| - # | without ccache | 33m 42s | 50m 27s | - # | CCACHE_BASEDIR and CCACHE_NOHASHDIR | 10m 41s | 16m 38s | - export CCACHE_BASEDIR="${__PROJECT_EXAMPLE_DIR}" - export CCACHE_NOHASHDIR=true - - echo "final components_to_build:" - echo "${components_to_build}" - for component_to_build in ${components_to_build}; do - cd ${GITHUB_WORKSPACE} - echo "Building examples for ${component_to_build} under directory ${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - for i in $(ls -d *); do - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}/${i}" - echo "Building example ${i} for component ${component_to_build} in directory ${PWD}..." - make defconfig - make -j$(nproc) - done - done - - build_esp8266: - runs-on: ubuntu-latest - needs: pre_build - if: ${{ needs.pre_build.outputs.should_skip != 'true' }} - strategy: - fail-fast: false - matrix: - build_method: - - # XXX build examples with make only - # idf.py in ESP8266 RTOS SDK is broken in many ways. - - make - branch: - - v3.4 - - master - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Install dependencies - run: | - sudo apt-get install \ - bison \ - ccache \ - flex \ - gcc \ - git \ - gperf \ - libffi-dev \ - libncurses-dev \ - libssl-dev \ - make \ - wget - - - name: Install yq to parse YAML files - run: | - YQ_VERSION=v4.25.3 - YQ_BINARY=yq_linux_amd64 - YQ_COMMAND="/usr/bin/yq" - wget "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_BINARY}" -O ./yq - sudo mv ./yq "${YQ_COMMAND}" - sudo chmod +x "${YQ_COMMAND}" - "${YQ_COMMAND}" --version - - - name: Set environment variables - id: set_env - run: | - SDK_NAME="ESP8266_RTOS_SDK" - GCC_PREFIX="xtensa-lx106-elf" - GCC_FILE="${GCC_PREFIX}-gcc" - TOOLCHAIN_DIR="${HOME}/.espressif/tools" - REPO_DIR=`pwd` - EXAMPLE_DIR="${REPO_DIR}/examples" - __PROJECT_PATH=`pwd` - __PROJECT_TOOLCHAIN_VERSION="esp-2020r3-49-gd5524c1-8.4.0" - - # XXX actions/checkout does not allow to checkout a repository other - # than under __PROJECT_PATH - IDF_PATH="${__PROJECT_PATH}/idf" - - echo "IDF_PATH=${IDF_PATH}" >> ${GITHUB_ENV} - echo "IDF_TARGET=esp8266" >> ${GITHUB_ENV} - - # cache-idf-tools needs PROJECT_TOOLCHAIN_DIR - echo "PROJECT_TOOLCHAIN_DIR=${TOOLCHAIN_DIR}" >> $GITHUB_OUTPUT - - # XXX prefix all the environment variables with `__PROJECT_` to avoid pollution - echo "__PROJECT_EXAMPLE_DIR=${EXAMPLE_DIR}" >> ${GITHUB_ENV} - echo "__PROJECT_GCC_FILE=${GCC_FILE}" >> ${GITHUB_ENV} - echo "__PROJECT_GCC_PREFIX=${GCC_PREFIX}" >> ${GITHUB_ENV} - echo "__PROJECT_TOOLCHAIN_DIR=${TOOLCHAIN_DIR}" >> ${GITHUB_ENV} - echo "__PROJECT_PATH=${__PROJECT_PATH}" >> ${GITHUB_ENV} - echo "__PROJECT_BUILD_COMMAND=${__PROJECT_BUILD_COMMAND}" >> ${GITHUB_ENV} - echo "__PROJECT_BUILD_COMMAND_ARG=${__PROJECT_BUILD_COMMAND_ARG}" >> ${GITHUB_ENV} - echo "__PROJECT_TOOLCHAIN_VERSION=${__PROJECT_TOOLCHAIN_VERSION}" >> ${GITHUB_ENV} - - - name: Checkout the SDK - uses: actions/checkout@v3 - with: - repository: espressif/ESP8266_RTOS_SDK - path: idf - submodules: recursive - ref: ${{ matrix.branch }} - # XXX git.eclipse.org does not allow to fetch a commit. fetch all - # the commits. - fetch-depth: 0 - - - name: Install python requirements (pip) - run: | - python -m pip install --user -r ${IDF_PATH}/requirements.txt - - - name: Cache toolchain - id: cache-idf-tools - if: ${{ matrix.branch != 'master' }} - uses: actions/cache@v3 - with: - path: ${{ steps.set_env.outputs.PROJECT_TOOLCHAIN_DIR }} - key: ${{ runner.os }}-${{ matrix.branch }}-esp8266-cache-tools - - - name: Install toolchain - if: ${{ steps.cache-idf-tools.outputs.cache-hit != 'true' || matrix.branch == 'master' }} - run: | - ${IDF_PATH}/install.sh - - - name: Setup ccache (make) - run: | - __PROJECT_CCACHE_BIN_DIR="${HOME}/ccache_bin" - mkdir -p "${__PROJECT_CCACHE_BIN_DIR}" - (cd "${__PROJECT_CCACHE_BIN_DIR}" && ln -s /usr/bin/ccache "${__PROJECT_GCC_FILE}") - echo "PATH=${__PROJECT_CCACHE_BIN_DIR}:$PATH:${__PROJECT_TOOLCHAIN_DIR}/${__PROJECT_GCC_PREFIX}/${__PROJECT_TOOLCHAIN_VERSION}/${__PROJECT_GCC_PREFIX}/bin" >> ${GITHUB_ENV} - echo "CCACHE_BASEDIR=${__PROJECT_EXAMPLE_DIR}" >> ${GITHUB_ENV} - echo "CCACHE_NOHASHDIR=true" >> ${GITHUB_ENV} - - - name: Build (make) - if: ${{ matrix.build_method == 'make' }} - run: | - components_to_build="${{ needs.pre_build.outputs.components_to_build }}" - - echo "The component whose examples need to be built:" - echo "${components_to_build}" - - # make sure gcc is in $PATH - echo ${PATH} - ${__PROJECT_GCC_FILE} --version - - # find out drivers that do not support the target - EXCLUDE_COMPONENTS="" - ALL_COMPONENTS=`ls -1 components` - for C in ${ALL_COMPONENTS}; do - echo "see if component ${C} supports the target ${IDF_TARGET}" - if [ ! -f "components/${C}/.eil.yml" ]; then - echo "metadata file for component ${C}, components/${C}/.eil.yml, does not exist" - exit 1 - fi - if yq '.components[].targets[].name' "components/${C}/.eil.yml" | grep -q ${IDF_TARGET}; then - echo "component ${C} supports ${IDF_TARGET}" - else - echo "component ${C} does not support ${IDF_TARGET}. adding it to EXCLUDE_COMPONENTS" - EXCLUDE_COMPONENTS="${EXCLUDE_COMPONENTS} ${C}" - fi - done - echo "EXCLUDE_COMPONENTS=${EXCLUDE_COMPONENTS}" - export EXCLUDE_COMPONENTS - - # remove components in EXCLUDE_COMPONENTS from components_to_build - for ec in ${EXCLUDE_COMPONENTS}; do - components_to_build=`echo ${components_to_build} | tr ' ' '\n' | grep -v ${ec} | tr '\n' ' '` - done - - # XXX share cache between examples. - # see "Compiling In Different Directories" in ccache(1) - # | | 4.0.1 | master | - # |----------------------------------------|---------|---------| - # | without ccache | 33m 42s | 50m 27s | - # | CCACHE_BASEDIR and CCACHE_NOHASHDIR | 10m 41s | 16m 38s | - export CCACHE_BASEDIR="${__PROJECT_EXAMPLE_DIR}" - export CCACHE_NOHASHDIR=true - - echo "final components_to_build:" - echo "${components_to_build}" - for component_to_build in ${components_to_build}; do - cd ${GITHUB_WORKSPACE} - echo "Building examples for ${component_to_build} under directory ${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - for i in $(ls -d *); do - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}/${i}" - echo "Building example ${i} for component ${component_to_build} in directory ${PWD}..." - make defconfig - make -j$(nproc) - done - done - - build_esp8266_v3_3_x: - runs-on: ubuntu-latest - needs: pre_build - if: ${{ needs.pre_build.outputs.should_skip != 'true' }} - strategy: - fail-fast: false - matrix: - build_method: - - # XXX build examples with make only - # idf.py in ESP8266 RTOS SDK is broken in many ways. - - make - branch: - - v3.3 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Install dependencies - run: | - sudo apt-get install \ - bison \ - ccache \ - flex \ - gcc \ - git \ - gperf \ - libffi-dev \ - libncurses-dev \ - libssl-dev \ - make \ - wget - - - name: Set environment variables - id: set_env - run: | - SDK_NAME="ESP8266_RTOS_SDK" - GCC_PREFIX="xtensa-lx106-elf" - GCC_FILE="${GCC_PREFIX}-gcc" - TOOLCHAIN_DIR="${HOME}/esp32" - case "${{ matrix.branch }}" in - v3.3) - TOOLCHAIN_FILE="xtensa-lx106-elf-linux64-1.22.0-100-ge567ec7-5.2.0.tar.gz" - ;; - v3.4) - TOOLCHAIN_FILE="xtensa-lx106-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz" - ;; - *) - echo "unknown matrix.branch ${{ matrix.branch }}" - exit 1 - ;; - esac - REPO_DIR=`pwd` - EXAMPLE_DIR="${REPO_DIR}/examples" - DISTFILE_DIR="${HOME}/distfiles" - __PROJECT_PATH=`pwd` - - # XXX actions/checkout does not allow to checkout a repository other - # than under __PROJECT_PATH - IDF_PATH="${__PROJECT_PATH}/idf" - - echo "IDF_PATH=${IDF_PATH}" >> ${GITHUB_ENV} - echo "IDF_TARGET=esp8266" >> ${GITHUB_ENV} - - # cache-idf-tools needs PROJECT_DISTFILE_DIR - echo "PROJECT_DISTFILE_DIR=${DISTFILE_DIR}" >> ${GITHUB_OUTPUT} - - # XXX prefix all the environment variables with `__PROJECT_` to avoid pollution - echo "__PROJECT_EXAMPLE_DIR=${EXAMPLE_DIR}" >> ${GITHUB_ENV} - echo "__PROJECT_GCC_FILE=${GCC_FILE}" >> ${GITHUB_ENV} - echo "__PROJECT_GCC_PREFIX=${GCC_PREFIX}" >> ${GITHUB_ENV} - echo "__PROJECT_SDK_NAME=${SDK_NAME}" >> ${GITHUB_ENV} - echo "__PROJECT_TOOLCHAIN_DIR=${TOOLCHAIN_DIR}" >> ${GITHUB_ENV} - echo "__PROJECT_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}" >> ${GITHUB_ENV} - echo "__PROJECT_DISTFILE_DIR=${DISTFILE_DIR}" >> ${GITHUB_ENV} - echo "__PROJECT_PATH=${__PROJECT_PATH}" >> ${GITHUB_ENV} - echo "__PROJECT_BUILD_COMMAND=${__PROJECT_BUILD_COMMAND}" >> ${GITHUB_ENV} - echo "__PROJECT_BUILD_COMMAND_ARG=${__PROJECT_BUILD_COMMAND_ARG}" >> ${GITHUB_ENV} - - - name: Checkout the SDK - uses: actions/checkout@v3 - with: - repository: espressif/ESP8266_RTOS_SDK - path: idf - submodules: recursive - ref: ${{ matrix.branch }} - # XXX git.eclipse.org does not allow to fetch a commit. fetch all - # the commits. - fetch-depth: 0 - - - name: Install python requirements (pip) - run: | - - # XXX upgrade pyOpenSSL because older pyOpenSSL caused issues in - # the past. this might not be true anymore. - python -m pip install --user --upgrade pyOpenSSL - python -m pip install --user -r ${IDF_PATH}/requirements.txt - - - name: Create __PROJECT_DISTFILE_DIR - run: | - mkdir -p "${__PROJECT_DISTFILE_DIR}" - - - name: Cache toolchain - id: cache-idf-tools - uses: actions/cache@v3 - with: - path: ${{ steps.set_env.outputs.PROJECT_DISTFILE_DIR }} - key: ${{ runner.os }}-${{ matrix.branch }}-esp8266-cache-tools - - - name: Download toolchain if it does not exist - run: | - if [ ! -f "${__PROJECT_DISTFILE_DIR}/${__PROJECT_TOOLCHAIN_FILE}" ]; then - wget -O "${__PROJECT_DISTFILE_DIR}/${__PROJECT_TOOLCHAIN_FILE}" "https://dl.espressif.com/dl/${__PROJECT_TOOLCHAIN_FILE}" - fi - - - name: Extract the toolchain - run: | - mkdir -p "${__PROJECT_TOOLCHAIN_DIR}" - tar -xz -C "${__PROJECT_TOOLCHAIN_DIR}" -f "${__PROJECT_DISTFILE_DIR}/${__PROJECT_TOOLCHAIN_FILE}" - - - name: Setup ccache - run: | - __PROJECT_CCACHE_BIN_DIR="${HOME}/ccache_bin" - mkdir -p "${__PROJECT_CCACHE_BIN_DIR}" - (cd "${__PROJECT_CCACHE_BIN_DIR}" && ln -s /usr/bin/ccache "${__PROJECT_GCC_FILE}") - echo "PATH=${__PROJECT_CCACHE_BIN_DIR}:$PATH:${__PROJECT_TOOLCHAIN_DIR}/${__PROJECT_GCC_PREFIX}/bin" >> ${GITHUB_ENV} - echo "CCACHE_BASEDIR=${__PROJECT_EXAMPLE_DIR}" >> ${GITHUB_ENV} - echo "CCACHE_NOHASHDIR=true" >> ${GITHUB_ENV} - - - name: Build (make) - if: ${{ matrix.build_method == 'make' }} - run: | - components_to_build="${{ needs.pre_build.outputs.components_to_build }}" - - echo "The component whose examples need to be built:" - echo "${components_to_build}" - - # make sure gcc is in $PATH - echo ${PATH} - ${__PROJECT_GCC_FILE} --version - - # find out drivers that do not support the target - EXCLUDE_COMPONENTS="" - ALL_COMPONENTS=`ls -1 components` - for C in ${ALL_COMPONENTS}; do - echo "see if component ${C} supports the target ${IDF_TARGET}" - if [ ! -f "components/${C}/.eil.yml" ]; then - echo "metadata file for component ${C}, components/${C}/.eil.yml, does not exist" - exit 1 - fi - if yq '.components[].targets[].name' "components/${C}/.eil.yml" | grep -q ${IDF_TARGET}; then - echo "component ${C} supports ${IDF_TARGET}" - else - echo "component ${C} does not support ${IDF_TARGET}. adding it to EXCLUDE_COMPONENTS" - EXCLUDE_COMPONENTS="${EXCLUDE_COMPONENTS} ${C}" - fi - done - echo "EXCLUDE_COMPONENTS=${EXCLUDE_COMPONENTS}" - export EXCLUDE_COMPONENTS - - # remove components in EXCLUDE_COMPONENTS from components_to_build - for ec in ${EXCLUDE_COMPONENTS}; do - components_to_build=`echo ${components_to_build} | tr ' ' '\n' | grep -v ${ec} | tr '\n' ' '` - done - - # XXX share cache between examples. - # see "Compiling In Different Directories" in ccache(1) - # | | 4.0.1 | master | - # |----------------------------------------|---------|---------| - # | without ccache | 33m 42s | 50m 27s | - # | CCACHE_BASEDIR and CCACHE_NOHASHDIR | 10m 41s | 16m 38s | - export CCACHE_BASEDIR="${__PROJECT_EXAMPLE_DIR}" - export CCACHE_NOHASHDIR=true - - echo "final components_to_build:" - echo "${components_to_build}" - for component_to_build in ${components_to_build}; do - cd ${GITHUB_WORKSPACE} - echo "Building examples for ${component_to_build} under directory ${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - for i in $(ls -d *); do - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}/${i}" - echo "Building example ${i} for component ${component_to_build} in directory ${PWD}..." - make defconfig - make -j$(nproc) - done - done - - # XXX esp32s2 support was introduced in v4.2. older esp-idf does not install - # toolchains for esp32s2. thus, you cannot add `esp32s2` target to - # build_esp32_v4_x. - # - # this job can be removed when either one of the followings are met: - # - # * GitHub Actions supports "early exit" (successfully exit if a condition is - # true). - # * all branches in build_esp32_v4_x supports esp32s2 - # - # additionally, esp32s2 build requires idf.py. make is not supported. - build_esp32s2_v4_x: - runs-on: ubuntu-latest - needs: pre_build - if: ${{ needs.pre_build.outputs.should_skip != 'true' }} - strategy: - fail-fast: false - matrix: - build_method: - - idf - branch: - - # esp32s2 support since v4.2.x - - master - # - v4.2.3 - - v4.3.4 - - v4.4.2 - target: - - esp32s2 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Install dependencies - run: | - sudo apt-get install \ - bison \ - ccache \ - flex \ - gcc \ - git \ - gperf \ - libffi-dev \ - libncurses-dev \ - libssl-dev \ - make \ - wget - - - name: Set environment variables - id: set_env - run: | - TOOLCHAIN_DIR="${HOME}/.espressif/tools" - REPO_DIR=`pwd` - EXAMPLE_DIR="${REPO_DIR}/examples" - __PROJECT_PATH=`pwd` - IDF_PATH="${__PROJECT_PATH}/idf" - - # cache-idf-tools needs __PROJECT_TOOLCHAIN_DIR - echo "PROJECT_TOOLCHAIN_DIR=${TOOLCHAIN_DIR}" >> $GITHUB_OUTPUT - - echo "IDF_PATH=${IDF_PATH}" >> ${GITHUB_ENV} - echo "IDF_TARGET=${{ matrix.target }}" >> ${GITHUB_ENV} - echo "__PROJECT_EXAMPLE_DIR=${EXAMPLE_DIR}" >> ${GITHUB_ENV} - - - name: Checkout the SDK - uses: actions/checkout@v3 - with: - repository: espressif/esp-idf - path: idf - submodules: recursive - ref: ${{ matrix.branch }} - - - name: Cache esp-idf tools - - # cache esp-idf tools. each tagged branch has fixed versions of tools. - # the versions do not change. the master is an exception as it is a - # moving target. do NOT cache tools if the branch is master. - uses: actions/cache@v3 - id: cache-tools - if: ${{ matrix.branch != 'master' }} - with: - path: ${{ steps.set_env.outputs.PROJECT_TOOLCHAIN_DIR }} - key: ${{ runner.os }}-${{ matrix.branch }}-${{ matrix.target }}-cache-tools - - - name: Run install.sh - if: ${{ steps.cache-tools.outputs.cache-hit != 'true' || matrix.branch == 'master' }} - run: | - ${IDF_PATH}/install.sh - - - name: Run idf_tools.py install-python-env - run: | - ${IDF_PATH}/tools/idf_tools.py install-python-env - - - name: Build (idf.py) - if: ${{ matrix.build_method == 'idf' }} - run: | - components_to_build="${{ needs.pre_build.outputs.components_to_build }}" - - echo "The component whose examples need to be built:" - echo "${components_to_build}" - - # find out drivers that do not support the target - EXCLUDE_COMPONENTS="" - ALL_COMPONENTS=`ls -1 components` - for C in ${ALL_COMPONENTS}; do - echo "see if component ${C} supports the target ${IDF_TARGET}" - if [ ! -f "components/${C}/.eil.yml" ]; then - echo "metadata file for component ${C}, components/${C}/.eil.yml, does not exist" - exit 1 - fi - if yq '.components[].targets[].name' "components/${C}/.eil.yml" | grep -q ${IDF_TARGET}; then - echo "component ${C} supports ${IDF_TARGET}" - else - echo "component ${C} does not support ${IDF_TARGET}. adding it to EXCLUDE_COMPONENTS" - EXCLUDE_COMPONENTS="${EXCLUDE_COMPONENTS} ${C}" - fi - done - echo "EXCLUDE_COMPONENTS=${EXCLUDE_COMPONENTS}" - export EXCLUDE_COMPONENTS - - # remove components in EXCLUDE_COMPONENTS from components_to_build - for ec in ${EXCLUDE_COMPONENTS}; do - components_to_build=`echo ${components_to_build} | tr ' ' '\n' | grep -v ${ec} | tr '\n' ' '` - done - - . ${IDF_PATH}/export.sh - - # XXX share cache between examples. - # see "Compiling In Different Directories" in ccache(1) - # | | 4.0.1 | master | - # |----------------------------------------|---------|---------| - # | without ccache | 33m 42s | 50m 27s | - # | CCACHE_BASEDIR and CCACHE_NOHASHDIR | 10m 41s | 16m 38s | - export CCACHE_BASEDIR="${__PROJECT_EXAMPLE_DIR}" - export CCACHE_NOHASHDIR=true - - echo "final components_to_build:" - echo "${components_to_build}" - for component_to_build in ${components_to_build}; do - cd ${GITHUB_WORKSPACE} - echo "Building examples for ${component_to_build} under directory ${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - for i in $(ls -d *); do - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}/${i}" - echo "Building example ${i} for component ${component_to_build} in directory ${PWD}..." - idf.py --ccache build - done - done - - build_esp32c3_v4_x: - runs-on: ubuntu-latest - needs: pre_build - if: ${{ needs.pre_build.outputs.should_skip != 'true' }} - strategy: - fail-fast: false - matrix: - build_method: - - idf - branch: - # esp32c3 support was introduced in v4.3. - - master - - v4.3.4 - - v4.4.2 - target: - - esp32c3 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Install dependencies - run: | - sudo apt-get install \ - bison \ - ccache \ - flex \ - gcc \ - git \ - gperf \ - libffi-dev \ - libncurses-dev \ - libssl-dev \ - make \ - wget - - - name: Set environment variables - id: set_env - run: | - TOOLCHAIN_DIR="${HOME}/.espressif/tools" - REPO_DIR=`pwd` - EXAMPLE_DIR="${REPO_DIR}/examples" - __PROJECT_PATH=`pwd` - IDF_PATH="${__PROJECT_PATH}/idf" - - # cache-idf-tools needs __PROJECT_TOOLCHAIN_DIR - echo "PROJECT_TOOLCHAIN_DIR=${TOOLCHAIN_DIR}" >> $GITHUB_OUTPUT - - echo "IDF_PATH=${IDF_PATH}" >> ${GITHUB_ENV} - echo "IDF_TARGET=${{ matrix.target }}" >> ${GITHUB_ENV} - echo "__PROJECT_EXAMPLE_DIR=${EXAMPLE_DIR}" >> ${GITHUB_ENV} - - - name: Checkout the SDK - uses: actions/checkout@v3 - with: - repository: espressif/esp-idf - path: idf - submodules: recursive - ref: ${{ matrix.branch }} - - - name: Cache esp-idf tools - - # cache esp-idf tools. each tagged branch has fixed versions of tools. - # the versions do not change. the master is an exception as it is a - # moving target. do NOT cache tools if the branch is master. - uses: actions/cache@v3 - id: cache-tools - if: ${{ matrix.branch != 'master' }} - with: - path: ${{ steps.set_env.outputs.PROJECT_TOOLCHAIN_DIR }} - key: ${{ runner.os }}-${{ matrix.branch }}-${{ matrix.target }}-cache-tools-1 - - - name: Run install.sh - if: ${{ steps.cache-tools.outputs.cache-hit != 'true' || matrix.branch == 'master' }} - run: | - ${IDF_PATH}/install.sh - - - name: Run idf_tools.py install-python-env - run: | - ${IDF_PATH}/tools/idf_tools.py install-python-env - - - name: Build (idf.py) - if: ${{ matrix.build_method == 'idf' }} - run: | - components_to_build="${{ needs.pre_build.outputs.components_to_build }}" - - echo "The component whose examples need to be built:" - echo "${components_to_build}" - - # find out drivers that do not support the target - EXCLUDE_COMPONENTS="" - ALL_COMPONENTS=`ls -1 components` - for C in ${ALL_COMPONENTS}; do - echo "see if component ${C} supports the target ${IDF_TARGET}" - if [ ! -f "components/${C}/.eil.yml" ]; then - echo "metadata file for component ${C}, components/${C}/.eil.yml, does not exist" - exit 1 - fi - if yq '.components[].targets[].name' "components/${C}/.eil.yml" | grep -q ${IDF_TARGET}; then - echo "component ${C} supports ${IDF_TARGET}" - else - echo "component ${C} does not support ${IDF_TARGET}. adding it to EXCLUDE_COMPONENTS" - EXCLUDE_COMPONENTS="${EXCLUDE_COMPONENTS} ${C}" - fi - done - echo "EXCLUDE_COMPONENTS=${EXCLUDE_COMPONENTS}" - export EXCLUDE_COMPONENTS - - # remove components in EXCLUDE_COMPONENTS from components_to_build - for ec in ${EXCLUDE_COMPONENTS}; do - components_to_build=`echo ${components_to_build} | tr ' ' '\n' | grep -v ${ec} | tr '\n' ' '` - done - - . ${IDF_PATH}/export.sh - - # XXX share cache between examples. - # see "Compiling In Different Directories" in ccache(1) - # | | 4.0.1 | master | - # |----------------------------------------|---------|---------| - # | without ccache | 33m 42s | 50m 27s | - # | CCACHE_BASEDIR and CCACHE_NOHASHDIR | 10m 41s | 16m 38s | - export CCACHE_BASEDIR="${__PROJECT_EXAMPLE_DIR}" - export CCACHE_NOHASHDIR=true - - echo "final components_to_build:" - echo "${components_to_build}" - for component_to_build in ${components_to_build}; do - cd ${GITHUB_WORKSPACE} - echo "Building examples for ${component_to_build} under directory ${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}" - for i in $(ls -d *); do - cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}/${i}" - echo "Building example ${i} for component ${component_to_build} in directory ${PWD}..." - idf.py --ccache build - done - done - all_build: - # a meta job that requires all of the above so that repository - # admin can choose a single test name in "Require status checks to pass - # before merging". A trick obtained from: - # - # https://github.com/jazzband/pip-tools/issues/1085#issuecomment-619172509 - name: All build - runs-on: ubuntu-latest - needs: - - build_esp32_master - - build_esp32_v5_x - - build_esp32_v4_x - - build_esp8266 - - build_esp8266_v3_3_x - - build_esp32s2_v4_x - - build_esp32c3_v4_x - steps: - - name: - run: | - echo "All builds finished" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..19f9fa92 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,373 @@ +name: Main CI process +on: + workflow_dispatch: + pull_request: + types: + - opened + - reopened + - synchronize + +jobs: + + prepare: + name: Prepare CI + runs-on: ubuntu-latest + outputs: + _ci_readme: ${{ steps.ci.outputs._ci_readme }} + _ci_docs: ${{ steps.ci.outputs._ci_docs }} + _ci_build_esp32: ${{ steps.ci.outputs._ci_build_esp32 }} + _ci_build_esp32c2: ${{ steps.ci.outputs._ci_build_esp32c2 }} + _ci_build_esp32c3: ${{ steps.ci.outputs._ci_build_esp32c3 }} + _ci_build_esp32c6: ${{ steps.ci.outputs._ci_build_esp32c6 }} + _ci_build_esp32h2: ${{ steps.ci.outputs._ci_build_esp32h2 }} + _ci_build_esp32h4: ${{ steps.ci.outputs._ci_build_esp32h4 }} + _ci_build_esp32s2: ${{ steps.ci.outputs._ci_build_esp32s2 }} + _ci_build_esp32s3: ${{ steps.ci.outputs._ci_build_esp32s3 }} + _ci_build_esp8266: ${{ steps.ci.outputs._ci_build_esp8266 }} + steps: + - id: setup_python + name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - id: checkout + name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: '0' + + - id: requirements + name: Install devtool requirements + run: pip install -r ./devtools/requirements.txt + + - id: ci + name: Build list of CI jobs + run: python ./devtools/devtool.py ci >> $GITHUB_OUTPUT + + readme: + name: Test README.md + needs: + - prepare + if: ${{ needs.prepare.outputs._ci_readme == '1' }} + runs-on: ubuntu-latest + steps: + - id: setup_python + name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - id: checkout + name: Checkout + uses: actions/checkout@v3 + + - id: requirements + name: Install devtool requirements + run: pip install -r ./devtools/requirements.txt + + - id: check + name: Check README.md + run: | + python ./devtools/devtool.py render + git diff --exit-code README.md + + docs: + name: Documentation build check + runs-on: ubuntu-latest + needs: + - prepare + if: ${{ needs.prepare.outputs._ci_docs == '1' }} + steps: + - id: checkout + name: Checkout + uses: actions/checkout@v3 + + - id: dependencies + name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install python3-sphinx python3-sphinx-rtd-theme python3-breathe doxygen + + # FIXME: extract doxygen and sphinx errors and warnings, not just run make! + - id: build + name: Build docs + run: | + make -C docs dirhtml + + build_esp32xx: + name: Build for ESP32xx + runs-on: ubuntu-latest + needs: + - prepare + strategy: + # run other jobs even when one job failed + fail-fast: false + # releases, see https://github.com/espressif/esp-idf#esp-idf-release-support-schedule + matrix: + esp_idf_version: + - latest + - release-v5.1 + - release-v5.0 + - release-v4.4 + - release-v4.3 + target: + - esp32 + - esp32s2 + - esp32s3 + - esp32c2 + - esp32c3 + - esp32c6 + - esp32h2 + steps: + - id: checkout + name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + + - id: ccache + name: Install ccache + run: | + sudo apt-get update + sudo apt-get -y install ccache + + - id: build_esp32 + name: esp-idf build + uses: espressif/esp-idf-ci-action@v1 + with: + esp_idf_version: ${{ matrix.esp_idf_version }} + target: ${{ matrix.target }} + path: examples + command: | + # XXX share cache between examples. + # see "Compiling In Different Directories" in ccache(1) + export CCACHE_BASEDIR="$(pwd)" + export CCACHE_NOHASHDIR=true + + # see suppot matrix at https://github.com/espressif/esp-idf#esp-idf-release-and-soc-compatibility + examples= + + # ESP32: all + if [ "${{ matrix.target }}" = "esp32" ]; then + examples="${{ needs.prepare.outputs._ci_build_esp32 }}" + fi + + # ESP32-S2: all + if [ "${{ matrix.target }}" = "esp32s2" ]; then + examples="${{ needs.prepare.outputs._ci_build_esp32s2 }}" + fi + + # ESP32-C3: 4.3, 4.4, 5.0, 5.1 + if [ "${{ matrix.target }}" = "esp32c3" ]; then + if [ "${{ matrix.esp_idf_version }}" != "release-v4.2" ]; then + examples="${{ needs.prepare.outputs._ci_build_esp32c3 }}" + fi + fi + + # ESP32-S3: 4.4, 5.0, 5.1 + if [ "${{ matrix.target }}" = "esp32s3" ]; then + if [ "${{ matrix.esp_idf_version }}" != "release-v4.2" \ + -a "${{ matrix.esp_idf_version }}" != "release-v4.3"]; then + examples="${{ needs.prepare.outputs._ci_build_esp32s3 }}" + fi + fi + + # ESP32-C2: 5.0, 5.1 + if [ "${{ matrix.target }}" = "esp32c2" ]; then + if [ "${{ matrix.esp_idf_version }}" != "release-v4.2" \ + -a "${{ matrix.esp_idf_version }}" != "release-v4.3" \ + -a "${{ matrix.esp_idf_version }}" != "release-v4.4" ]; then + examples="${{ needs.prepare.outputs._ci_build_esp32c2 }}" + fi + fi + + # ESP32-C6: 5.1 + if [ "${{ matrix.target }}" = "esp32c6" ]; then + if [ "${{ matrix.esp_idf_version }}" != "release-v4.2" \ + -a "${{ matrix.esp_idf_version }}" != "release-v4.3" \ + -a "${{ matrix.esp_idf_version }}" != "release-v4.4" \ + -a "${{ matrix.esp_idf_version }}" != "release-v5.0" ]; then + examples="${{ needs.prepare.outputs._ci_build_esp32c6 }}" + fi + fi + + # ESP32-H2: 5.1 + if [ "${{ matrix.target }}" = "esp32c6" ]; then + if [ "${{ matrix.esp_idf_version }}" != "release-v4.2" \ + -a "${{ matrix.esp_idf_version }}" != "release-v4.3" \ + -a "${{ matrix.esp_idf_version }}" != "release-v4.4" \ + -a "${{ matrix.esp_idf_version }}" != "release-v5.0" ]; then + examples="${{ needs.prepare.outputs._ci_build_esp32h2 }}" + fi + fi + + if [ -z "${examples}" ]; then + echo "Nothing to build: no component supports ${{ matrix.target }} or ${{ matrix.esp_idf_version }} does not support ${{ matrix.target }}" + exit 0 + fi + + for component in ${examples}; do + for dir in ${component}/*; do + cd ${dir} + idf.py --ccache build + rm -rf build + cd ../.. + done + done + + build_esp8266: + name: Build for ESP8266 + runs-on: ubuntu-latest + needs: + - prepare + strategy: + fail-fast: false + matrix: + esp_open_rtos: + - v3.4 + - master + build_method: + # XXX build examples with make only + # idf.py in ESP8266 RTOS SDK is broken in many ways. + - make + steps: + - id: checkout + name: Checkout + uses: actions/checkout@v3 + + - id: setup_python + name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - id: devtool_requirements + name: Install devtool requirements + run: pip install -r ./devtools/requirements.txt + + - id: prerequisites + name: Install prerequisites + run: | + sudo apt-get update + sudo apt-get -y install \ + bison \ + ccache \ + flex \ + gcc \ + git \ + gperf \ + libffi-dev \ + libncurses-dev \ + libssl-dev \ + make \ + wget + + - name: Set environment variables + id: set_env + run: | + SDK_NAME="ESP8266_RTOS_SDK" + GCC_PREFIX="xtensa-lx106-elf" + GCC_FILE="${GCC_PREFIX}-gcc" + TOOLCHAIN_DIR="${HOME}/.espressif/tools" + REPO_DIR=`pwd` + EXAMPLE_DIR="${REPO_DIR}/examples" + __PROJECT_PATH=`pwd` + __PROJECT_TOOLCHAIN_VERSION="esp-2020r3-49-gd5524c1-8.4.0" + + # XXX actions/checkout does not allow to checkout a repository other + # than under __PROJECT_PATH + IDF_PATH="${__PROJECT_PATH}/idf" + + echo "IDF_PATH=${IDF_PATH}" >> ${GITHUB_ENV} + echo "IDF_TARGET=esp8266" >> ${GITHUB_ENV} + + # cache-idf-tools needs PROJECT_TOOLCHAIN_DIR + echo "PROJECT_TOOLCHAIN_DIR=${TOOLCHAIN_DIR}" >> $GITHUB_OUTPUT + + # XXX prefix all the environment variables with `__PROJECT_` to avoid pollution + echo "__PROJECT_EXAMPLE_DIR=${EXAMPLE_DIR}" >> ${GITHUB_ENV} + echo "__PROJECT_GCC_FILE=${GCC_FILE}" >> ${GITHUB_ENV} + echo "__PROJECT_GCC_PREFIX=${GCC_PREFIX}" >> ${GITHUB_ENV} + echo "__PROJECT_TOOLCHAIN_DIR=${TOOLCHAIN_DIR}" >> ${GITHUB_ENV} + echo "__PROJECT_PATH=${__PROJECT_PATH}" >> ${GITHUB_ENV} + echo "__PROJECT_BUILD_COMMAND=${__PROJECT_BUILD_COMMAND}" >> ${GITHUB_ENV} + echo "__PROJECT_BUILD_COMMAND_ARG=${__PROJECT_BUILD_COMMAND_ARG}" >> ${GITHUB_ENV} + echo "__PROJECT_TOOLCHAIN_VERSION=${__PROJECT_TOOLCHAIN_VERSION}" >> ${GITHUB_ENV} + + - name: Checkout the SDK + uses: actions/checkout@v3 + with: + repository: espressif/ESP8266_RTOS_SDK + path: idf + submodules: recursive + ref: ${{ matrix.branch }} + fetch-depth: 0 + + - name: Install python requirements (pip) + run: | + python -m pip install --user -r ${IDF_PATH}/requirements.txt + + - id: cache-idf-tools + name: Cache toolchain + if: ${{ matrix.branch != 'master' }} + uses: actions/cache@v3 + with: + path: ${{ steps.set_env.outputs.PROJECT_TOOLCHAIN_DIR }} + key: ${{ runner.os }}-${{ matrix.branch }}-esp8266-cache-tools + + - name: Install toolchain + if: ${{ steps.cache-idf-tools.outputs.cache-hit != 'true' || matrix.branch == 'master' }} + run: | + ${IDF_PATH}/install.sh + + - name: Setup ccache (make) + run: | + __PROJECT_CCACHE_BIN_DIR="${HOME}/ccache_bin" + mkdir -p "${__PROJECT_CCACHE_BIN_DIR}" + (cd "${__PROJECT_CCACHE_BIN_DIR}" && ln -s /usr/bin/ccache "${__PROJECT_GCC_FILE}") + echo "PATH=${__PROJECT_CCACHE_BIN_DIR}:$PATH:${__PROJECT_TOOLCHAIN_DIR}/${__PROJECT_GCC_PREFIX}/${__PROJECT_TOOLCHAIN_VERSION}/${__PROJECT_GCC_PREFIX}/bin" >> ${GITHUB_ENV} + echo "CCACHE_BASEDIR=${__PROJECT_EXAMPLE_DIR}" >> ${GITHUB_ENV} + echo "CCACHE_NOHASHDIR=true" >> ${GITHUB_ENV} + + - name: Build (make) + if: ${{ matrix.build_method == 'make' }} + run: | + components_to_build="${{ needs.pre_build.outputs.components_to_build }}" + + echo "The component whose examples need to be built:" + echo "${components_to_build}" + + # make sure gcc is in $PATH + echo ${PATH} + ${__PROJECT_GCC_FILE} --version + + # find out drivers that do not support the target + EXCLUDE_COMPONENTS="$(python ./devtools/devtool.py target esp8266 -x)" + echo "EXCLUDE_COMPONENTS=${EXCLUDE_COMPONENTS}" + export EXCLUDE_COMPONENTS + + components_to_build="${{ needs.prepare.outputs._ci_build_esp8266 }}" + + # XXX share cache between examples. + # see "Compiling In Different Directories" in ccache(1) + # | | 4.0.1 | master | + # |----------------------------------------|---------|---------| + # | without ccache | 33m 42s | 50m 27s | + # | CCACHE_BASEDIR and CCACHE_NOHASHDIR | 10m 41s | 16m 38s | + export CCACHE_BASEDIR="${__PROJECT_EXAMPLE_DIR}" + export CCACHE_NOHASHDIR=true + + echo "final components_to_build:" + echo "${components_to_build}" + for component_to_build in ${components_to_build}; do + cd ${GITHUB_WORKSPACE} + echo "Building examples for ${component_to_build} under directory ${__PROJECT_EXAMPLE_DIR}/${component_to_build}" + cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}" + for i in $(ls -d *); do + cd "${__PROJECT_EXAMPLE_DIR}/${component_to_build}/${i}" + echo "Building example ${i} for component ${component_to_build} in directory ${PWD}..." + make defconfig + make -j$(nproc) + done + done diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml deleted file mode 100644 index 241b281b..00000000 --- a/.github/workflows/doc.yml +++ /dev/null @@ -1,59 +0,0 @@ ---- -name: "Build the documentation" -on: - pull_request: - types: - - labeled - - synchronize - -jobs: - pre_build: - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.result }} - steps: - - id: skip_check - uses: actions/github-script@v6 - with: - result-encoding: string - script: | - console.log("context"); - console.log(JSON.stringify(context, null, 2)); - let should_skip = false; - - switch(context.payload.action) { - case "labeled": - if (context.payload.label.name != "area:docs") { - should_skip = true; - } - if (context.payload.label.name == "area:ci") { - should_skip = false; - } - break; - case "synchronize": - let labels = context.payload.pull_request.labels.map(label => { return label.name }); - if (!labels.includes("area:docs")) { - should_skip = true; - } - if (labels.includes("area:ci")) { - should_skip = false; - } - break; - } - return should_skip; - docs: - runs-on: ubuntu-latest - needs: pre_build - if: ${{ needs.pre_build.outputs.should_skip != 'true' }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install python3-sphinx python3-sphinx-rtd-theme python3-breathe doxygen - - - name: Build docs - run: | - make -C docs diff --git a/.github/workflows/labeler-by-workflow-status.yml b/.github/workflows/labeler-by-workflow-status.yml deleted file mode 100644 index 86722255..00000000 --- a/.github/workflows/labeler-by-workflow-status.yml +++ /dev/null @@ -1,84 +0,0 @@ ---- -name: Label PRs by workflow conclusion -on: - workflow_run: - # when the workflows listed here complete, this workflow runs - workflows: - - Build examples - - Build the documentation - - Metadata - - types: - - completed - -jobs: - on-completed: - runs-on: ubuntu-latest - steps: - - name: Dump context for debugging - uses: actions/github-script@v6 - with: - script: | - // steps receive a context from the workflow_run event - // see: - // https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_run - console.log(JSON.stringify(context, null, 2)) - - on-success: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - - name: Remove failure label - uses: actions/github-script@v6 - with: - script: | - const util = require("util"); - - label_failure_name = util.format("ci/%s/failure", context.payload.workflow_run.name); - - // when pull_requests.length is zero, that means the workflow_run - // has no PR, e.g. workflow_run was invoked in `master`, and no - // PR to label. - if (context.payload.workflow_run.pull_requests.length == 0) { - return; - } - try { - await github.rest.issues.removeLabel({ - issue_number: context.payload.workflow_run.pull_requests[0].number, - owner: context.repo.owner, - repo: context.repo.repo, - name: label_failure_name - }); - } catch(e) { - if (!e.message.includes('Label does not exist')) { - core.error(e); - core.setFailed(e.message); - } - } - - on-failure: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'failure' }} - steps: - - name: Add failure label - uses: actions/github-script@v6 - with: - script: | - const util = require("util"); - - label_failure_name = util.format("ci/%s/failure", context.payload.workflow_run.name); - - if (context.payload.workflow_run.pull_requests.length == 0) { - return; - } - try { - await github.rest.issues.addLabels({ - issue_number: context.payload.workflow_run.pull_requests[0].number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: [label_failure_name] - }); - } catch(e) { - core.error(e); - core.setFailed(e.message); - } diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index 1017da26..00000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: Label PR -on: - # use pull_request_target here to label PRs. from the documentation: - # - # "This event runs in the context of the base of the pull request, rather - # than in the context of the merge commit, as the pull_request event does" - # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target - # - # this workflow is potentially dangerous because the workflow has access to - # GitHub APIs, i.e. secrets.GITHUB_TOKEN, and the author of PRs, who might - # not be a member of the repository, can modify the workflow. - # - # see also: - # Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests - # https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ - pull_request_target: - -# this workflow needs write access to PRs because it add labels to PRs, or -# remove labels from PRs. -permissions: - contents: read - pull-requests: write - -jobs: - labeler: - name: Labeler - runs-on: ubuntu-latest - steps: - - uses: fuxingloh/multi-labeler@v2 - with: - github-token: ${{secrets.LABELER_TOKEN}} - config-path: .github/labeler.yml diff --git a/.github/workflows/metadata.yml b/.github/workflows/metadata.yml deleted file mode 100644 index 3213a0c5..00000000 --- a/.github/workflows/metadata.yml +++ /dev/null @@ -1,61 +0,0 @@ ---- -name: Metadata -on: - pull_request: - types: - - labeled - - synchronize - -jobs: - pre_build: - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.result }} - steps: - - id: skip_check - uses: actions/github-script@v6 - with: - result-encoding: string - script: | - console.log("context"); - console.log(JSON.stringify(context, null, 2)); - let should_skip = false; - - switch(context.payload.action) { - case "labeled": - if (context.payload.label.name != "area:components") { - should_skip = true; - } - if (context.payload.label.name == "area:ci") { - should_skip = false; - } - break; - case "synchronize": - let labels = context.payload.pull_request.labels.map(label => { return label.name }); - if (!labels.includes("area:components")) { - should_skip = true; - } - if (labels.includes("area:ci")) { - should_skip = false; - } - break; - } - return should_skip; - test: - runs-on: ubuntu-latest - needs: pre_build - if: ${{ needs.pre_build.outputs.should_skip != 'true' }} - steps: - - uses: actions/checkout@v3 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: 2.7 - bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - run: bundle exec rake -C devtools - - run: | - # Test if README.md is up-to-date with the metadata. If this test - # fails, update README.md by: - # - # bundle exec rake -C devtools readme > README.md - bundle exec rake -C devtools readme > README.md - git diff --exit-code README.md diff --git a/.gitignore b/.gitignore index 7d3235e2..18d8846f 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,6 @@ Gemfile.lock # bundled files by ruby bundler and configuration /.bundle/ /vendor/ + +# python cache +__pycache__/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 27571111..6964031b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -456,10 +456,10 @@ for the supported keywords. Each component has a `.eil.yml` file in its component directory. The file is a metadata file of the component. If you change the file, you need to update the `README.md` in the project root directory. The `README.md` is generated from -the metadata and a template, `README.md.erb`. Generate `README.md` by: +the metadata and a template. ```console -bundle exec rake -C devtools readme > README.md +./devtools/devtool.py --repo=. render ``` See also [`Metadata.md`](Metadata.md). diff --git a/Metadata.md b/Metadata.md index e7e54173..cc947994 100644 --- a/Metadata.md +++ b/Metadata.md @@ -62,15 +62,15 @@ Resources defined here represents various objects used in the metadata. A resource has unique `name` as a primary key. -When referring to a resource in another resource, use `name` as key and its +When referring to a resource in another resource, use `name` as value to identify the resource. As a shorthand, you may use the name of a -resource as `String`. In this case, the value is assumed to be `name: $VALUE`. +resource as `String`. In this case, the value is assumed to be `$VALUE`. When a resource expects a `Person` as a value, ```yaml foo: - name: trombik + - trombik ``` This is a shorthand version of the above example: @@ -84,13 +84,13 @@ foo: trombik A `Person` represents a person. `Person` is used to describe a copyrights holder and a code owner. A `Person` must be defined in `persons.yml` file. -| Name | Type | Description | Required | -|------|------|-------------|----------| -| `name` | `String` | A unique ID string of the person. Use GitHub account or GitHub project if the person has one | Yes | +| Name | Type | Description | Required | +|-------------|------|-------------|----------| +| `name` | `String` | A unique ID string of the person. Use GitHub account or GitHub project if the person has one | Yes | | `full_name` | `String` | Full name of the person or the project | No | -| `gh_id` | `String` | GitHub account name or project name | No | -| `email` | `String` | Email address of the person | No | -| `website` | `String` | Web site URL | No | +| `gh_id` | `String` | GitHub account name or project name | No | +| `email` | `String` | Email address of the person | No | +| `url` | `String` | Web site URL | No | When any of `gh_id`, `email`, or `website` is not available, `person` must have a full name because it is used to identify the source of code. @@ -108,7 +108,7 @@ name: trombik gh_id: trombik full_name: Tomoyuki Sakurai email: y@trombik.org -website: https://github.com/trombik +url: https://github.com/trombik ``` ```yaml @@ -202,18 +202,18 @@ components: ### Component -| Name | Type | Description | Required | -|------|------|-------------|----------| -| `name` | `String` | The name of the component. Must be unique. | Yes | -| `description` | `String` | A short description of the component. | Yes | -| `group` | `Group` | The primary group name of the component. | Yes | -| `groups` | A list of `Group` | A list of zero or more of `Group` | No | -| `code_owners` | A list of `Person` | A list of one or more of `Person` | Yes | +| Name | Type | Description | Required | +|------|------|-----------------------------------------------------------|----------| +| `name` | `String` | The name of the component. Must be unique. | Yes | +| `description` | `String` | A short description of the component. | Yes | +| `group` | `Group` | The primary group name of the component. | Yes | +| `groups` | A list of `Group` | A list of zero or more of `Group` | No | +| `code_owners` | A list of `Person` | A list of one or more of `Person` | Yes | | `depends` | A list of `Component` | Zero or more of `component` that the component depends on | No | -| `thread_safe` | `Strnig` | One of `yes`, `no`, and `N/A` | Yes | -| `targets` | A list of `Target` | One or more of supported `target` | Yes | -| `licenses` | A list of `License` | One or more of licenses used in the component | Yes | -| `copyrights` | A list of `Copyright` | One or more of copyright holder | Yes | +| `thread_safe` | `Strnig` | One of `yes`, `no`, and `N/A` | Yes | +| `targets` | A list of `Target` | One or more of supported `target` | Yes | +| `license` | `License` | License used in the component | Yes | +| `copyrights` | A list of `Copyright` | One or more of copyright holder | Yes | FIXME `depends` must be a list because some drivers have conditional `REQUIRES` in `CMakeLists.txt`. @@ -225,13 +225,12 @@ metadata in all components, and generate `README.md`. Requirements are: -* `ruby` 2.7 (other version should also work) -* [`bundler`](https://bundler.io/) +* `python` >=3.11 After installing requirements, run: ```console -bundle install +pip install -r devtool/requirements.txt ``` ### Validating metadata of components @@ -239,26 +238,9 @@ bundle install To validate metadata, run: ```console -bundle exec rake -C devtools rspec +./devtools/devtool.py --repo=. check ``` -The implementation uses `rspec` to validate metadata because: - -1. the output is readable -2. requires less `ruby` knowledge to maintain the spec than validating - everything in ruby code -3. porting tests to other languages is easier than porting ruby code - -Under `spec` directory, there are: - -* `spec_helper.rb`, which is a helper for the test -* `*_spec.rb`, which is a test script -* other ruby files, such as `person.rb`, which are class definitions used in - the test - -The ruby classes for the test validate minimum requirements only, such as the -`.eil.yml` file exists, or a resource has a required primary key. Actual -test should be performed in `*_spec.rb` files. ### Generating `README.md` @@ -279,17 +261,17 @@ the following case. ```yaml # for esp32 depends: - - name: driver - - name: freertos - - name: log + - driver + - freertos + - log ``` ```yaml # for esp8266 depends: - - name: esp8266 - - name: freertos - - name: log + - esp8266 + - freertos + - log ``` A possible solution: @@ -298,12 +280,12 @@ A possible solution: depends: - name: driver target: - - name: esp32 - - name: esp32s2 - - name: esp32c3 + - esp32 + - esp32s2 + - esp32c3 - name: esp8266 target: - - name: esp8266 - - name: freertos - - name: log + - esp8266 + - freertos + - log ``` diff --git a/README.md b/README.md index fdb6f0b9..798f8980 100644 --- a/README.md +++ b/README.md @@ -13,20 +13,14 @@ Part of them ported from [esp-open-rtos](https://github.com/SuperHouse/esp-open- | Chip | Framework | Versions |----------------|--------------------|----------------------- -| ESP32 | ESP-IDF | All officially supported versions (see [Support Period Policy](https://github.com/espressif/esp-idf/blob/master/SUPPORT_POLICY.md)) and `master` -| ESP32-S2 *[1]* | ESP-IDF | All officially supported versions and `master` -| ESP32-C3 *[1]* | ESP-IDF | All officially supported versions and `master` -| ESP8266 *[2]* | ESP8266 RTOS SDK | `master`, v3.4 +| ESP32-xx | ESP-IDF | All officially supported versions (see [Support Period Policy](https://github.com/espressif/esp-idf/blob/master/SUPPORT_POLICY.md)) and `master` +| ESP8266 *[1]* | ESP8266 RTOS SDK | `master`, v3.4 -[1] *Use "`idf.py set-target esp32s2`" or "`idf.py set-target esp32c3`" before "`idf.py menuconfig`" to change -the chip type.* - -[2] *Due to the incompatibility of ESP8266 drivers and hardware, some -libraries are not* *supported on ESP8266 (see "ESP8266" column in the tables).* +See "Supported on" column for each of the components. ## How to use -### ESP32 +### ESP32-xx Clone this repository somewhere, e.g.: @@ -35,17 +29,9 @@ cd ~/myprojects/esp git clone https://github.com/UncleRus/esp-idf-lib.git ``` -Add path to components in your [project makefile](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system-legacy.html), +Add path to components in your [CMakeLists.txt](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html): e.g: -```Makefile -PROJECT_NAME := my-esp-project -EXTRA_COMPONENT_DIRS := /home/user/myprojects/esp/esp-idf-lib/components -include $(IDF_PATH)/make/project.mk -``` - -or in [CMakeLists.txt](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html): - ```CMake cmake_minimum_required(VERSION 3.5) set(EXTRA_COMPONENT_DIRS /home/user/myprojects/esp/esp-idf-lib/components) @@ -99,189 +85,205 @@ or [GitLab examples](https://gitlab.com/UncleRus/esp-idf-lib/tree/master/example ### ADC/DAC libraries -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **ads111x** | Driver for ADS1113/ADS1114/ADS1115 and ADS1013/ADS1014/ADS1015 I2C ADC | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **ads130e08** | Driver for ADS130E08 ADC | MIT | `esp32`, `esp32s3` | Yes -| **hx711** | Driver for HX711 24-bit ADC for weigh scales | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | No -| **mcp342x** | Driver for 18-Bit, delta-sigma ADC MCP3426/MCP3427/MCP3428 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **mcp4725** | Driver for 12-bit DAC MCP4725 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **pcf8591** | Driver for 8-bit ADC and an 8-bit DAC PCF8591 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **sgm58031** | Driver for SGM58031 16-bit I2C ADC | ISC | `esp32`, `esp8266`, `esp32s2`, `esp32s3`, `esp32c3` | Yes +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **ads111x** | Driver for ADS1113/ADS1114/ADS1115 and ADS1013/ADS1014/ADS1015 I2C ADC | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **ads130e08** | Driver for ADS130E08 ADC | MIT | esp32, esp32s3 | yes | +| **hx711** | Driver for HX711 24-bit ADC for weigh scales | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | no | +| **mcp342x** | Driver for 18-Bit, delta-sigma ADC MCP3426/MCP3427/MCP3428 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **mcp4725** | Driver for 12-bit DAC MCP4725 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **pcf8591** | Driver for 8-bit ADC and an 8-bit DAC PCF8591 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **sgm58031** | Driver for SGM58031 16-bit I2C ADC | ISC | esp32, esp8266, esp32s2, esp32s3, esp32c3 | yes | + ### Air quality sensors -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **ccs811** | Driver for AMS CCS811 digital gas sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **mhz19b** | Driver for MH-Z19B NDIR CO₂ sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | No -| **scd30** | Driver for SCD30 CO₂ sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **scd4x** | Driver for SCD40/SCD41 miniature CO₂ sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **sgp40** | Driver for SGP40 Indoor Air Quality Sensor for VOC Measurements | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **ccs811** | Driver for AMS CCS811 digital gas sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **mhz19b** | Driver for MH-Z19B NDIR CO₂ sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | no | +| **scd30** | Driver for SCD30 CO₂ sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **scd4x** | Driver for SCD40/SCD41 miniature CO₂ sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **sgp40** | Driver for SGP40 Indoor Air Quality Sensor for VOC Measurements | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | + ### Battery controllers -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **lc709203f** | Driver for LC709203F battery fuel gauge | ISC | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **max1704x** | Driver for MAX17043/MAX17044/MAX17048/MAX17049 battery fuel gauge | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **lc709203f** | Driver for LC709203F battery fuel gauge | ISC | esp32, esp8266, esp32s2, esp32c3 | yes | +| **max1704x** | Driver for MAX17043/MAX17044/MAX17048/MAX17049 battery fuel gauge | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | + ### Common libraries -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **color** | Common library for RGB and HSV colors | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **esp_idf_lib_helpers** | Common support library for esp-idf-lib | ISC | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **framebuffer** | RGB framebuffer component | MIT | `esp32`, `esp32s2`, `esp32c3` | Yes -| **i2cdev** | ESP-IDF I2C master thread-safe utilities | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **lib8tion** | Math functions specifically designed for LED programming | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **noise** | Noise generation functions | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **onewire** | Bit-banging 1-Wire driver | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | No +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **color** | Common library for RGB and HSV colors | MIT | esp32, esp8266, esp32s2, esp32c3 | n/a | +| **esp_idf_lib_helpers** | Common support library for esp-idf-lib | ISC | esp32, esp8266, esp32s2, esp32c3 | n/a | +| **framebuffer** | RGB framebuffer component | MIT | esp32, esp32s2, esp32c3 | n/a | +| **i2cdev** | ESP-IDF I2C master thread-safe utilities | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | +| **lib8tion** | Math functions specifically designed for LED programming | MIT | esp32, esp8266, esp32s2, esp32c3 | n/a | +| **noise** | Noise generation functions | MIT | esp32, esp8266, esp32s2, esp32c3 | n/a | +| **onewire** | Bit-banging 1-Wire driver | MIT | esp32, esp8266, esp32s2, esp32c3 | no | -### Current and power sensors -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **ina219** | Driver for INA219/INA220 bidirectional current/power monitor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **ina260** | Driver for INA260 precision digital current and power monitor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **ina3221** | Driver for INA3221 shunt and bus voltage monitor | ISC | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes +### Current and power sensors -### GPIO expanders +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **ina219** | Driver for INA219/INA220 bidirectional current/power monitor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **ina260** | Driver for INA260 precision digital current and power monitor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **ina3221** | Driver for INA3221 shunt and bus voltage monitor | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **mcp23008** | Driver for 8-bit I2C GPIO expander MCP23008 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **mcp23x17** | Driver for I2C/SPI 16 bit GPIO expanders MCP23017/MCP23S17 | BSD-3 | `esp32`, `esp32s2`, `esp32c3` | Yes -| **pca9557** | Driver for PCA9537/PCA9557/TCA9534 remote 4/8-bit I/O expanders for I2C-bus | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **pcf8574** | Driver for PCF8574 remote 8-bit I/O expander for I2C-bus | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **pcf8575** | Driver for PCF8575 remote 16-bit I/O expander for I2C-bus | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **tca95x5** | Driver for TCA9535/TCA9555 remote 16-bit I/O expanders for I2C-bus | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes ### Gas sensors -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **ccs811** | Driver for AMS CCS811 digital gas sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **mhz19b** | Driver for MH-Z19B NDIR CO₂ sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | No -| **scd30** | Driver for SCD30 CO₂ sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **scd4x** | Driver for SCD40/SCD41 miniature CO₂ sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **ccs811** | Driver for AMS CCS811 digital gas sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **mhz19b** | Driver for MH-Z19B NDIR CO₂ sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | no | +| **scd30** | Driver for SCD30 CO₂ sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **scd4x** | Driver for SCD40/SCD41 miniature CO₂ sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | + + +### GPIO expanders + +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **mcp23008** | Driver for 8-bit I2C GPIO expander MCP23008 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **mcp23x17** | Driver for I2C/SPI 16 bit GPIO expanders MCP23017/MCP23S17 | BSD-3 | esp32, esp32s2, esp32c3 | yes | +| **pca9557** | Driver for PCA9537/PCA9557/TCA9534 remote 4/8-bit I/O expanders for I2C-bus | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **pcf8574** | Driver for PCF8574 remote 8-bit I/O expander for I2C-bus | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | +| **pcf8575** | Driver for PCF8575 remote 16-bit I/O expander for I2C-bus | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | +| **tca95x5** | Driver for TCA9535/TCA9555 remote 16-bit I/O expanders for I2C-bus | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | + ### Humidity sensors -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **aht** | Driver for AHT10/AHT15/AHT20 temperature and humidity sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **am2320** | Driver for AM2320 temperature and humidity sensor (I2C) | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **bme680** | Driver for BME680 digital environmental sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **dht** | Driver for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321), Itead Si7021 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | No -| **hdc1000** | Driver for HDC1000 temperature and humidity sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **hts221** | Driver for HTS221 temperature and humidity sensor. | ISC | `esp32`, `esp32s2`, `esp32c3` | Yes -| **sht3x** | Driver for Sensirion SHT30/SHT31/SHT35 digital temperature and humidity sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **sht4x** | Driver for Sensirion SHT40/SHT41/SHT45 digital temperature and humidity sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **si7021** | Driver for Si7013/Si7020/Si7021/HTU2xD/SHT2x and compatible temperature and humidity sensors | BSD-3 | `esp32`, `esp32c3`, `esp8266`, `esp32s2`, `esp32c3` | Yes +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **aht** | Driver for AHT10/AHT15/AHT20 temperature and humidity sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **am2320** | Driver for AM2320 temperature and humidity sensor (I2C) | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **bme680** | Driver for BME680 digital environmental sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **dht** | Driver for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321), Itead Si7021 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | no | +| **hdc1000** | Driver for HDC1000 temperature and humidity sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **hts221** | Driver for HTS221 temperature and humidity sensor | ISC | esp32, esp32s2, esp32c3 | yes | +| **sht3x** | Driver for Sensirion SHT30/SHT31/SHT35 digital temperature and humidity sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **sht4x** | Driver for Sensirion SHT40/SHT41/SHT45 digital temperature and humidity sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **si7021** | Driver for Si7013/Si7020/Si7021/HTU2xD/SHT2x and compatible temperature and humidity sensors | BSD-3 | esp32, esp32c3, esp8266, esp32s2, esp32c3 | yes | + ### Inertial measurement units -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **icm42670** | Driver for TDK ICM-42670-P 6-Axis IMU (found on ESP-RS board, https://github.com/esp-rs/esp-rust-board) | ICS | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **mpu6050** | Driver for MPU6000/MPU6050 6-axis MotionTracking device | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **icm42670** | Driver for TDK ICM-42670-P 6-Axis IMU | ISC | esp32, esp8266, esp32s2, esp32c3 | yes | +| **mpu6050** | Driver for MPU6000/MPU6050 6-axis MotionTracking device | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | + ### Input device drivers -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **button** | HW timer-based driver for GPIO buttons | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **encoder** | HW timer-based driver for incremental rotary encoders | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **ls7366r** | Driver for LS7366R Quadrature Encoder Counter | MIT | `esp32`, `esp32s2`, `esp32c3` | Yes +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **button** | HW timer-based driver for GPIO buttons | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | +| **encoder** | HW timer-based driver for incremental rotary encoders | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **ls7366r** | Driver for LS7366R Quadrature Encoder Counter | MIT | esp32, esp32s2, esp32c3 | yes | + ### LED drivers -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **ht16k33** | HT16K33 LED controller driver | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **led_strip** | RMT-based driver for WS2812B/SK6812/APA106/SM16703 LED strips | MIT | `esp32`, `esp32s2`, `esp32c3` | Yes -| **led_strip_spi** | SPI-based driver for SK9822/APA102 LED strips | MIT | `esp32`, `esp32c3`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **max7219** | Driver for 8-Digit LED display drivers, MAX7219/MAX7221 | BSD-3 | `esp32`, `esp32s2`, `esp32c3` | Yes +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **ht16k33** | HT16K33 LED controller driver | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | +| **led_strip** | RMT-based driver for WS2812B/SK6812/APA106/SM16703 LED strips | MIT | esp32, esp32s2, esp32c3 | yes | +| **led_strip_spi** | SPI-based driver for SK9822/APA102 LED strips | MIT | esp32, esp32c3, esp8266, esp32s2, esp32c3 | yes | +| **max7219** | Driver for 8-Digit LED display drivers, MAX7219/MAX7221 | BSD-3 | esp32, esp32s2, esp32c3 | yes | + ### Light sensors -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **bh1750** | Driver for BH1750 light sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **tsl2561** | Driver for light-to-digital converter TSL2561 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **tsl2591** | Driver for light-to-digital converter TSL2591 | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **tsl4531** | Driver for digital ambient light sensor TSL4531 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **veml7700** | Driver for VEML7700 ambient light sensor | ISC | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **bh1750** | Driver for BH1750 light sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **tsl2561** | Driver for light-to-digital converter TSL2561 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **tsl2591** | Driver for light-to-digital converter TSL2591 | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | +| **tsl4531** | Driver for digital ambient light sensor TSL4531 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **veml7700** | Driver for VEML7700 ambient light sensor | ISC | esp32, esp8266, esp32s2, esp32c3 | yes | + ### Magnetic sensors -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **hmc5883l** | Driver for 3-axis digital compass HMC5883L and HMC5983L | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **qmc5883l** | Driver for QMC5883L 3-axis magnetic sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **hmc5883l** | Driver for 3-axis digital compass HMC5883L and HMC5983L | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **qmc5883l** | Driver for QMC5883L 3-axis magnetic sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | + ### Other misc libraries -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **ds3502** | Driver for nonvolatile digital potentiometer DS3502 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **example** | An example component | ISC | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **hd44780** | Driver for HD44780 compatible LCD text displays | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | No -| **pca9685** | Driver for 16-channel, 12-bit PWM PCA9685 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **rda5807m** | Driver for single-chip broadcast FM radio tuner RDA5807M | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **tca9548** | Driver for TCA9548A/PCA9548A low-voltage 8-channel I2C switch | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **tda74xx** | Driver for TDA7439/TDA7439DS/TDA7440D audioprocessors | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **ultrasonic** | Driver for ultrasonic range meters, e.g. HC-SR04, HY-SRF05 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | No -| **wiegand** | Wiegand protocol receiver | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | No +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **ds3502** | Driver for nonvolatile digital potentiometer DS3502 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **example** | An example component | ISC | esp32, esp8266, esp32s2, esp32c3 | n/a | +| **hd44780** | Driver for HD44780 compatible LCD text displays | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | no | +| **pca9685** | Driver for 16-channel, 12-bit PWM PCA9685 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **rda5807m** | Driver for single-chip broadcast FM radio tuner RDA5807M | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **tca9548** | Driver for TCA9548A/PCA9548A low-voltage 8-channel I2C switch | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **tda74xx** | Driver for TDA7439/TDA7439DS/TDA7440D audioprocessors | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | +| **ultrasonic** | Driver for ultrasonic range meters, e.g. HC-SR04, HY-SRF05 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | no | +| **wiegand** | Wiegand protocol receiver | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | no | + ### Pressure sensors -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **bme680** | Driver for BME680 digital environmental sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **bmp180** | Driver for BMP180 digital pressure sensor | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **bmp280** | Driver for BMP280/BME280 digital pressure sensor | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **dps310** | Driver for DPS310 barometric pressure sensor | ISC | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **ms5611** | Driver for barometic pressure sensor MS5611-01BA03 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **bme680** | Driver for BME680 digital environmental sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **bmp180** | Driver for BMP180 digital pressure sensor | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | +| **bmp280** | Driver for BMP280/BME280 digital pressure sensor | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | +| **dps310** | Driver for DPS310 barometric pressure sensor | ISC | esp32, esp8266, esp32s2, esp32c3 | yes | +| **ms5611** | Driver for barometic pressure sensor MS5611-01BA03 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | + ### Real-time clocks -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **ds1302** | Driver for DS1302 RTC module | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | No -| **ds1307** | Driver for DS1307 RTC module | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **ds3231** | Driver for DS1337 RTC and DS3231 high precision RTC module | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **pcf8563** | Driver for PCF8563 real-time clock/calendar | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **ds1302** | Driver for DS1302 RTC module | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | no | +| **ds1307** | Driver for DS1307 RTC module | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **ds3231** | Driver for DS1337 RTC and DS3231 high precision RTC module | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | +| **pcf8563** | Driver for PCF8563 real-time clock/calendar | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | + ### Temperature sensors -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -| **aht** | Driver for AHT10/AHT15/AHT20 temperature and humidity sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **am2320** | Driver for AM2320 temperature and humidity sensor (I2C) | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **bh1900nux** | Driver for BH1900NUX temperature sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **bme680** | Driver for BME680 digital environmental sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **bmp180** | Driver for BMP180 digital pressure sensor | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **bmp280** | Driver for BMP280/BME280 digital pressure sensor | MIT | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **dht** | Driver for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321), Itead Si7021 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | No -| **dps310** | Driver for DPS310 barometric pressure sensor | ISC | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **ds18x20** | Driver for DS18B20/DS18S20 families of 1-Wire temperature sensor ICs | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | No -| **hdc1000** | Driver for HDC1000 temperature and humidity sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **hts221** | Driver for HTS221 temperature and humidity sensor. | ISC | `esp32`, `esp32s2`, `esp32c3` | Yes -| **lm75** | Driver for LM75, a digital temperature sensor and thermal watchdog | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **max31725** | Driver for MAX31725/MAX31726 temperature sensors | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **max31855** | Driver for MAX31855 cold-junction compensated thermocouple-to-digital converter | BSD-3 | `esp32`, `esp32s2`, `esp32c3` | Yes -| **max31865** | Driver for MAX31865 resistance converter for platinum RTDs | BSD-3 | `esp32`, `esp32s2`, `esp32c3` | Yes -| **mcp960x** | Driver for MCP9600/MCP9601, thermocouple EMF to temperature converter | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **mcp9808** | Driver for MCP9808 Digital Temperature Sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **ms5611** | Driver for barometic pressure sensor MS5611-01BA03 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **sht3x** | Driver for Sensirion SHT30/SHT31/SHT35 digital temperature and humidity sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **sht4x** | Driver for Sensirion SHT40/SHT41/SHT45 digital temperature and humidity sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **si7021** | Driver for Si7013/Si7020/Si7021/HTU2xD/SHT2x and compatible temperature and humidity sensors | BSD-3 | `esp32`, `esp32c3`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **sts21** | Driver for STS21 temperature sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **sts3x** | Driver for Sensirion STS30/STS31/STS35 digital temperature sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes -| **tsys01** | Driver for precision digital temperature sensor TSYS01 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +| **aht** | Driver for AHT10/AHT15/AHT20 temperature and humidity sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **am2320** | Driver for AM2320 temperature and humidity sensor (I2C) | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **bh1900nux** | Driver for BH1900NUX temperature sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **bme680** | Driver for BME680 digital environmental sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **bmp180** | Driver for BMP180 digital pressure sensor | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | +| **bmp280** | Driver for BMP280/BME280 digital pressure sensor | MIT | esp32, esp8266, esp32s2, esp32c3 | yes | +| **dht** | Driver for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321), Itead Si7021 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | no | +| **dps310** | Driver for DPS310 barometric pressure sensor | ISC | esp32, esp8266, esp32s2, esp32c3 | yes | +| **ds18x20** | Driver for DS18B20/DS18S20 families of 1-Wire temperature sensor ICs | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | no | +| **hdc1000** | Driver for HDC1000 temperature and humidity sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **hts221** | Driver for HTS221 temperature and humidity sensor | ISC | esp32, esp32s2, esp32c3 | yes | +| **lm75** | Driver for LM75, a digital temperature sensor and thermal watchdog | ISC | esp32, esp8266, esp32s2, esp32c3 | yes | +| **max31725** | Driver for MAX31725/MAX31726 temperature sensors | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **max31855** | Driver for MAX31855 cold-junction compensated thermocouple-to-digital converter | BSD-3 | esp32, esp32s2, esp32c3 | yes | +| **max31865** | Driver for MAX31865 resistance converter for platinum RTDs | BSD-3 | esp32, esp32s2, esp32c3 | yes | +| **mcp960x** | Driver for MCP9600/MCP9601, thermocouple EMF to temperature converter | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **mcp9808** | Driver for MCP9808 Digital Temperature Sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **ms5611** | Driver for barometic pressure sensor MS5611-01BA03 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **sht3x** | Driver for Sensirion SHT30/SHT31/SHT35 digital temperature and humidity sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **sht4x** | Driver for Sensirion SHT40/SHT41/SHT45 digital temperature and humidity sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **si7021** | Driver for Si7013/Si7020/Si7021/HTU2xD/SHT2x and compatible temperature and humidity sensors | BSD-3 | esp32, esp32c3, esp8266, esp32s2, esp32c3 | yes | +| **sts21** | Driver for STS21 temperature sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **sts3x** | Driver for Sensirion STS30/STS31/STS35 digital temperature sensor | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | +| **tsys01** | Driver for precision digital temperature sensor TSYS01 | BSD-3 | esp32, esp8266, esp32s2, esp32c3 | yes | ## Library maintainers @@ -290,35 +292,41 @@ or [GitLab examples](https://gitlab.com/UncleRus/esp-idf-lib/tree/master/example ## Credits -- [Tomoyuki Sakurai](https://github.com/trombik), developer of the LM75 and - SK9822/APA102 drivers, author of the RTOS SDK ESP82666 support, master CI -- [Gunar Schorcht](https://github.com/gschorcht), developer of SHT3x, BME680 - and CCS811 drivers -- [Brian Schwind](https://github.com/bschwind), developer of TS2561 and - TSL4531 drivers -- [Andrej Krutak](https://github.com/andree182), developer of BH1750 driver -- Frank Bargstedt, developer of BMP180 driver -- [sheinz](https://github.com/sheinz), developer of BMP280 driver -- [Jonathan Hartsuiker](https://github.com/jsuiker), developer of DHT driver -- [Grzegorz Hetman](https://github.com/hetii), developer of DS18B20 driver -- [Alex Stewart](https://github.com/astewart-consensus), developer of DS18B20 driver -- [Richard A Burton](mailto:richardaburton@gmail.com), developer of DS3231 driver -- [Bhuvanchandra DV](https://github.com/bhuvanchandra), developer of DS3231 driver -- [Zaltora](https://github.com/Zaltora), developer of INA3231 driver -- [Bernhard Guillon](https://gitlab.com/mrnice), developer of MS5611-01BA03 driver -- [Pham Ngoc Thanh](https://github.com/panoti), developer of PCF8591 driver -- [Lucio Tarantino](https://github.com/dianlight), developer of ADS111x driver -- [Julian Dörner](https://github.com/juliandoerner), developer of TSL2591 driver -- [FastLED community](https://github.com/FastLED), developers of `lib8tion`, - `color` and `noise` libraries -- [Erriez](https://github.com/Erriez), developer of MH-Z19B driver -- [David Douard](https://github.com/douardda), developer of MH-Z19B driver -- [Nate Usher](https://github.com/nated0g), developer of SCD30 driver -- [Josh Kallus](https://github.com/Jkallus), developer of LS7366R driver -- [saasaa](https://github.com/saasaa), developer of HTS221 driver -- [Timofei Korostelev](https://github.com/chudsaviet), developer of HT16K33 driver -- [Jose Manuel Perez](https://github.com/jmpmscorp), developer of LC709203F driver -- [Weslley Duarte](https://github.com/weslleymfd), developer of ADS130E08 driver -- [Jan Veeh](https://github.com/janveeh), developer of ICM42670 driver -- [Marc Luehr](https://github.com/Th3Link), developer of VEML7700 driver -- [Joshua Butler, MD, MHI](https://github.com/shuki25), developer of MAX1704x driver +- [Alex Stewart](https://github.com/astewart-consensus): `ds18x20` +- [Alexander Bodenseher](https://github.com/saasaa): `hts221` +- [Andrej Krutak](https://github.com/andree182): `bh1750` +- Angelo Elias Dalzotto: `mpu6050` +- [BernhardG](https://gitlab.com/mrnice): `ms5611` +- [BhuvanchandraD](https://github.com/bhuvanchandra): `ds3231` +- [Brian Schwind](https://github.com/bschwind): `tsl2561` `tsl4531` +- [Christian Skjerning](https://github.com/slimcdk): `sts3x` +- [David Douard](https://github.com/douardda): `mhz19b` +- [Erriez](https://github.com/Erriez): `mhz19b` +- [FastLED project](https://github.com/FastLED): `color` `lib8tion` `noise` +- Frank Bargstedt: `bmp180` +- Gabriel Boni Vicari: `mpu6050` +- [Grupo de Pesquisa em Cultura Digital](http://gepid.upf.br/): `mpu6050` +- GrzegorzH: `ds18x20` +- [Gunar Schorcht](https://github.com/gschorcht): `bme680` `ccs811` `sht3x` `sts3x` +- [Jan Veeh](https://github.com/janveeh): `icm42670` +- [Jeff Rowberg](https://www.i2cdevlib.com/): `mpu6050` +- [Jose Manuel Perez](https://github.com/jmpmscorp): `lc709203f` `sgm58031` +- [Joshua Butler](https://github.com/shuki25): `max1704x` +- [Joshua Kallus](https://github.com/Jkallus): `ls7366r` +- [jsuiker](https://github.com/jsuiker): `dht` +- [Julian Doerner](https://github.com/juliandoerner): `tsl2591` +- [Lucio Tarantino](https://github.com/dianlight): `ads111x` +- [Marc Luehr](https://github.com/th3link): `veml7700` +- [Nate Usher](https://github.com/nated0g): `scd30` +- Pavel Merzlyakov: `ds1302` +- [Raghav Jha](https://github.com/horsemann07): `mpu6050` +- RichardA: `ds3231` +- [Ruslan V. Uss](https://github.com/UncleRus): `ads111x` `aht` `am2320` `bh1750` `bh1900nux` `bme680` `bmp180` `bmp280` `button` `ccs811` `dht` `ds1302` `ds1307` `ds18x20` `ds3231` `ds3502` `encoder` `framebuffer` `hd44780` `hdc1000` `hmc5883l` `hx711` `i2cdev` `ina219` `ina260` `ina3221` `led_strip` `led_strip_spi` `max31725` `max31855` `max31865` `max7219` `mcp23008` `mcp23x17` `mcp342x` `mcp4725` `mcp960x` `mcp9808` `mpu6050` `ms5611` `onewire` `pca9557` `pca9685` `pcf8563` `pcf8574` `pcf8575` `pcf8591` `qmc5883l` `rda5807m` `scd30` `scd4x` `sgp40` `sht3x` `sht4x` `si7021` `sts21` `sts3x` `tca9548` `tca95x5` `tda74xx` `tsl2561` `tsl4531` `tsys01` `ultrasonic` `wiegand` +- [Sensirion AG](https://github.com/Sensirion): `scd30` `scd4x` +- [sheinz](https://github.com/sheinz): `bmp280` +- [Thanh Pham](https://github.com/panoti): `pcf8591` +- [Timofei Korostelev](https://github.com/chudsaviet): `ht16k33` +- [Tomoyuki Sakurai](https://github.com/trombik): `dps310` `esp_idf_lib_helpers` `example` `led_strip_spi` `lm75` +- [Weslley Duarte](https://github.com/weslleymfd): `ads130e08` +- [Zaltora](https://github.com/Zaltora): `ina3221` +- zeroday: `onewire` \ No newline at end of file diff --git a/components/ads111x/.eil.yml b/components/ads111x/.eil.yml index ca2ea18c..c43c3038 100644 --- a/components/ads111x/.eil.yml +++ b/components/ads111x/.eil.yml @@ -1,26 +1,21 @@ ---- -components: - - name: ads111x - description: | - Driver for ADS1113/ADS1114/ADS1115 and ADS1013/ADS1014/ADS1015 I2C ADC - group: adc-dac - groups: [] - code_owners: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2016 - - name: dianlight - year: 2020 +name: ads111x +description: Driver for ADS1113/ADS1114/ADS1115 and ADS1013/ADS1014/ADS1015 I2C ADC +groups: + - adc-dac +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2016 + - name: dianlight + year: 2020 diff --git a/components/ads130e08/.eil.yml b/components/ads130e08/.eil.yml index 2f75dbb2..01a6c651 100644 --- a/components/ads130e08/.eil.yml +++ b/components/ads130e08/.eil.yml @@ -1,20 +1,16 @@ ---- -components: - - name: ads130e08 - description: Driver for ADS130E08 ADC - group: adc-dac - groups: [] - code_owners: weslleymfd - depends: - - driver - - log - thread_safe: yes - targets: - - name: esp32 - - name: esp32s3 - licenses: - - name: MIT - copyrights: - - author: - name: weslleymfd - year: 2021 +name: ads130e08 +description: Driver for ADS130E08 ADC +groups: + - adc-dac +code_owners: weslleymfd +depends: + - driver + - log +thread_safe: yes +targets: + - esp32 + - esp32s3 +license: MIT +copyrights: + - name: weslleymfd + year: 2021 diff --git a/components/aht/.eil.yml b/components/aht/.eil.yml index 27ee7700..954a09b5 100644 --- a/components/aht/.eil.yml +++ b/components/aht/.eil.yml @@ -1,25 +1,21 @@ ---- -components: - - name: aht - description: | - Driver for AHT10/AHT15/AHT20 temperature and humidity sensor - group: temperature - groups: - - humidity - code_owners: - - name: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2021 +name: aht +description: Driver for AHT10/AHT15/AHT20 temperature and humidity sensor +groups: + - temperature + - humidity +code_owners: + - UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2021 diff --git a/components/am2320/.eil.yml b/components/am2320/.eil.yml index 0520c58b..08b70c00 100644 --- a/components/am2320/.eil.yml +++ b/components/am2320/.eil.yml @@ -1,25 +1,21 @@ ---- -components: - - name: am2320 - description: | - Driver for AM2320 temperature and humidity sensor (I2C) - group: temperature - groups: - - humidity - code_owners: - - name: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2023 +name: am2320 +description: Driver for AM2320 temperature and humidity sensor (I2C) +groups: + - temperature + - humidity +code_owners: + - UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2023 diff --git a/components/bh1750/.eil.yml b/components/bh1750/.eil.yml index 8b338d6e..3e4b6934 100644 --- a/components/bh1750/.eil.yml +++ b/components/bh1750/.eil.yml @@ -1,26 +1,22 @@ ---- -components: - - name: bh1750 - description: Driver for BH1750 light sensor - group: - name: light - groups: [] - code_owners: - - name: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2018 - - name: Andrej - year: 2017 +name: bh1750 +description: Driver for BH1750 light sensor +groups: + - light +code_owners: + - UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2018 + - name: Andrej + year: 2017 diff --git a/components/bh1900nux/.eil.yml b/components/bh1900nux/.eil.yml index ac77e773..13f2599b 100644 --- a/components/bh1900nux/.eil.yml +++ b/components/bh1900nux/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: bh1900nux - description: Driver for BH1900NUX temperature sensor - group: temperature - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2021 +name: bh1900nux +description: Driver for BH1900NUX temperature sensor +groups: + - temperature +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2021 diff --git a/components/bme680/.eil.yml b/components/bme680/.eil.yml index 0480d03b..d234f958 100644 --- a/components/bme680/.eil.yml +++ b/components/bme680/.eil.yml @@ -1,29 +1,24 @@ ---- -components: - - name: bme680 - description: | - Driver for BME680 digital environmental sensor - group: - name: pressure - groups: - - name: humidity - - name: temperature - code_owners: - - name: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2019 - - name: gschorcht - year: 2017 +name: bme680 +description: Driver for BME680 digital environmental sensor +groups: + - pressure + - humidity + - temperature +code_owners: + - UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: gschorcht + year: 2017 + - name: UncleRus + year: 2019 diff --git a/components/bmp180/.eil.yml b/components/bmp180/.eil.yml index dbf998ae..0bc595a0 100644 --- a/components/bmp180/.eil.yml +++ b/components/bmp180/.eil.yml @@ -1,28 +1,23 @@ ---- -components: - - name: bmp180 - description: | - Driver for BMP180 digital pressure sensor - group: - name: pressure - groups: - - name: temperature - code_owners: - - name: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - name: UncleRus - year: 2018 - - name: FrankB - year: 2015 +name: bmp180 +description: Driver for BMP180 digital pressure sensor +groups: + - pressure + - temperature +code_owners: + - UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: FrankB + year: 2015 + - name: UncleRus + year: 2018 diff --git a/components/bmp280/.eil.yml b/components/bmp280/.eil.yml index 9e5fd2ae..c6438620 100644 --- a/components/bmp280/.eil.yml +++ b/components/bmp280/.eil.yml @@ -1,28 +1,23 @@ ---- -components: - - name: bmp280 - description: | - Driver for BMP280/BME280 digital pressure sensor - group: - name: pressure - groups: - - name: temperature - code_owners: - - name: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - name: UncleRus - year: 2018 - - name: sheinz - year: 2016 +name: bmp280 +description: Driver for BMP280/BME280 digital pressure sensor +groups: + - pressure + - temperature +code_owners: + - UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: sheinz + year: 2016 + - name: UncleRus + year: 2018 diff --git a/components/button/.eil.yml b/components/button/.eil.yml index fbb949ef..88d30428 100644 --- a/components/button/.eil.yml +++ b/components/button/.eil.yml @@ -1,22 +1,18 @@ ---- -components: - - name: button - description: | - HW timer-based driver for GPIO buttons - group: input - groups: [] - code_owners: - - name: UncleRus - depends: - - name: driver - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - name: UncleRus - year: 2021 +name: button +description: HW timer-based driver for GPIO buttons +groups: + - input +code_owners: + - UncleRus +depends: + - driver +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: UncleRus + year: 2021 diff --git a/components/ccs811/.eil.yml b/components/ccs811/.eil.yml index edd08bd5..beaa3eee 100644 --- a/components/ccs811/.eil.yml +++ b/components/ccs811/.eil.yml @@ -1,27 +1,23 @@ ---- -components: - - name: ccs811 - description: | - Driver for AMS CCS811 digital gas sensor - group: air-quality - groups: - - name: gas - code_owners: - - name: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2021 - - name: gschorcht - year: 2017 +name: ccs811 +description: Driver for AMS CCS811 digital gas sensor +groups: + - air-quality + - gas +code_owners: + - UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2021 + - name: gschorcht + year: 2017 diff --git a/components/color/.eil.yml b/components/color/.eil.yml index cc2ef67c..d94561be 100644 --- a/components/color/.eil.yml +++ b/components/color/.eil.yml @@ -1,22 +1,18 @@ ---- -components: - - name: color - description: | - Common library for RGB and HSV colors - group: common - groups: [] - code_owners: - - name: UncleRus - depends: - - name: lib8tion - thread_safe: N/A - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - name: FastLED - year: 2013 +name: color +description: Common library for RGB and HSV colors +groups: + - common +code_owners: + - UncleRus +depends: + - lib8tion +thread_safe: n/a +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: FastLED + year: 2013 diff --git a/components/dht/.eil.yml b/components/dht/.eil.yml index 8bfd2586..4f8849ad 100644 --- a/components/dht/.eil.yml +++ b/components/dht/.eil.yml @@ -1,28 +1,24 @@ ---- -components: - - name: dht - description: | - Driver for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321), Itead Si7021 - group: humidity - groups: - - name: temperature - code_owners: - - name: UncleRus - depends: - - name: log - - name: esp_idf_lib_helpers - - name: freertos - - name: driver - thread_safe: no - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2018 - - name: jsuiker - year: 2016 +name: dht +description: Driver for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321), Itead Si7021 +groups: + - humidity + - temperature +code_owners: + - UncleRus +depends: + - log + - esp_idf_lib_helpers + - freertos + - driver +thread_safe: no +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2018 + - name: jsuiker + year: 2016 diff --git a/components/dps310/.eil.yml b/components/dps310/.eil.yml index d5c13b6e..3189b0f4 100644 --- a/components/dps310/.eil.yml +++ b/components/dps310/.eil.yml @@ -1,26 +1,21 @@ ---- -components: - - name: dps310 - description: | - Driver for DPS310 barometric pressure sensor - group: - name: pressure - groups: - - name: temperature - code_owners: - - name: trombik - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: ISC - copyrights: - - name: trombik - year: 2022 +name: dps310 +description: Driver for DPS310 barometric pressure sensor +groups: + - pressure + - temperature +code_owners: + - trombik +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: ISC +copyrights: + - name: trombik + year: 2022 diff --git a/components/ds1302/.eil.yml b/components/ds1302/.eil.yml index 9c11e2fb..33224a0b 100644 --- a/components/ds1302/.eil.yml +++ b/components/ds1302/.eil.yml @@ -1,27 +1,23 @@ ---- -components: - - name: ds1302 - description: | - Driver for DS1302 RTC module - group: rtc - groups: [] - code_owners: - - name: UncleRus - depends: - - name: log - - name: esp_idf_lib_helpers - - name: freertos - - name: driver - thread_safe: no - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2021 - - name: PavelM - year: 2016 +name: ds1302 +description: Driver for DS1302 RTC module +groups: + - rtc +code_owners: + - UncleRus +depends: + - log + - esp_idf_lib_helpers + - freertos + - driver +thread_safe: no +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: PavelM + year: 2016 + - name: UncleRus + year: 2021 diff --git a/components/ds1307/.eil.yml b/components/ds1307/.eil.yml index dc4386cc..a2878f80 100644 --- a/components/ds1307/.eil.yml +++ b/components/ds1307/.eil.yml @@ -1,24 +1,20 @@ ---- -components: - - name: ds1307 - description: | - Driver for DS1307 RTC module - group: rtc - groups: [] - code_owners: - - name: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2016 +name: ds1307 +description: Driver for DS1307 RTC module +groups: + - rtc +code_owners: + - UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2016 diff --git a/components/ds18x20/.eil.yml b/components/ds18x20/.eil.yml index 0de093b6..7151e55b 100644 --- a/components/ds18x20/.eil.yml +++ b/components/ds18x20/.eil.yml @@ -1,29 +1,25 @@ ---- -components: - - name: ds18x20 - description: | - Driver for DS18B20/DS18S20 families of 1-Wire temperature sensor ICs - group: temperature - groups: [] - code_owners: - - name: UncleRus - depends: - - name: log - - name: esp_idf_lib_helpers - - name: onewire - - name: freertos - thread_safe: no - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2018 - - name: AlexS - year: 2016 - - name: GrzegorzH - year: 2016 +name: ds18x20 +description: Driver for DS18B20/DS18S20 families of 1-Wire temperature sensor ICs +groups: + - temperature +code_owners: + - UncleRus +depends: + - log + - esp_idf_lib_helpers + - onewire + - freertos +thread_safe: no +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: GrzegorzH + year: 2016 + - name: AlexS + year: 2016 + - name: UncleRus + year: 2018 diff --git a/components/ds3231/.eil.yml b/components/ds3231/.eil.yml index 5ef0cdb1..6d20e250 100644 --- a/components/ds3231/.eil.yml +++ b/components/ds3231/.eil.yml @@ -1,28 +1,24 @@ ---- -components: - - name: ds3231 - description: | - Driver for DS1337 RTC and DS3231 high precision RTC module - group: rtc - groups: [] - code_owners: - - name: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - name: UncleRus - year: 2018 - - name: BhuvanchandraD - year: 2016 - - name: RichardA - year: 2015 +name: ds3231 +description: Driver for DS1337 RTC and DS3231 high precision RTC module +groups: + - rtc +code_owners: + - UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: RichardA + year: 2015 + - name: BhuvanchandraD + year: 2016 + - name: UncleRus + year: 2018 diff --git a/components/ds3502/.eil.yml b/components/ds3502/.eil.yml index 5f1f3a99..105cf3e7 100644 --- a/components/ds3502/.eil.yml +++ b/components/ds3502/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: ds3502 - description: | - Driver for nonvolatile digital potentiometer DS3502 - group: misc - groups: [] - code_owners: - - name: UncleRus - depends: - - name: i2cdev - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2021 +name: ds3502 +description: Driver for nonvolatile digital potentiometer DS3502 +groups: + - misc +code_owners: + - UncleRus +depends: + - i2cdev + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2021 diff --git a/components/encoder/.eil.yml b/components/encoder/.eil.yml index 32ce9e93..08b2c08e 100644 --- a/components/encoder/.eil.yml +++ b/components/encoder/.eil.yml @@ -1,24 +1,21 @@ ---- -components: - - name: encoder - description: | - HW timer-based driver for incremental rotary encoders - group: input - groups: [] - code_owners: - - name: UncleRus - depends: - - name: driver - - name: freertos - - name: log - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2019 +name: encoder +description: | + HW timer-based driver for incremental rotary encoders +groups: + - input +code_owners: + - UncleRus +depends: + - driver + - freertos + - log +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2019 diff --git a/components/esp_idf_lib_helpers/.eil.yml b/components/esp_idf_lib_helpers/.eil.yml index 111ed010..e0e1ec80 100644 --- a/components/esp_idf_lib_helpers/.eil.yml +++ b/components/esp_idf_lib_helpers/.eil.yml @@ -1,23 +1,20 @@ ---- -components: - - name: esp_idf_lib_helpers - description: | - Common support library for esp-idf-lib - group: common - groups: [] - code_owners: - - name: UncleRus - - name: trombik - depends: - - name: freertos - thread_safe: N/A - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: ISC - copyrights: - - name: trombik - year: 2019 +name: esp_idf_lib_helpers +description: | + Common support library for esp-idf-lib +groups: + - common +code_owners: + - trombik + - UncleRus +depends: + - freertos +thread_safe: n/a +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: ISC +copyrights: + - name: trombik + year: 2019 diff --git a/components/example/.eil.yml b/components/example/.eil.yml index d46f8292..1557e452 100644 --- a/components/example/.eil.yml +++ b/components/example/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: example - description: An example component - group: misc - groups: [] - code_owners: trombik - depends: - # FIXME conditional depends - - name: driver - - name: log - thread_safe: N/A - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: ISC - copyrights: - - author: - name: trombik - year: 2021 +name: example +description: An example component +groups: + - misc +code_owners: trombik +depends: + # FIXME conditional depends + - driver + - log +thread_safe: n/a # yes, no, n/a +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: ISC +copyrights: + - name: trombik + year: 2021 diff --git a/components/framebuffer/.eil.yml b/components/framebuffer/.eil.yml index 0d8ec259..f869c156 100644 --- a/components/framebuffer/.eil.yml +++ b/components/framebuffer/.eil.yml @@ -1,21 +1,17 @@ ---- -components: - - name: framebuffer - description: RGB framebuffer component - group: common - groups: [] - code_owners: UncleRus - depends: - - name: log - - name: color - thread_safe: N/A - targets: - - name: esp32 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - author: - name: UncleRus - year: 2021 +name: framebuffer +description: RGB framebuffer component +groups: + - common +code_owners: UncleRus +depends: + - log + - color +thread_safe: N/A +targets: + - esp32 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: UncleRus + year: 2021 diff --git a/components/hd44780/.eil.yml b/components/hd44780/.eil.yml index a2a05f24..3a1ff7e3 100644 --- a/components/hd44780/.eil.yml +++ b/components/hd44780/.eil.yml @@ -1,22 +1,19 @@ ---- -components: - - name: hd44780 - description: | - Driver for HD44780 compatible LCD text displays - group: misc - groups: [] - code_owners: - - name: UncleRus - depends: - - name: driver - thread_safe: no - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2016 +name: hd44780 +description: | + Driver for HD44780 compatible LCD text displays +groups: + - misc +code_owners: + - UncleRus +depends: + - driver +thread_safe: no +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2016 diff --git a/components/hdc1000/.eil.yml b/components/hdc1000/.eil.yml index cefea3da..189f539a 100644 --- a/components/hdc1000/.eil.yml +++ b/components/hdc1000/.eil.yml @@ -1,25 +1,22 @@ ---- -components: - - name: hdc1000 - description: | - Driver for HDC1000 temperature and humidity sensor - group: temperature - groups: - - humidity - code_owners: - - name: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2021 +name: hdc1000 +description: | + Driver for HDC1000 temperature and humidity sensor +groups: + - temperature + - humidity +code_owners: + - UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2021 diff --git a/components/hmc5883l/.eil.yml b/components/hmc5883l/.eil.yml index 013bd3cc..f2e105dc 100644 --- a/components/hmc5883l/.eil.yml +++ b/components/hmc5883l/.eil.yml @@ -1,24 +1,21 @@ ---- -components: - - name: hmc5883l - description: | - Driver for 3-axis digital compass HMC5883L and HMC5983L - group: magnetic - groups: [] - code_owners: - - name: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2016 +name: hmc5883l +description: | + Driver for 3-axis digital compass HMC5883L and HMC5983L +groups: + - magnetic +code_owners: + - UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2016 diff --git a/components/ht16k33/.eil.yml b/components/ht16k33/.eil.yml index 8fce5308..a857b025 100644 --- a/components/ht16k33/.eil.yml +++ b/components/ht16k33/.eil.yml @@ -1,22 +1,18 @@ ---- -components: - - name: ht16k33 - description: HT16K33 LED controller driver - group: led - groups: [] - code_owners: chudsaviet - depends: - - name: i2cdev - - name: log - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - author: - name: chudsaviet - year: 2022 +name: ht16k33 +description: HT16K33 LED controller driver +groups: + - led +code_owners: chudsaviet +depends: + - i2cdev + - log +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: chudsaviet + year: 2022 diff --git a/components/hts221/.eil.yml b/components/hts221/.eil.yml index cdc440a9..5beaaae6 100644 --- a/components/hts221/.eil.yml +++ b/components/hts221/.eil.yml @@ -1,24 +1,21 @@ ---- -components: - - name: hts221 - description: | - Driver for HTS221 temperature and humidity sensor. - group: temperature - groups: - - humidity - code_owners: - -name: saasaa - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: N/A - targets: - - name: esp32 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: ISC - copyrights: - - name: saasaa - year: 2021 +name: hts221 +description: | + Driver for HTS221 temperature and humidity sensor. +groups: + - temperature + - humidity +code_owners: + - saasaa +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp32s2 + - esp32c3 +license: ISC +copyrights: + - name: saasaa + year: 2021 diff --git a/components/hx711/.eil.yml b/components/hx711/.eil.yml index cc7f449f..f823dc62 100644 --- a/components/hx711/.eil.yml +++ b/components/hx711/.eil.yml @@ -1,24 +1,21 @@ ---- -components: - - name: hx711 - description: | - Driver for HX711 24-bit ADC for weigh scales - group: adc-dac - groups: [] - code_owners: - - name: UncleRus - depends: - - name: driver - - name: freertos - - name: esp_idf_lib_helpers - thread_safe: no - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2019 +name: hx711 +description: | + Driver for HX711 24-bit ADC for weigh scales +groups: + - adc-dac +code_owners: + - UncleRus +depends: + - driver + - freertos + - esp_idf_lib_helpers +thread_safe: no +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2019 diff --git a/components/i2cdev/.eil.yml b/components/i2cdev/.eil.yml index 5f404d61..460d7a01 100644 --- a/components/i2cdev/.eil.yml +++ b/components/i2cdev/.eil.yml @@ -1,24 +1,20 @@ ---- -components: - - name: i2cdev - description: | - ESP-IDF I2C master thread-safe utilities - group: common - groups: [] - code_owners: - - name: UncleRus - depends: - - name: driver - - name: freertos - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - name: UncleRus - year: 2018 +name: i2cdev +description: ESP-IDF I2C master thread-safe utilities +groups: + - common +code_owners: + - UncleRus +depends: + - driver + - freertos + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: UncleRus + year: 2018 diff --git a/components/icm42670/.eil.yml b/components/icm42670/.eil.yml index 514f8ca9..e76bd0ea 100644 --- a/components/icm42670/.eil.yml +++ b/components/icm42670/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: icm42670 - description: Driver for TDK ICM-42670-P 6-Axis IMU (found on ESP-RS board, https://github.com/esp-rs/esp-rust-board) - group: imu - groups: [] - code_owners: janveeh - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: ICS - copyrights: - - author: - name: janveeh - year: 2022 +name: icm42670 +description: Driver for TDK ICM-42670-P 6-Axis IMU +groups: + - imu +code_owners: janveeh +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: ISC +copyrights: + - name: janveeh + year: 2022 diff --git a/components/ina219/.eil.yml b/components/ina219/.eil.yml index e6661747..4ed153fa 100644 --- a/components/ina219/.eil.yml +++ b/components/ina219/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: ina219 - description: Driver for INA219/INA220 bidirectional current/power monitor - group: current - groups: [] - code_owners: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2019 +name: ina219 +description: Driver for INA219/INA220 bidirectional current/power monitor +groups: + - current +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2019 diff --git a/components/ina260/.eil.yml b/components/ina260/.eil.yml index f8a9aa4d..93a7b27f 100644 --- a/components/ina260/.eil.yml +++ b/components/ina260/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: ina260 - description: Driver for INA260 precision digital current and power monitor - group: current - groups: [] - code_owners: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2020 +name: ina260 +description: Driver for INA260 precision digital current and power monitor +groups: + - current +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2020 diff --git a/components/ina3221/.eil.yml b/components/ina3221/.eil.yml index 2e02cf7c..8cbe63b4 100644 --- a/components/ina3221/.eil.yml +++ b/components/ina3221/.eil.yml @@ -1,26 +1,21 @@ ---- -components: - - name: ina3221 - description: Driver for INA3221 shunt and bus voltage monitor - group: current - groups: [] - code_owners: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: ISC - copyrights: - - author: - name: UncleRus - year: 2019 - - author: - name: Zaltora - year: 2016 +name: ina3221 +description: Driver for INA3221 shunt and bus voltage monitor +groups: + - current +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: Zaltora + year: 2016 + - name: UncleRus + year: 2019 diff --git a/components/lc709203f/.eil.yml b/components/lc709203f/.eil.yml index 7fd0c06f..a596616b 100644 --- a/components/lc709203f/.eil.yml +++ b/components/lc709203f/.eil.yml @@ -1,23 +1,18 @@ ---- -components: - - name: lc709203f - description: | - Driver for LC709203F battery fuel gauge - group: battery - groups: [] - code_owners: jmpmscorp - depends: - - name: i2cdev - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: ISC - copyrights: - - author: - name: jmpmscorp - year: 2022 +name: lc709203f +description: Driver for LC709203F battery fuel gauge +groups: + - battery +code_owners: jmpmscorp +depends: + - i2cdev + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: ISC +copyrights: + - name: jmpmscorp + year: 2022 diff --git a/components/led_strip/.eil.yml b/components/led_strip/.eil.yml index 830f1dd5..fea5c1ef 100644 --- a/components/led_strip/.eil.yml +++ b/components/led_strip/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: led_strip - description: RMT-based driver for WS2812B/SK6812/APA106/SM16703 LED strips - group: led - groups: [] - code_owners: UncleRus - depends: - - name: driver - - name: log - - name: color - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - author: - name: UncleRus - year: 2020 +name: led_strip +description: RMT-based driver for WS2812B/SK6812/APA106/SM16703 LED strips +groups: + - led +code_owners: UncleRus +depends: + - driver + - log + - color + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: UncleRus + year: 2020 diff --git a/components/led_strip_spi/.eil.yml b/components/led_strip_spi/.eil.yml index fcb797e0..514f4699 100644 --- a/components/led_strip_spi/.eil.yml +++ b/components/led_strip_spi/.eil.yml @@ -1,28 +1,23 @@ ---- -components: - - name: led_strip_spi - description: SPI-based driver for SK9822/APA102 LED strips - group: led - groups: [] - code_owners: trombik - depends: - # XXX conditional depends - - name: log - - name: color - - name: esp_idf_lib_helpers - thread_safe: N/A - targets: - - name: esp32 - - name: esp32c3 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - author: - name: UncleRus - year: 2020 - - author: - name: trombik - year: 2021 +name: led_strip_spi +description: SPI-based driver for SK9822/APA102 LED strips +groups: + - led +code_owners: trombik +depends: + # XXX conditional depends + - log + - color + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp32c3 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: trombik + year: 2021 + - name: UncleRus + year: 2020 diff --git a/components/lib8tion/.eil.yml b/components/lib8tion/.eil.yml index 69210efa..451bd38c 100644 --- a/components/lib8tion/.eil.yml +++ b/components/lib8tion/.eil.yml @@ -1,20 +1,16 @@ ---- -components: - - name: lib8tion - description: Math functions specifically designed for LED programming - group: common - groups: [] - code_owners: UncleRus - depends: [] - thread_safe: N/A - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - author: - name: FastLED - year: 2013 +name: lib8tion +description: Math functions specifically designed for LED programming +groups: + - common +code_owners: UncleRus +depends: [] +thread_safe: N/A +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: FastLED + year: 2013 diff --git a/components/lm75/.eil.yml b/components/lm75/.eil.yml index 18e32228..14480991 100644 --- a/components/lm75/.eil.yml +++ b/components/lm75/.eil.yml @@ -1,24 +1,21 @@ ---- -components: - - name: lm75 - description: | - Driver for LM75, a digital temperature sensor and thermal watchdog - group: temperature - groups: [] - code_owners: - - name: trombik - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: trombik - year: 2019 +name: lm75 +description: | + Driver for LM75, a digital temperature sensor and thermal watchdog +groups: + - temperature +code_owners: + - trombik +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: ISC +copyrights: + - name: trombik + year: 2019 diff --git a/components/ls7366r/.eil.yml b/components/ls7366r/.eil.yml index 7f38a4b9..d17cf6d8 100644 --- a/components/ls7366r/.eil.yml +++ b/components/ls7366r/.eil.yml @@ -1,20 +1,16 @@ ---- -components: - - name: ls7366r - description: Driver for LS7366R Quadrature Encoder Counter - group: input - groups: [] - code_owners: Jkallus - depends: - - name: driver - thread_safe: yes - targets: - - name: esp32 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - author: - name: Jkallus - year: 2021 +name: ls7366r +description: Driver for LS7366R Quadrature Encoder Counter +groups: + - input +code_owners: Jkallus +depends: + - driver +thread_safe: yes +targets: + - esp32 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: Jkallus + year: 2021 diff --git a/components/max1704x/.eil.yml b/components/max1704x/.eil.yml index 28a1491e..b2b14309 100644 --- a/components/max1704x/.eil.yml +++ b/components/max1704x/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: max1704x - description: Driver for MAX17043/MAX17044/MAX17048/MAX17049 battery fuel gauge - group: battery - groups: [] - code_owners: shuki25 - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: shuki25 - year: 2022 +name: max1704x +description: Driver for MAX17043/MAX17044/MAX17048/MAX17049 battery fuel gauge +groups: + - battery +code_owners: shuki25 +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: shuki25 + year: 2022 diff --git a/components/max31725/.eil.yml b/components/max31725/.eil.yml index 33037e63..eacb0026 100644 --- a/components/max31725/.eil.yml +++ b/components/max31725/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: max31725 - description: Driver for MAX31725/MAX31726 temperature sensors - group: temperature - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2020 +name: max31725 +description: Driver for MAX31725/MAX31726 temperature sensors +groups: + - temperature +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2020 diff --git a/components/max31855/.eil.yml b/components/max31855/.eil.yml index c1f8de14..6bf05f72 100644 --- a/components/max31855/.eil.yml +++ b/components/max31855/.eil.yml @@ -1,21 +1,17 @@ ---- -components: - - name: max31855 - description: Driver for MAX31855 cold-junction compensated thermocouple-to-digital converter - group: temperature - groups: [] - code_owners: UncleRus - depends: - - driver - - log - thread_safe: yes - targets: - - name: esp32 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2022 +name: max31855 +description: Driver for MAX31855 cold-junction compensated thermocouple-to-digital converter +groups: + - temperature +code_owners: UncleRus +depends: + - driver + - log +thread_safe: yes +targets: + - esp32 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2022 diff --git a/components/max31865/.eil.yml b/components/max31865/.eil.yml index 5969286e..615c5c85 100644 --- a/components/max31865/.eil.yml +++ b/components/max31865/.eil.yml @@ -1,21 +1,17 @@ ---- -components: - - name: max31865 - description: Driver for MAX31865 resistance converter for platinum RTDs - group: temperature - groups: [] - code_owners: UncleRus - depends: - - driver - - log - thread_safe: yes - targets: - - name: esp32 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2021 +name: max31865 +description: Driver for MAX31865 resistance converter for platinum RTDs +groups: + - temperature +code_owners: UncleRus +depends: + - driver + - log +thread_safe: yes +targets: + - esp32 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2021 diff --git a/components/max7219/.eil.yml b/components/max7219/.eil.yml index 91fbf24e..2920b945 100644 --- a/components/max7219/.eil.yml +++ b/components/max7219/.eil.yml @@ -1,21 +1,17 @@ ---- -components: - - name: max7219 - description: Driver for 8-Digit LED display drivers, MAX7219/MAX7221 - group: led - groups: [] - code_owners: UncleRus - depends: - - driver - - log - thread_safe: yes - targets: - - name: esp32 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2019 +name: max7219 +description: Driver for 8-Digit LED display drivers, MAX7219/MAX7221 +groups: + - led +code_owners: UncleRus +depends: + - driver + - log +thread_safe: yes +targets: + - esp32 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2019 diff --git a/components/mcp23008/.eil.yml b/components/mcp23008/.eil.yml index b2eceae1..0831c994 100644 --- a/components/mcp23008/.eil.yml +++ b/components/mcp23008/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: mcp23008 - description: Driver for 8-bit I2C GPIO expander MCP23008 - group: gpio - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2018 +name: mcp23008 +description: Driver for 8-bit I2C GPIO expander MCP23008 +groups: + - gpio +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2018 diff --git a/components/mcp23x17/.eil.yml b/components/mcp23x17/.eil.yml index 7aba7c4b..e45b6bad 100644 --- a/components/mcp23x17/.eil.yml +++ b/components/mcp23x17/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: mcp23x17 - description: Driver for I2C/SPI 16 bit GPIO expanders MCP23017/MCP23S17 - group: gpio - groups: [] - code_owners: UncleRus - depends: - - driver - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2018 +name: mcp23x17 +description: Driver for I2C/SPI 16 bit GPIO expanders MCP23017/MCP23S17 +groups: + - gpio +code_owners: UncleRus +depends: + - driver + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2018 diff --git a/components/mcp342x/.eil.yml b/components/mcp342x/.eil.yml index 5bd53d3c..8586f6d4 100644 --- a/components/mcp342x/.eil.yml +++ b/components/mcp342x/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: mcp342x - description: Driver for 18-Bit, delta-sigma ADC MCP3426/MCP3427/MCP3428 - group: adc-dac - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2019 +name: mcp342x +description: Driver for 18-Bit, delta-sigma ADC MCP3426/MCP3427/MCP3428 +groups: + - adc-dac +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2019 diff --git a/components/mcp4725/.eil.yml b/components/mcp4725/.eil.yml index ec356bf2..c1cc20ee 100644 --- a/components/mcp4725/.eil.yml +++ b/components/mcp4725/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: mcp4725 - description: Driver for 12-bit DAC MCP4725 - group: adc-dac - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2016 +name: mcp4725 +description: Driver for 12-bit DAC MCP4725 +groups: + - adc-dac +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2016 diff --git a/components/mcp960x/.eil.yml b/components/mcp960x/.eil.yml index c3e25124..bdc99e6a 100644 --- a/components/mcp960x/.eil.yml +++ b/components/mcp960x/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: mcp960x - description: Driver for MCP9600/MCP9601, thermocouple EMF to temperature converter - group: temperature - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2020 +name: mcp960x +description: Driver for MCP9600/MCP9601, thermocouple EMF to temperature converter +groups: + - temperature +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2020 diff --git a/components/mcp9808/.eil.yml b/components/mcp9808/.eil.yml index 56a50bbf..6b853892 100644 --- a/components/mcp9808/.eil.yml +++ b/components/mcp9808/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: mcp9808 - description: Driver for MCP9808 Digital Temperature Sensor - group: temperature - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2020 +name: mcp9808 +description: Driver for MCP9808 Digital Temperature Sensor +groups: + - temperature +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2020 diff --git a/components/mhz19b/.eil.yml b/components/mhz19b/.eil.yml index b8e9617b..3f8c78d7 100644 --- a/components/mhz19b/.eil.yml +++ b/components/mhz19b/.eil.yml @@ -1,26 +1,23 @@ ---- -components: - - name: mhz19b - description: Driver for MH-Z19B NDIR CO₂ sensor - group: air-quality - groups: - - gas - code_owners: UncleRus - depends: - - log - - esp_idf_lib_helpers - thread_safe: no - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: Erriez - year: 2020 - - author: - name: DavidD - year: 2021 +name: mhz19b +description: Driver for MH-Z19B NDIR CO₂ sensor +groups: + - air-quality + - gas +code_owners: + - Erriez + - DavidD +depends: + - log + - esp_idf_lib_helpers +thread_safe: no +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: Erriez + year: 2020 + - name: DavidD + year: 2021 diff --git a/components/mpu6050/.eil.yml b/components/mpu6050/.eil.yml index bc40034c..d3cc5085 100644 --- a/components/mpu6050/.eil.yml +++ b/components/mpu6050/.eil.yml @@ -1,24 +1,31 @@ ---- -components: - - name: mpu6050 - description: | - Driver for MPU6000/MPU6050 6-axis MotionTracking device - group: imu - groups: [] - code_owners: - - name: horsemann07 - depends: - - name: log - - name: esp_idf_lib_helpers - - name: i2cdev - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - name: horsemann07 - year: 2023 +name: mpu6050 +description: Driver for MPU6000/MPU6050 6-axis MotionTracking device +groups: + - imu +code_owners: + - horsemann07 + - UncleRus +depends: + - log + - esp_idf_lib_helpers + - i2cdev +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: jeff_rowberg + year: 2012 + - name: a_e_dalzotto + year: 2019 + - name: g_b_vicari + year: 2019 + - name: gepid + year: 2019 + - name: horsemann07 + year: 2023 + - name: UncleRus + year: 2023 diff --git a/components/mpu6050/README.md b/components/mpu6050/README.md index d6a955cc..a46a5f34 100644 --- a/components/mpu6050/README.md +++ b/components/mpu6050/README.md @@ -5,7 +5,9 @@ This driver is taken from https://github.com/gabrielbvicari/esp32-mpu6050 ## Description: -The [MPU-6050](https://create.arduino.cc/projecthub/CiferTech/what-is-mpu6050-b3b178) is the world’s first and only 6-axis motion tracking devices designed for the low power, low cost, and high performance requirements of smartphones, tablets and wearable sensors. +The [MPU-6050](https://create.arduino.cc/projecthub/CiferTech/what-is-mpu6050-b3b178) +is the world’s first and only 6-axis motion tracking devices designed for the low power, +low cost, and high performance requirements of smartphones, tablets and wearable sensors. ## LICENSE @@ -23,4 +25,3 @@ The [MPU-6050](https://create.arduino.cc/projecthub/CiferTech/what-is-mpu6050-b3 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/components/ms5611/.eil.yml b/components/ms5611/.eil.yml index 47566d71..1138121b 100644 --- a/components/ms5611/.eil.yml +++ b/components/ms5611/.eil.yml @@ -1,27 +1,22 @@ ---- -components: - - name: ms5611 - description: Driver for barometic pressure sensor MS5611-01BA03 - group: pressure - groups: - - name: temperature - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2018 - - author: - name: BernhardG - year: 2016 +name: ms5611 +description: Driver for barometic pressure sensor MS5611-01BA03 +groups: + - pressure + - temperature +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: BernhardG + year: 2016 + - name: UncleRus + year: 2018 diff --git a/components/noise/.eil.yml b/components/noise/.eil.yml index dfba8816..c25b0c54 100644 --- a/components/noise/.eil.yml +++ b/components/noise/.eil.yml @@ -1,21 +1,17 @@ ---- -components: - - name: noise - description: Noise generation functions - group: common - groups: [] - code_owners: UncleRus - depends: - - lib8tion - thread_safe: N/A - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - author: - name: FastLED - year: 2013 +name: noise +description: Noise generation functions +groups: + - common +code_owners: UncleRus +depends: + - lib8tion +thread_safe: n/a +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: FastLED + year: 2013 diff --git a/components/onewire/.eil.yml b/components/onewire/.eil.yml index a60d35a0..1f00dd48 100644 --- a/components/onewire/.eil.yml +++ b/components/onewire/.eil.yml @@ -1,29 +1,23 @@ ---- -components: - - name: onewire - description: Bit-banging 1-Wire driver - group: common - groups: [] - code_owners: UncleRus - depends: - # XXX conditional depends - - driver - - freertos - - log - - esp_idf_lib_helpers - thread_safe: no - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - # XXX what `MIT *` means? - - name: MIT - copyrights: - - author: - name: UncleRus - year: 2016 - - author: - name: zeroday - year: 2016 +name: onewire +description: Bit-banging 1-Wire driver +groups: + - common +code_owners: UncleRus +depends: + # XXX conditional depends + - driver + - freertos + - log + - esp_idf_lib_helpers +thread_safe: no +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: zeroday + year: 2016 + - name: UncleRus + year: 2016 diff --git a/components/pca9557/.eil.yml b/components/pca9557/.eil.yml index 352e521c..00f49093 100644 --- a/components/pca9557/.eil.yml +++ b/components/pca9557/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: pca9557 - description: Driver for PCA9537/PCA9557/TCA9534 remote 4/8-bit I/O expanders for I2C-bus - group: gpio - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2021 +name: pca9557 +description: Driver for PCA9537/PCA9557/TCA9534 remote 4/8-bit I/O expanders for I2C-bus +groups: + - gpio +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2021 diff --git a/components/pca9685/.eil.yml b/components/pca9685/.eil.yml index 51e33767..55d2b045 100644 --- a/components/pca9685/.eil.yml +++ b/components/pca9685/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: pca9685 - description: Driver for 16-channel, 12-bit PWM PCA9685 - group: misc - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2016 +name: pca9685 +description: Driver for 16-channel, 12-bit PWM PCA9685 +groups: + - misc +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2016 diff --git a/components/pcf8563/.eil.yml b/components/pcf8563/.eil.yml index bc0b55c0..e42f731b 100644 --- a/components/pcf8563/.eil.yml +++ b/components/pcf8563/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: pcf8563 - description: Driver for PCF8563 real-time clock/calendar - group: rtc - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2020 +name: pcf8563 +description: Driver for PCF8563 real-time clock/calendar +groups: + - rtc +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2020 diff --git a/components/pcf8574/.eil.yml b/components/pcf8574/.eil.yml index cb1b777e..554f85b5 100644 --- a/components/pcf8574/.eil.yml +++ b/components/pcf8574/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: pcf8574 - description: Driver for PCF8574 remote 8-bit I/O expander for I2C-bus - group: gpio - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - author: - name: UncleRus - year: 2018 +name: pcf8574 +description: Driver for PCF8574 remote 8-bit I/O expander for I2C-bus +groups: + - gpio +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: UncleRus + year: 2018 diff --git a/components/pcf8575/.eil.yml b/components/pcf8575/.eil.yml index af60b6fe..60012f47 100644 --- a/components/pcf8575/.eil.yml +++ b/components/pcf8575/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: pcf8575 - description: Driver for PCF8575 remote 16-bit I/O expander for I2C-bus - group: gpio - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - author: - name: UncleRus - year: 2019 +name: pcf8575 +description: Driver for PCF8575 remote 16-bit I/O expander for I2C-bus +groups: + - gpio +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: UncleRus + year: 2019 diff --git a/components/pcf8591/.eil.yml b/components/pcf8591/.eil.yml index 8630f33c..3c8b419e 100644 --- a/components/pcf8591/.eil.yml +++ b/components/pcf8591/.eil.yml @@ -1,26 +1,21 @@ ---- -components: - - name: pcf8591 - description: Driver for 8-bit ADC and an 8-bit DAC PCF8591 - group: adc-dac - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2017 - - author: - name: PhamNgocT - year: 2017 +name: pcf8591 +description: Driver for 8-bit ADC and an 8-bit DAC PCF8591 +groups: + - adc-dac +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: PhamNgocT + year: 2017 + - name: UncleRus + year: 2017 diff --git a/components/qmc5883l/.eil.yml b/components/qmc5883l/.eil.yml index 4a3fde6c..ec53b7c1 100644 --- a/components/qmc5883l/.eil.yml +++ b/components/qmc5883l/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: qmc5883l - description: Driver for QMC5883L 3-axis magnetic sensor - group: magnetic - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2019 +name: qmc5883l +description: Driver for QMC5883L 3-axis magnetic sensor +groups: + - magnetic +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2019 diff --git a/components/rda5807m/.eil.yml b/components/rda5807m/.eil.yml index 1816c844..79d254d9 100644 --- a/components/rda5807m/.eil.yml +++ b/components/rda5807m/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: rda5807m - description: Driver for single-chip broadcast FM radio tuner RDA5807M - group: misc - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2018 +name: rda5807m +description: Driver for single-chip broadcast FM radio tuner RDA5807M +groups: + - misc +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2018 diff --git a/components/scd30/.eil.yml b/components/scd30/.eil.yml index ac84edb3..173bee7a 100644 --- a/components/scd30/.eil.yml +++ b/components/scd30/.eil.yml @@ -1,30 +1,24 @@ ---- -components: - - name: scd30 - description: Driver for SCD30 CO₂ sensor - group: air-quality - groups: - - name: gas - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2021 - - author: - name: Sensirion - year: 2021 - - author: - name: nated0g - year: 2021 +name: scd30 +description: Driver for SCD30 CO₂ sensor +groups: + - gas + - air-quality +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: Sensirion + year: 2021 + - name: UncleRus + year: 2021 + - name: nated0g + year: 2021 diff --git a/components/scd4x/.eil.yml b/components/scd4x/.eil.yml index 1862bb56..fb0fd868 100644 --- a/components/scd4x/.eil.yml +++ b/components/scd4x/.eil.yml @@ -1,27 +1,22 @@ ---- -components: - - name: scd4x - description: Driver for SCD40/SCD41 miniature CO₂ sensor - group: air-quality - groups: - - name: gas - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2021 - - author: - name: Sensirion - year: 2021 +name: scd4x +description: Driver for SCD40/SCD41 miniature CO₂ sensor +groups: + - gas + - air-quality +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2021 + - name: Sensirion + year: 2021 diff --git a/components/sgm58031/.eil.yml b/components/sgm58031/.eil.yml index 325fee82..70d00a00 100644 --- a/components/sgm58031/.eil.yml +++ b/components/sgm58031/.eil.yml @@ -1,25 +1,20 @@ ---- -components: - - name: sgm58031 - description: | - Driver for SGM58031 16-bit I2C ADC - group: adc-dac - groups: [] - code_owners: jmpmscorp - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32s3 - - name: esp32c3 - licenses: - - name: ISC - copyrights: - - author: - name: jmpmscorp - year: 2023 +name: sgm58031 +description: Driver for SGM58031 16-bit I2C ADC +groups: + - adc-dac +code_owners: jmpmscorp +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32s3 + - esp32c3 +license: ISC +copyrights: + - name: jmpmscorp + year: 2023 diff --git a/components/sgp40/.eil.yml b/components/sgp40/.eil.yml index f89de5dd..57c3b0fa 100644 --- a/components/sgp40/.eil.yml +++ b/components/sgp40/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: sgp40 - description: Driver for SGP40 Indoor Air Quality Sensor for VOC Measurements - group: air-quality - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2020 +name: sgp40 +description: Driver for SGP40 Indoor Air Quality Sensor for VOC Measurements +groups: + - air-quality +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2020 diff --git a/components/sht3x/.eil.yml b/components/sht3x/.eil.yml index 42b334dd..9d73f773 100644 --- a/components/sht3x/.eil.yml +++ b/components/sht3x/.eil.yml @@ -1,27 +1,22 @@ ---- -components: - - name: sht3x - description: Driver for Sensirion SHT30/SHT31/SHT35 digital temperature and humidity sensor - group: temperature - groups: - - name: humidity - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2016 - - author: - name: gschorcht - year: 2017 +name: sht3x +description: Driver for Sensirion SHT30/SHT31/SHT35 digital temperature and humidity sensor +groups: + - temperature + - humidity +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2016 + - name: gschorcht + year: 2017 diff --git a/components/sht4x/.eil.yml b/components/sht4x/.eil.yml index 0e2a0c62..ef7c319f 100644 --- a/components/sht4x/.eil.yml +++ b/components/sht4x/.eil.yml @@ -1,25 +1,20 @@ ---- -components: - - name: sht4x - description: | - Driver for Sensirion SHT40/SHT41/SHT45 digital temperature and humidity sensor - group: temperature - groups: - - name: humidity - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2021 +name: sht4x +description: Driver for Sensirion SHT40/SHT41/SHT45 digital temperature and humidity sensor +groups: + - temperature + - humidity +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2021 diff --git a/components/si7021/.eil.yml b/components/si7021/.eil.yml index ded30139..a8278bbc 100644 --- a/components/si7021/.eil.yml +++ b/components/si7021/.eil.yml @@ -1,27 +1,23 @@ ---- -components: - - name: si7021 - description: | - Driver for Si7013/Si7020/Si7021/HTU2xD/SHT2x and compatible temperature - and humidity sensors - group: temperature - groups: - - name: humidity - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp32c3 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2019 +name: si7021 +description: | + Driver for Si7013/Si7020/Si7021/HTU2xD/SHT2x and compatible temperature + and humidity sensors +groups: + - temperature + - humidity +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp32c3 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2019 diff --git a/components/sts21/.eil.yml b/components/sts21/.eil.yml index 5e7231f3..9d0630ee 100644 --- a/components/sts21/.eil.yml +++ b/components/sts21/.eil.yml @@ -1,24 +1,20 @@ ---- -components: - - name: sts21 - description: | - Driver for STS21 temperature sensor - group: temperature - groups: [] - code_owners: - - name: UncleRus - depends: - - name: i2cdev - - name: log - - name: esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - name: UncleRus - year: 2022 +name: sts21 +description: Driver for STS21 temperature sensor +groups: + - temperature +code_owners: + - UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2022 diff --git a/components/sts21/sts21.c b/components/sts21/sts21.c index 0a4637e9..ecd2c118 100644 --- a/components/sts21/sts21.c +++ b/components/sts21/sts21.c @@ -28,9 +28,9 @@ /** * @file sts21.c * - * ESP-IDF driver for humidty/temperature sensors sts2110/sts2115/sts2120 + * ESP-IDF driver for humidty/temperature sensors STS2110/STS2115/STS2120 * - * Copyright (c) 2021 Ruslan V. Uss + * Copyright (c) 2022 Ruslan V. Uss * * BSD Licensed as described in the file LICENSE */ diff --git a/components/sts21/sts21.h b/components/sts21/sts21.h index 6b3d9cee..5f281e0c 100644 --- a/components/sts21/sts21.h +++ b/components/sts21/sts21.h @@ -30,9 +30,9 @@ * @defgroup sts21 sts21 * @{ * - * ESP-IDF driver for humidty/temperature sensors sts2110/sts2115/sts2120 + * ESP-IDF driver for humidty/temperature sensors STS2110/STS2115/STS2120 * - * Copyright (c) 2021 Ruslan V. Uss + * Copyright (c) 2022 Ruslan V. Uss * * BSD Licensed as described in the file LICENSE */ diff --git a/components/sts3x/.eil.yml b/components/sts3x/.eil.yml index 70f12d13..e8d6bedd 100644 --- a/components/sts3x/.eil.yml +++ b/components/sts3x/.eil.yml @@ -1,30 +1,23 @@ ---- -components: - - name: sts3x - description: Driver for Sensirion STS30/STS31/STS35 digital temperature sensor - group: temperature - groups: - - name: temperature - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2016 - - author: - name: gschorcht - year: 2017 - - author: - name: slimcdk - year: 2023 +name: sts3x +description: Driver for Sensirion STS30/STS31/STS35 digital temperature sensor +groups: + - temperature +code_owners: slimcdk +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: gschorcht + year: 2017 + - name: UncleRus + year: 2019 + - name: slimcdk + year: 2023 diff --git a/components/sts3x/sts3x.c b/components/sts3x/sts3x.c index 686698ad..97d388ca 100644 --- a/components/sts3x/sts3x.c +++ b/components/sts3x/sts3x.c @@ -30,7 +30,7 @@ /** * @file sts3x.c * - * ESP-IDF driver for Sensirion STS3x digital temperature + * ESP-IDF driver for Sensirion STS3x digital temperature sensors * * Forked from SHT3x driver * @@ -38,7 +38,7 @@ * Copyright (c) 2019 Ruslan V. Uss \n * Copyright (c) 2023 Christian Skjerning * - * BSD Licensed as described in the file LICENSE + * BSD-3 Licensed as described in the file LICENSE */ #include diff --git a/components/sts3x/sts3x.h b/components/sts3x/sts3x.h index 2adddeda..d6ffb22d 100644 --- a/components/sts3x/sts3x.h +++ b/components/sts3x/sts3x.h @@ -32,7 +32,7 @@ * @defgroup sts3x sts3x * @{ * - * ESP-IDF driver for Sensirion STS3x digital temperature + * ESP-IDF driver for Sensirion STS3x digital temperature sensors * * Forked from * @@ -40,7 +40,7 @@ * Copyright (c) 2019 Ruslan V. Uss \n * Copyright (c) 2023 Christian Skjerning * - * BSD Licensed as described in the file LICENSE + * BSD-3 Licensed as described in the file LICENSE */ #ifndef __STS3X_H__ #define __STS3X_H__ diff --git a/components/tca9548/.eil.yml b/components/tca9548/.eil.yml index 3ef59bc1..939a6c9a 100644 --- a/components/tca9548/.eil.yml +++ b/components/tca9548/.eil.yml @@ -1,24 +1,19 @@ ---- -components: - - name: tca9548 - description: | - Driver for TCA9548A/PCA9548A low-voltage 8-channel I2C switch - group: misc - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2020 +name: tca9548 +description: Driver for TCA9548A/PCA9548A low-voltage 8-channel I2C switch +groups: + - misc +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2020 diff --git a/components/tca95x5/.eil.yml b/components/tca95x5/.eil.yml index 0992228d..1739fe3f 100644 --- a/components/tca95x5/.eil.yml +++ b/components/tca95x5/.eil.yml @@ -1,24 +1,19 @@ ---- -components: - - name: tca95x5 - description: | - Driver for TCA9535/TCA9555 remote 16-bit I/O expanders for I2C-bus - group: gpio - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2019 +name: tca95x5 +description: Driver for TCA9535/TCA9555 remote 16-bit I/O expanders for I2C-bus +groups: + - gpio +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2019 diff --git a/components/tda74xx/.eil.yml b/components/tda74xx/.eil.yml index 01bb8e91..476f2d46 100644 --- a/components/tda74xx/.eil.yml +++ b/components/tda74xx/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: tda74xx - description: Driver for TDA7439/TDA7439DS/TDA7440D audioprocessors - group: misc - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - author: - name: UncleRus - year: 2018 +name: tda74xx +description: Driver for TDA7439/TDA7439DS/TDA7440D audioprocessors +groups: + - misc +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: UncleRus + year: 2018 diff --git a/components/tsl2561/.eil.yml b/components/tsl2561/.eil.yml index 05066b4d..5d0169ae 100644 --- a/components/tsl2561/.eil.yml +++ b/components/tsl2561/.eil.yml @@ -1,26 +1,21 @@ ---- -components: - - name: tsl2561 - description: Driver for light-to-digital converter TSL2561 - group: light - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2018 - - author: - name: bschwind - year: 2016 +name: tsl2561 +description: Driver for light-to-digital converter TSL2561 +groups: + - light +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: bschwind + year: 2016 + - name: UncleRus + year: 2018 diff --git a/components/tsl2591/.eil.yml b/components/tsl2591/.eil.yml index 171dda52..e961a711 100644 --- a/components/tsl2591/.eil.yml +++ b/components/tsl2591/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: tsl2591 - description: Driver for light-to-digital converter TSL2591 - group: light - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: MIT - copyrights: - - author: - name: juliandoerner - year: 2020 +name: tsl2591 +description: Driver for light-to-digital converter TSL2591 +groups: + - light +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: MIT +copyrights: + - name: juliandoerner + year: 2020 diff --git a/components/tsl4531/.eil.yml b/components/tsl4531/.eil.yml index 7d81c32b..d464161f 100644 --- a/components/tsl4531/.eil.yml +++ b/components/tsl4531/.eil.yml @@ -1,26 +1,21 @@ ---- -components: - - name: tsl4531 - description: Driver for digital ambient light sensor TSL4531 - group: light - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2019 - - author: - name: bschwind - year: 2017 +name: tsl4531 +description: Driver for digital ambient light sensor TSL4531 +groups: + - light +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: bschwind + year: 2017 + - name: UncleRus + year: 2019 diff --git a/components/tsys01/.eil.yml b/components/tsys01/.eil.yml index 28144b7a..cf9e7efa 100644 --- a/components/tsys01/.eil.yml +++ b/components/tsys01/.eil.yml @@ -1,24 +1,19 @@ ---- -components: - - name: tsys01 - description: | - Driver for precision digital temperature sensor TSYS01 - group: temperature - groups: [] - code_owners: UncleRus - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2020 +name: tsys01 +description: Driver for precision digital temperature sensor TSYS01 +groups: + - temperature +code_owners: UncleRus +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2020 diff --git a/components/ultrasonic/.eil.yml b/components/ultrasonic/.eil.yml index 6aba8ac1..4667e74a 100644 --- a/components/ultrasonic/.eil.yml +++ b/components/ultrasonic/.eil.yml @@ -1,24 +1,20 @@ ---- -components: - - name: ultrasonic - description: Driver for ultrasonic range meters, e.g. HC-SR04, HY-SRF05 - group: misc - groups: [] - code_owners: UncleRus - depends: - # XXX conditional depends - - driver - - freertos - - esp_idf_lib_helpers - thread_safe: no - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2016 +name: ultrasonic +description: Driver for ultrasonic range meters, e.g. HC-SR04, HY-SRF05 +groups: + - misc +code_owners: UncleRus +depends: + # XXX conditional depends + - driver + - freertos + - esp_idf_lib_helpers +thread_safe: no +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2016 diff --git a/components/veml7700/.eil.yml b/components/veml7700/.eil.yml index e4e92e50..11e3e300 100644 --- a/components/veml7700/.eil.yml +++ b/components/veml7700/.eil.yml @@ -1,23 +1,19 @@ ---- -components: - - name: veml7700 - description: Driver for VEML7700 ambient light sensor - group: light - groups: [] - code_owners: Th3Link - depends: - - i2cdev - - log - - esp_idf_lib_helpers - thread_safe: yes - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: ISC - copyrights: - - author: - name: Th3Link - year: 2019 +name: veml7700 +description: Driver for VEML7700 ambient light sensor +groups: + - light +code_owners: Th3Link +depends: + - i2cdev + - log + - esp_idf_lib_helpers +thread_safe: yes +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: ISC +copyrights: + - name: Th3Link + year: 2019 diff --git a/components/wiegand/.eil.yml b/components/wiegand/.eil.yml index 5f643a60..f204f468 100644 --- a/components/wiegand/.eil.yml +++ b/components/wiegand/.eil.yml @@ -1,24 +1,20 @@ ---- -components: - - name: wiegand - description: Wiegand protocol receiver - group: misc - groups: [] - code_owners: UncleRus - depends: - # XXX conditional depends - - driver - - log - - esp_idf_lib_helpers - thread_safe: no - targets: - - name: esp32 - - name: esp8266 - - name: esp32s2 - - name: esp32c3 - licenses: - - name: BSD-3 - copyrights: - - author: - name: UncleRus - year: 2021 +name: wiegand +description: Wiegand protocol receiver +groups: + - misc +code_owners: UncleRus +depends: + # XXX conditional depends + - driver + - log + - esp_idf_lib_helpers +thread_safe: no +targets: + - esp32 + - esp8266 + - esp32s2 + - esp32c3 +license: BSD-3 +copyrights: + - name: UncleRus + year: 2021 diff --git a/devtools/.rubocop.yml b/devtools/.rubocop.yml deleted file mode 100644 index cf698523..00000000 --- a/devtools/.rubocop.yml +++ /dev/null @@ -1,134 +0,0 @@ ---- -# inherit_from: .rubocop_todo.yml - -AllCops: - Exclude: - - "vendor/**/*" - # enable detailed explanations available in cops - # the default output is not enough to understand what is wrong - DisplayCopNames: true - ExtraDetails: true - DisplayStyleGuide: true - - # the default CacheRootDirectory is no longer `/tmp`, but a directory under - # `$HOME` and some Unix platforms use symlink to that path - AllowSymlinksInCacheRootDirectory: true - -Style/StringLiterals: - EnforcedStyle: double_quotes - -Style/SymbolArray: - # perefer brackets for `grep-ability` - EnforcedStyle: brackets - -Metrics/BlockLength: - Exclude: - - Guardfile - IgnoredMethods: - - describe - - context - - namespace - -Layout/LineLength: - Exclude: - # Gemfile is not application code - - "Gemfile" - # ignore heredoc for readability - AllowHeredoc: true - # URLs are almost always long - AllowURI: true - URISchemes: - - http - - https - - git - - ftp - IgnoreCopDirectives: true - -Gemspec/DateAssignment: # new in 1.10 - Enabled: true -Layout/LineEndStringConcatenationIndentation: # new in 1.18 - Enabled: true -Layout/SpaceBeforeBrackets: # new in 1.7 - Enabled: true -Lint/AmbiguousAssignment: # new in 1.7 - Enabled: true -Lint/AmbiguousOperatorPrecedence: # new in 1.21 - Enabled: true -Lint/AmbiguousRange: # new in 1.19 - Enabled: true -Lint/DeprecatedConstants: # new in 1.8 - Enabled: true -Lint/DuplicateBranch: # new in 1.3 - Enabled: true -Lint/DuplicateRegexpCharacterClassElement: # new in 1.1 - Enabled: true -Lint/EmptyBlock: # new in 1.1 - Enabled: true -Lint/EmptyClass: # new in 1.3 - Enabled: true -Lint/EmptyInPattern: # new in 1.16 - Enabled: true -Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21 - Enabled: true -Lint/LambdaWithoutLiteralBlock: # new in 1.8 - Enabled: true -Lint/NoReturnInBeginEndBlocks: # new in 1.2 - Enabled: true -Lint/NumberedParameterAssignment: # new in 1.9 - Enabled: true -Lint/OrAssignmentToConstant: # new in 1.9 - Enabled: true -Lint/RedundantDirGlobSort: # new in 1.8 - Enabled: true -Lint/RequireRelativeSelfPath: # new in 1.22 - Enabled: true -Lint/SymbolConversion: # new in 1.9 - Enabled: true -Lint/ToEnumArguments: # new in 1.1 - Enabled: true -Lint/TripleQuotes: # new in 1.9 - Enabled: true -Lint/UnexpectedBlockArity: # new in 1.5 - Enabled: true -Lint/UnmodifiedReduceAccumulator: # new in 1.1 - Enabled: true -Security/IoMethods: # new in 1.22 - Enabled: true -Style/ArgumentsForwarding: # new in 1.1 - Enabled: true -Style/CollectionCompact: # new in 1.2 - Enabled: true -Style/DocumentDynamicEvalDefinition: # new in 1.1 - Enabled: true -Style/EndlessMethod: # new in 1.8 - Enabled: true -Style/HashConversion: # new in 1.10 - Enabled: true -Style/HashExcept: # new in 1.7 - Enabled: true -Style/IfWithBooleanLiteralBranches: # new in 1.9 - Enabled: true -Style/InPatternThen: # new in 1.16 - Enabled: true -Style/MultilineInPatternThen: # new in 1.16 - Enabled: true -Style/NegatedIfElseCondition: # new in 1.2 - Enabled: true -Style/NilLambda: # new in 1.3 - Enabled: true -Style/NumberedParameters: # new in 1.22 - Enabled: true -Style/NumberedParametersLimit: # new in 1.22 - Enabled: true -Style/QuotedSymbols: # new in 1.16 - Enabled: true -Style/RedundantArgument: # new in 1.4 - Enabled: true -Style/RedundantSelfAssignmentBranch: # new in 1.19 - Enabled: true -Style/SelectByRegexp: # new in 1.22 - Enabled: true -Style/StringChars: # new in 1.12 - Enabled: true -Style/SwapValues: # new in 1.1 - Enabled: true diff --git a/devtools/README.md.erb b/devtools/README.md.erb deleted file mode 100644 index 8c55116a..00000000 --- a/devtools/README.md.erb +++ /dev/null @@ -1,151 +0,0 @@ -# ESP-IDF Components library - -[![Build Status](https://github.com/UncleRus/esp-idf-lib/workflows/Build%20examples/badge.svg)](https://github.com/UncleRus/esp-idf-lib/actions?query=workflow%3A%22Build+examples%22) -[![Build the documentation](https://github.com/UncleRus/esp-idf-lib/workflows/Build%20the%20documentation/badge.svg)](https://github.com/UncleRus/esp-idf-lib/actions?query=workflow%3A%22Build+the+documentation%22) -[![Docs Status](https://readthedocs.org/projects/esp-idf-lib/badge/?version=latest&style=flat)](https://esp-idf-lib.readthedocs.io/en/latest/) - -Components for Espressif ESP32 [ESP-IDF framework](https://github.com/espressif/esp-idf) -and [ESP8266 RTOS SDK](https://github.com/espressif/ESP8266_RTOS_SDK). - -Part of them ported from [esp-open-rtos](https://github.com/SuperHouse/esp-open-rtos). - -## Supported versions of frameworks and devices - -| Chip | Framework | Versions -|----------------|--------------------|----------------------- -| ESP32 | ESP-IDF | All officially supported versions (see [Support Period Policy](https://github.com/espressif/esp-idf/blob/master/SUPPORT_POLICY.md)) and `master` -| ESP32-S2 *[1]* | ESP-IDF | All officially supported versions and `master` -| ESP32-C3 *[1]* | ESP-IDF | All officially supported versions and `master` -| ESP8266 *[2]* | ESP8266 RTOS SDK | `master`, v3.4 - -[1] *Use "`idf.py set-target esp32s2`" or "`idf.py set-target esp32c3`" before "`idf.py menuconfig`" to change -the chip type.* - -[2] *Due to the incompatibility of ESP8266 drivers and hardware, some -libraries are not* *supported on ESP8266 (see "ESP8266" column in the tables).* - -## How to use - -### ESP32 - -Clone this repository somewhere, e.g.: - -```Shell -cd ~/myprojects/esp -git clone https://github.com/UncleRus/esp-idf-lib.git -``` - -Add path to components in your [project makefile](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system-legacy.html), -e.g: - -```Makefile -PROJECT_NAME := my-esp-project -EXTRA_COMPONENT_DIRS := /home/user/myprojects/esp/esp-idf-lib/components -include $(IDF_PATH)/make/project.mk -``` - -or in [CMakeLists.txt](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html): - -```CMake -cmake_minimum_required(VERSION 3.5) -set(EXTRA_COMPONENT_DIRS /home/user/myprojects/esp/esp-idf-lib/components) -include($ENV{IDF_PATH}/tools/cmake/project.cmake) -project(my-esp-project) -``` - -or with CMake [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) - -```CMake -cmake_minimum_required(VERSION 3.11) -include(FetchContent) -FetchContent_Declare( - espidflib - GIT_REPOSITORY https://github.com/UncleRus/esp-idf-lib.git -) -FetchContent_MakeAvailable(espidflib) -set(EXTRA_COMPONENT_DIRS ${espidflib_SOURCE_DIR}/components) -include($ENV{IDF_PATH}/tools/cmake/project.cmake) -project(my-esp-project) -``` - -### ESP8266 RTOS SDK - -Clone this repository somewhere, e.g.: - -```Shell -cd ~/myprojects/esp -git clone https://github.com/UncleRus/esp-idf-lib.git -``` - -Add path to components in your [project makefile](https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/api-guides/build-system.html), -e.g: - -```Makefile -PROJECT_NAME := my-esp-project -EXTRA_COMPONENT_DIRS := /home/user/myprojects/esp/esp-idf-lib/components -EXCLUDE_COMPONENTS := max7219 mcp23x17 led_strip max31865 ls7366r max31855 -include $(IDF_PATH)/make/project.mk -``` - -See [GitHub examples](https://github.com/UncleRus/esp-idf-lib/tree/master/examples) -or [GitLab examples](https://gitlab.com/UncleRus/esp-idf-lib/tree/master/examples). - -## Documentation - -- [Documentation](https://esp-idf-lib.readthedocs.io/en/latest/) -- [Frequently asked questions](FAQ.md) - -## Components -<% groups.sort_by!(&:description).each do |g| %> -### <%= g.description %> - -| Component | Description | License | Supported on | Thread safety -|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|-------------- -<% components = all_components.select { |c| c.group_of?(g.name) }.sort_by!(&:name).each do |c| - name = format("%-24s", "**#{c.name}**") - description = format("%-80s", c.description) - licenses = format("%-7s", c.licenses.map(&:name).join(", ")) - supported_on = format("%-18s", c.targets.map { |t| "`#{t.name}`" }.join(", ")) -%> -| <%= name %> | <%= description %> | <%= licenses %> | <%= supported_on %> | <%= c.thread_safe ? "Yes" : "No" %> -<% end -%> -<% end -%> - -## Library maintainers - -- [Ruslan V. Uss](https://github.com/UncleRus) -- [Tomoyuki Sakurai](https://github.com/trombik) - -## Credits - -- [Tomoyuki Sakurai](https://github.com/trombik), developer of the LM75 and - SK9822/APA102 drivers, author of the RTOS SDK ESP82666 support, master CI -- [Gunar Schorcht](https://github.com/gschorcht), developer of SHT3x, BME680 - and CCS811 drivers -- [Brian Schwind](https://github.com/bschwind), developer of TS2561 and - TSL4531 drivers -- [Andrej Krutak](https://github.com/andree182), developer of BH1750 driver -- Frank Bargstedt, developer of BMP180 driver -- [sheinz](https://github.com/sheinz), developer of BMP280 driver -- [Jonathan Hartsuiker](https://github.com/jsuiker), developer of DHT driver -- [Grzegorz Hetman](https://github.com/hetii), developer of DS18B20 driver -- [Alex Stewart](https://github.com/astewart-consensus), developer of DS18B20 driver -- [Richard A Burton](mailto:richardaburton@gmail.com), developer of DS3231 driver -- [Bhuvanchandra DV](https://github.com/bhuvanchandra), developer of DS3231 driver -- [Zaltora](https://github.com/Zaltora), developer of INA3231 driver -- [Bernhard Guillon](https://gitlab.com/mrnice), developer of MS5611-01BA03 driver -- [Pham Ngoc Thanh](https://github.com/panoti), developer of PCF8591 driver -- [Lucio Tarantino](https://github.com/dianlight), developer of ADS111x driver -- [Julian Dörner](https://github.com/juliandoerner), developer of TSL2591 driver -- [FastLED community](https://github.com/FastLED), developers of `lib8tion`, - `color` and `noise` libraries -- [Erriez](https://github.com/Erriez), developer of MH-Z19B driver -- [David Douard](https://github.com/douardda), developer of MH-Z19B driver -- [Nate Usher](https://github.com/nated0g), developer of SCD30 driver -- [Josh Kallus](https://github.com/Jkallus), developer of LS7366R driver -- [saasaa](https://github.com/saasaa), developer of HTS221 driver -- [Timofei Korostelev](https://github.com/chudsaviet), developer of HT16K33 driver -- [Jose Manuel Perez](https://github.com/jmpmscorp), developer of LC709203F driver -- [Weslley Duarte](https://github.com/weslleymfd), developer of ADS130E08 driver -- [Jan Veeh](https://github.com/janveeh), developer of ICM42670 driver -- [Marc Luehr](https://github.com/Th3Link), developer of VEML7700 driver -- [Joshua Butler, MD, MHI](https://github.com/shuki25), developer of MAX1704x driver diff --git a/devtools/Rakefile b/devtools/Rakefile deleted file mode 100644 index 2024a289..00000000 --- a/devtools/Rakefile +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -task default: [:test] - -desc "Run all tests" -task test: [:rubocop, :rspec] - -desc "Run rubocop" -task :rubocop do - sh "rubocop" -end - -desc "Run rspec" -task :rspec do - sh "rspec --format d" -end - -desc "Update README.md" -task :readme do - require "erb" - require_relative "spec/group_list" - require_relative "spec/component" - - template = File.read("README.md.erb") - groups = GroupList.new("groups.yml").all - - # * select if it is a directory - # * make path to metadata file - # * read it - # * parse it as YAML - # * take all components under "components" key - # * flatten the list of components - # * create a Component from the item - all_components = Dir.children("../components") - .select { |f| File.directory?(File.join("../components", f)) } - .map { |c| File.join("../components", c, ".eil.yml") } - .map { |f| File.read(f) } - .map { |f| YAML.safe_load(f) } - .map { |y| y["components"] } - .flatten - .map { |c| Component.new(c) } - markdown = ERB.new(template, trim_mode: "%-").result(binding) - puts markdown -end diff --git a/devtools/cmake-get-requires/.gitignore b/devtools/cmake-get-requires/.gitignore deleted file mode 100644 index cdc8bbb7..00000000 --- a/devtools/cmake-get-requires/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -CMakeCache.txt -CMakeFiles -cmake_install.cmake -Makefile diff --git a/devtools/cmake-get-requires/CMakeLists.txt b/devtools/cmake-get-requires/CMakeLists.txt deleted file mode 100644 index 70b9f116..00000000 --- a/devtools/cmake-get-requires/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -# a script to parse CMakeLists.txt of a component, print REQUIRES. -# -# usage: -# cmake -DCOMPONENT_NAME:STRING=framebuffer . >/dev/null -# -# output in stderr: -# REQUIRES:log;color - -cmake_minimum_required(VERSION 3.5) - -# mock idf_component_register() -function(idf_component_register) - set(multiValueArgs REQUIRES) - cmake_parse_arguments(MY "" "" "${multiValueArgs}" ${ARGN}) - - # print REQUIRES argument to stderr. MY_REQUIRES is a semicolon separated - # string, such as `foo;bar` - message(NOTICE "REQUIRES:${MY_REQUIRES}") -endfunction() - -include(${CMAKE_CURRENT_SOURCE_DIR}/../../components/${COMPONENT_NAME}/CMakeLists.txt) - -project(ProjectName) diff --git a/devtools/devtool.py b/devtools/devtool.py new file mode 100755 index 00000000..b397a94b --- /dev/null +++ b/devtools/devtool.py @@ -0,0 +1,200 @@ +#!/usr/bin/env python3 + +import argparse +import devtool +import pathlib as p +import typing as t +import jinja2 +import sys +import os +import subprocess +import pydantic + + +class CI(pydantic.BaseModel): + + meta: bool = False + build: bool = False + docs: bool = False + readme: bool = False + ci: bool = False + + +class Devtool: + + PROGRAM = 'devtool.py' + COMMANDS = { + 'check': 'Check components metadata', + 'render': 'Generate documentation based on components metadata', + 'target': 'Find components by target', + 'depends': 'Show components that depend (directly or indirectly) on a specified component', + 'ci': 'Show list of ci jobs to be done', + } + README = 'README.md' + + def __init__(self): + self.meta: devtool.Metadata | None = None + self.parse_args() + + def parse_args(self): + parser = argparse.ArgumentParser( + prog=self.PROGRAM, + description='esp-idf-lib developer tool', + usage='usage: devtool.py [-h] {%s} [args]' % ','.join(self.COMMANDS.keys()) + ) + parser.add_argument('command', choices=[cmd for cmd in self.COMMANDS], + help='Subcommand to run') + args = parser.parse_args(sys.argv[1:2]) + + repo_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + self.meta = devtool.Metadata(repo_path) + + method = 'cmd_%s' % args.command + if not hasattr(self, method) or not callable(getattr(self, method)): + raise RuntimeError('Invalid command: method not found') + getattr(self, method)() + + def iter_components(self) -> t.Generator[devtool.Component, None, None]: + for d in sorted((str(d.parts[-1]) for d in self.meta.iter_component_dirs() if d.is_dir())): + yield devtool.Component.load(self.meta, d) + + def cmd_check(self): + for c in self.iter_components(): + print('Component %s is OK.' % c.name) + + def cmd_render(self): + # TODO: render docs source + groups = {} + authors = {} + for c in self.iter_components(): + for group in c.groups: + if group.description not in groups: + groups[group.description] = [] + groups[group.description].append(c) + for cr in c.copyrights: + if cr.name.full_name not in authors: + authors[cr.name.full_name] = {'person': cr.name, 'components': []} + authors[cr.name.full_name]['components'].append(c) + + env = jinja2.Environment( + loader=jinja2.PackageLoader('devtool'), + finalize=lambda x: x if x is not None else '', + autoescape=False, + ) + + # render README + tpl = env.get_template(self.README) + readme_fn = p.Path(self.meta.repo_path) / self.README + with readme_fn.open('w') as f: + f.write(tpl.render(groups=groups, authors=authors)) + + @staticmethod + def _find_by_target(target: str, inverse: bool, components: t.Dict[str, devtool.Component]) -> t.List[str]: + res = [] + + for c in components.values(): + if not inverse: + if target in c.targets: + res.append(c.name) + else: + if target not in c.targets: + res.append(c.name) + + return res + + def cmd_target(self): + parser = argparse.ArgumentParser( + prog=self.PROGRAM, + description=self.COMMANDS['target'], + usage='devtool.py target [-h] [-x] {%s}' % ','.join(self.meta.targets) + ) + parser.add_argument('target', choices=self.meta.targets, + help='Target that components must support') + parser.add_argument('-x', action='store_true', + help='Inverse operation: find components that do not support the specified target') + args = parser.parse_args(sys.argv[2:]) + + print(' '.join(self._find_by_target(args.target, args.x, {c.name: c for c in self.iter_components()}))) + + @staticmethod + def _find_dependants(dependency: str, components: t.Dict[str, devtool.Component]) \ + -> t.Dict[str, devtool.Component]: + res = {} + + # direct dependants + for c in components.values(): + if dependency in c.depends and c.name not in res: + res[c.name] = c + + # indirect dependants + while True: + found = False + for d in tuple(res.values()): + for c in components.values(): + if d.name in c.depends and c.name not in res: + res[c.name] = c + found = True + if not found: + break + + return res + + def cmd_depends(self): + parser = argparse.ArgumentParser( + prog=self.PROGRAM, + description=self.COMMANDS['depends'], + usage='devtool.py depends [-h] ' + ) + parser.add_argument('dependency', help='Dependency name') + args = parser.parse_args(sys.argv[2:]) + + print('\n'.join(self._find_dependants(args.dependency, {c.name: c for c in self.iter_components()}).keys())) + + def cmd_ci(self): + diff = subprocess.run( + args=('git', 'diff', '--name-only', 'origin/master..HEAD'), + cwd=self.meta.repo_path, + capture_output=True, + encoding='utf-8', + ) + diff.check_returncode() + + diff = tuple(l.split('/') for l in diff.stdout.strip().replace('\r', '').split('\n')) + dirs = set((l[0] for l in diff)) + changed_components = set((l[1] for l in diff if len(l) > 1 and l[0] == 'components')) + all_components = {c.name: c for c in self.iter_components()} + components_to_build = set() + + res = CI() + if self.README in dirs: + res.readme = True + if changed_components: + res.meta = True + res.build = True + res.readme = True + if 'devtools' in dirs or '.github' in dirs: + res.ci = True + if 'docs' in dirs: + res.docs = True + if res.ci: + res.meta = True + res.build = True + res.readme = True + res.docs = True + components_to_build = set(all_components.keys()) + if res.build and not components_to_build: + for c_name in changed_components: + if c_name in all_components: + components_to_build.add(c_name) + components_to_build.union(self._find_dependants(c_name, all_components).keys()) + + print('_ci_meta=%d' % res.meta) + print('_ci_readme=%d' % res.readme) + print('_ci_docs=%d' % res.docs) + for target in self.meta.targets: + components_by_target = set(self._find_by_target(target, False, all_components)) + print('_ci_build_%s=%s' % (target, ' '.join(components_to_build.intersection(components_by_target)))) + + +if __name__ == '__main__': + Devtool() diff --git a/devtools/devtool/__init__.py b/devtools/devtool/__init__.py new file mode 100644 index 00000000..2ef17e3a --- /dev/null +++ b/devtools/devtool/__init__.py @@ -0,0 +1,2 @@ +from .metadata import * +from .errors import * diff --git a/devtools/devtool/const.py b/devtools/devtool/const.py new file mode 100644 index 00000000..f51afaa3 --- /dev/null +++ b/devtools/devtool/const.py @@ -0,0 +1,8 @@ +ENCODING: str = 'utf-8' + +METADATA_FILENAME: str = '.eil.yml' +GROUPS_FILENAME: str = 'groups.yml' +PERSONS_FILENAME: str = 'persons.yml' +TARGETS_FILENAME: str = 'targets.yml' +DICT_DIR: str = 'devtools' +COMPONENTS_DIR: str = 'components' diff --git a/devtools/devtool/errors.py b/devtools/devtool/errors.py new file mode 100644 index 00000000..f810cfbd --- /dev/null +++ b/devtools/devtool/errors.py @@ -0,0 +1,70 @@ +import os +import typing as t + +__all__ = [ + 'MetadataError', + 'MetadataNotFoundError', + 'StructureError', + 'InvalidFieldsError', + 'InvalidNameError', + 'InvalidItemError', + 'InvalidGroupError', + 'InvalidPersonError', + 'InvalidLicenseError', + 'InvalidTargetError', + 'InvalidThreadSafetyError', +] + + +class MetadataError(RuntimeError): + pass + + +class MetadataNotFoundError(MetadataError): + def __init__(self, path: os.PathLike): + super().__init__('Metadata not found: "%s"' % path) + + +class StructureError(MetadataError): + def __init__(self, ctx: str): + super().__init__('[%s]: Bad metadata structure' % ctx) + + +class InvalidFieldsError(MetadataError): + def __init__(self, ctx: str, expected: t.Set[str], got: t.Set[str]): + super().__init__('[%s]: Bad metadata. Expected fields: %r, got %r' % (ctx, expected, got)) + + +class InvalidNameError(MetadataError): + def __init__(self, dirname: str, metaname: str): + super().__init__('[%s]: Invalid component name: "%s", must be "%s"' % (dirname, metaname, dirname)) + + +class InvalidItemError(MetadataError): + def __init__(self, ctx: str, item_name: str, item_value: str): + super().__init__('[%s]: Invalid %s: "%s"' % (ctx, item_name, item_value)) + + +class InvalidGroupError(InvalidItemError): + def __init__(self, ctx: str, value: str): + super().__init__(ctx, 'group', value) + + +class InvalidPersonError(InvalidItemError): + def __init__(self, ctx: str, value: str): + super().__init__(ctx, 'person', value) + + +class InvalidLicenseError(InvalidItemError): + def __init__(self, ctx: str, value: str): + super().__init__(ctx, 'license', value) + + +class InvalidTargetError(InvalidItemError): + def __init__(self, ctx: str, value: str): + super().__init__(ctx, 'target', value) + + +class InvalidThreadSafetyError(InvalidItemError): + def __init__(self, ctx: str, value: str): + super().__init__(ctx, 'thread_safe', value) diff --git a/devtools/devtool/metadata.py b/devtools/devtool/metadata.py new file mode 100644 index 00000000..0cfc8c49 --- /dev/null +++ b/devtools/devtool/metadata.py @@ -0,0 +1,197 @@ +from __future__ import annotations + +import os +import yaml +import pydantic +import typing as t +import pathlib as p +from enum import Enum + +from .errors import * +from . import const + + +__all__ = [ + 'ThreadSafety', + 'Licenses', + 'Group', + 'Person', + 'Copyright', + 'Component', + 'Metadata', +] + + +class ThreadSafety(str, Enum): + NO = 'no' + YES = 'yes' + NA = 'n/a' + + @staticmethod + def from_value(raw: bool | str) -> ThreadSafety: + if isinstance(raw, bool): + return ThreadSafety.YES if raw else ThreadSafety.NO + if raw == 'true': + return ThreadSafety.YES + if raw == 'false': + return ThreadSafety.NO + return ThreadSafety(raw) + + +class Licenses(str, Enum): + ISC = 'ISC' + MIT = 'MIT' + BSD3 = 'BSD-3' + + +class Group(pydantic.BaseModel): + name: str + description: str + + +class Person(pydantic.BaseModel): + name: str + full_name: str | None = None + gh_id: str | None = None + email: str | None = None + url: str | None = None + + def __init__(self, **kwargs): + if not kwargs.get('full_name', None): + kwargs['full_name'] = kwargs['name'] + super().__init__(**kwargs) + + +class Copyright(pydantic.BaseModel): + name: Person + year: int + + +class Component(pydantic.BaseModel): + name: str + description: str + groups: t.List[Group] = [] + code_owners: t.List[Person] = [] + depends: t.List[str] = [] + thread_safe: ThreadSafety = ThreadSafety.NA + targets: t.List[str] = [] + license: Licenses = Licenses.ISC + copyrights: t.List[Copyright] = [] + + @staticmethod + def load(m: Metadata, dirname: os.PathLike) -> Component: + path: p.Path = m.repo_path / const.COMPONENTS_DIR / dirname + meta_fn: p.Path = path / const.METADATA_FILENAME + if not meta_fn.is_file: + raise MetadataNotFoundError(path) + + raw = yaml.safe_load(meta_fn.open('r', encoding=const.ENCODING)) + + if not isinstance(raw, dict): + raise StructureError(str(dirname)) + + if set(Component.__fields__.keys()) != set(raw.keys()): + raise InvalidFieldsError( + str(dirname), set(Component.__fields__.keys()) - set(raw.keys()), + set(raw.keys()) - set(Component.__fields__.keys())) + + ctx = str(dirname) + if ctx != raw['name'].strip(): + raise InvalidNameError(ctx, raw['name']) + + ts = str(raw['thread_safe']) + try: + ts = ThreadSafety.from_value(ts.lower()) + except: + raise InvalidThreadSafetyError(ctx, ts) + + lc = str(raw['license']) + try: + lc = Licenses(lc.upper()) + except: + raise InvalidLicenseError(ctx, lc) + + res = Component( + name=ctx, + description=raw['description'].strip().strip('.').replace('\n', ' '), + groups=m.get_groups(ctx, raw), + code_owners=m.get_persons(ctx, raw['code_owners']), + depends=[lib for lib in raw['depends']], + thread_safe=ts, + targets=m.get_targets(ctx, raw['targets']), + license=lc, + copyrights=m.get_copyrights(ctx, raw['copyrights']) + ) + return res + + def save(self, m: Metadata, dirname: os.PathLike) -> None: + meta_fn: p.Path = m.repo_path / const.COMPONENTS_DIR / dirname / const.METADATA_FILENAME + yaml.safe_dump(self.dict(), meta_fn.open('w', encoding=const.ENCODING)) + + +class Metadata: + + GROUPS_FILENAME: str = 'groups.yml' + PERSONS_FILENAME: str = 'persons.yml' + TARGETS_FILENAME: str = 'targets.yml' + + DICT_DIR: str = 'devtools' + COMPONENTS_DIR: str = 'components' + + def __init__(self, repo_path: os.PathLike): + self.repo_path: p.Path = p.Path(repo_path) + + self.groups = {} + self.persons = {} + self.targets = [] + + self.idx_groups = [] + + self.load_dictionaries() + + def load_dictionaries(self) -> None: + path = self.repo_path / p.Path(self.DICT_DIR) + groups_fn = path / self.GROUPS_FILENAME + persons_fn = path / self.PERSONS_FILENAME + targets_fn = path / self.TARGETS_FILENAME + + self.groups = {r['name']: Group(**r) for r in yaml.safe_load(groups_fn.open('r', encoding=const.ENCODING))} + self.persons = {r['name']: Person(**r) for r in yaml.safe_load(persons_fn.open('r', encoding=const.ENCODING))} + self.targets = [r['name'] for r in yaml.safe_load(targets_fn.open('r', encoding=const.ENCODING))] + + self.idx_groups = sorted(self.groups.values(), key=lambda x: x.description) + + def _get_group(self, ctx: str, name: str) -> Group: + if name not in self.groups: + raise InvalidGroupError(ctx, name); + return self.groups[name] + + def _get_person(self, ctx: str, name: str) -> Person: + if name not in self.persons: + raise InvalidPersonError(ctx, name) + return self.persons[name] + + def _get_target(self, ctx: str, name: str) -> str: + if name not in self.targets: + raise InvalidTargetError(ctx, name) + return name + + def get_groups(self, ctx: str, meta: dict) -> t.List[Group]: + return [self._get_group(ctx, g) for g in meta['groups']] + + def get_persons(self, ctx: str, names: str | t.List[str]) -> t.List[Person]: + if isinstance(names, str): + names = [names] + return [self._get_person(ctx, name) for name in names] + + def get_targets(self, ctx: str, names: str | t.List[str]) -> t.List[str]: + if isinstance(names, str): + names = [names] + return [self._get_target(ctx, name) for name in names] + + def get_copyrights(self, ctx: str, meta: list) -> t.List[Copyright]: + return [Copyright(name=self._get_person(ctx, m['name']), year=m['year']) for m in meta] + + def iter_component_dirs(self) -> t.Generator[p.Path]: + components_dir = self.repo_path / const.COMPONENTS_DIR + return components_dir.iterdir() diff --git a/devtools/devtool/templates/README.md b/devtools/devtool/templates/README.md new file mode 100644 index 00000000..1049c333 --- /dev/null +++ b/devtools/devtool/templates/README.md @@ -0,0 +1,113 @@ +# ESP-IDF Components library + +[![Build Status](https://github.com/UncleRus/esp-idf-lib/workflows/Build%20examples/badge.svg)](https://github.com/UncleRus/esp-idf-lib/actions?query=workflow%3A%22Build+examples%22) +[![Build the documentation](https://github.com/UncleRus/esp-idf-lib/workflows/Build%20the%20documentation/badge.svg)](https://github.com/UncleRus/esp-idf-lib/actions?query=workflow%3A%22Build+the+documentation%22) +[![Docs Status](https://readthedocs.org/projects/esp-idf-lib/badge/?version=latest&style=flat)](https://esp-idf-lib.readthedocs.io/en/latest/) + +Components for Espressif ESP32 [ESP-IDF framework](https://github.com/espressif/esp-idf) +and [ESP8266 RTOS SDK](https://github.com/espressif/ESP8266_RTOS_SDK). + +Part of them ported from [esp-open-rtos](https://github.com/SuperHouse/esp-open-rtos). + +## Supported versions of frameworks and devices + +| Chip | Framework | Versions +|----------------|--------------------|----------------------- +| ESP32-xx | ESP-IDF | All officially supported versions (see [Support Period Policy](https://github.com/espressif/esp-idf/blob/master/SUPPORT_POLICY.md)) and `master` +| ESP8266 *[1]* | ESP8266 RTOS SDK | `master`, v3.4 + +See "Supported on" column for each of the components. + +## How to use + +### ESP32-xx + +Clone this repository somewhere, e.g.: + +```Shell +cd ~/myprojects/esp +git clone https://github.com/UncleRus/esp-idf-lib.git +``` + +Add path to components in your [CMakeLists.txt](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html): +e.g: + +```CMake +cmake_minimum_required(VERSION 3.5) +set(EXTRA_COMPONENT_DIRS /home/user/myprojects/esp/esp-idf-lib/components) +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(my-esp-project) +``` + +or with CMake [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) + +```CMake +cmake_minimum_required(VERSION 3.11) +include(FetchContent) +FetchContent_Declare( + espidflib + GIT_REPOSITORY https://github.com/UncleRus/esp-idf-lib.git +) +FetchContent_MakeAvailable(espidflib) +set(EXTRA_COMPONENT_DIRS ${espidflib_SOURCE_DIR}/components) +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(my-esp-project) +``` + +### ESP8266 RTOS SDK + +Clone this repository somewhere, e.g.: + +```Shell +cd ~/myprojects/esp +git clone https://github.com/UncleRus/esp-idf-lib.git +``` + +Add path to components in your [project makefile](https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/api-guides/build-system.html), +e.g: + +```Makefile +PROJECT_NAME := my-esp-project +EXTRA_COMPONENT_DIRS := /home/user/myprojects/esp/esp-idf-lib/components +EXCLUDE_COMPONENTS := max7219 mcp23x17 led_strip max31865 ls7366r max31855 +include $(IDF_PATH)/make/project.mk +``` + +See [GitHub examples](https://github.com/UncleRus/esp-idf-lib/tree/master/examples) +or [GitLab examples](https://gitlab.com/UncleRus/esp-idf-lib/tree/master/examples). + +## Documentation + +- [Documentation](https://esp-idf-lib.readthedocs.io/en/latest/) +- [Frequently asked questions](FAQ.md) + +## Components +{% for g_name, components in groups|dictsort(False) %} +### {{ g_name }} + +| Component | Description | License | Supported on | Thread safety | +|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|---------------| +{%- for c in components %} +| {{ '%-24s' % ('**%s**' % c.name) }} | {{ '%-80s' % c.description }} | {{ '%-7s' % c.license.value }} | {{ '%-18s' % c.targets|join(', ') }} | {{ '%-13s' % c.thread_safe.value }} | +{%- endfor %} + +{% endfor -%} + +## Library maintainers + +- [Ruslan V. Uss](https://github.com/UncleRus) +- [Tomoyuki Sakurai](https://github.com/trombik) + +## Credits +{% for full_name, copyrights in authors|dictsort() -%} + +{%- if copyrights.person.gh_id -%} + {% set person_name = '[%s](https://github.com/%s)' % (full_name, copyrights.person.gh_id) %} +{%- elif copyrights.person.url -%} + {% set person_name = '[%s](%s)' % (full_name, copyrights.person.url) %} +{%- else -%} + {% set person_name = full_name %} +{%- endif %} +- {{ person_name }}: {% for c in copyrights.components %}`{{ c.name }}` {% endfor %} + +{%- endfor %} diff --git a/devtools/groups.yml b/devtools/groups.yml index c90f2ffe..41de61a0 100644 --- a/devtools/groups.yml +++ b/devtools/groups.yml @@ -1,5 +1,3 @@ ---- - - name: adc-dac description: ADC/DAC libraries diff --git a/devtools/persons.yml b/devtools/persons.yml index fe5cb0bd..a5cb7e54 100644 --- a/devtools/persons.yml +++ b/devtools/persons.yml @@ -1,4 +1,3 @@ ---- - name: UncleRus email: unclerus@gmail.com full_name: Ruslan V. Uss @@ -15,6 +14,7 @@ - name: Andrej full_name: Andrej Krutak + gh_id: andree182 email: dev@andree.sk - name: gschorcht @@ -35,15 +35,19 @@ gh_id: jsuiker - name: PavelM + full_name: Pavel Merzlyakov email: merzlyakovpavel@gmail.com - name: AlexS + full_name: Alex Stewart + gh_id: astewart-consensus email: foogod@gmail.com - name: GrzegorzH email: ghetman@gmail.com - name: BhuvanchandraD + gh_id: bhuvanchandra email: bhuvanchandra.dv@gmail.com - name: RichardA @@ -54,16 +58,19 @@ - name: BernhardG email: Bernhard.Guillon@begu.org + url: https://gitlab.com/mrnice - name: zeroday # GH account does not exist email: zeroday@nodemcu.com - name: PhamNgocT - # GH account exists, but not sure that is the correct one + full_name: Thanh Pham + gh_id: panoti email: pnt239@gmail.com - name: Sensirion + full_name: Sensirion AG gh_id: Sensirion - name: nated0g @@ -83,6 +90,7 @@ - name: DavidD full_name: David Douard + gh_id: douardda email: david.douard@sdfa3.org - name: Jkallus @@ -120,3 +128,27 @@ full_name: Joshua Butler gh_id: shuki25 email: josh.butler929@gmail.com + +- name: horsemann07 + full_name: Raghav Jha + gh_id: horsemann07 + +- name: jeff_rowberg + full_name: Jeff Rowberg + url: https://www.i2cdevlib.com/ + +- name: a_e_dalzotto + full_name: Angelo Elias Dalzotto + email: 150633@upf.br + +- name: g_b_vicari + full_name: Gabriel Boni Vicari + email: 133192@upf.br + +- name: gepid + full_name: Grupo de Pesquisa em Cultura Digital + url: http://gepid.upf.br/ + +- name: slimcdk + full_name: Christian Skjerning + gh_id: slimcdk diff --git a/devtools/requirements.txt b/devtools/requirements.txt new file mode 100644 index 00000000..679e2bc9 --- /dev/null +++ b/devtools/requirements.txt @@ -0,0 +1,3 @@ +Jinja2==3.1.2 +pydantic==2.1.1 +PyYAML==6.0 diff --git a/devtools/spec/component.rb b/devtools/spec/component.rb deleted file mode 100644 index b3a22b2a..00000000 --- a/devtools/spec/component.rb +++ /dev/null @@ -1,117 +0,0 @@ -# frozen_string_literal: true - -require_relative "copyright" -require_relative "target" -require_relative "person" -require_relative "license" -require_relative "group" - -class Component - # Component represents a component in metadata. it is not a `component` in - # esp-idf. a metadata may contain multiple Components. usually, an esp-idf - # component has one `component` and its metadata usually contains one - # Component. but a project, such as `esp-idf-lib` repository, may have - # multiple `components`. - - # a list of valid keys. some values of keys are simply String or Integer - # object. others are objects, or resources, defined in the specification. - VALID_KEYS = %w[ - name - description - group - groups - code_owners - depends - thread_safe - targets - licenses - copyrights - ].freeze - - def initialize(hash) - validate_keys(hash) - @metadata = hash - @name = name - end - - attr_reader :metadata - - def validate_keys(hash) - # validate basic constraints only. the classes are for tests in spec - # files, providing readable tests and results. the actual specification is - # in the spec files, not in classes. rspec is more readable and maintainable - # than ruby code. - # - # maybe, if these classes are found to be useful, create a gem of the - # classes and specification tests in the gem. until then, keep the classes - # simple so that others can maintain the specification. - raise ArgumentError, "missing name" unless hash.key?("name") - raise ArgumentError, "empty name" if hash["name"].empty? - - hash.each_key do |k| - raise ArgumentError, "unknown key: `#{k}`" unless VALID_KEYS.include?(k) - end - end - - def to_s - metadata["name"] - end - - # special keys that return instances of classes. - def group - Group.new(metadata["group"]) - end - - def groups - metadata["groups"].map { |g| Group.new(g) } - end - - def code_owners - metadata["code_owners"].map { |p| Person.new(p) } - end - - def targets - metadata["targets"].map { |t| Target.new(t) } - end - - def licenses - metadata["licenses"].map { |l| License.new(l) } - end - - def copyrights - metadata["copyrights"].map { |c| Copyright.new(c) } - end - - def valid_key_with_question?(name) - name.to_s.end_with?("?") && VALID_KEYS.include?(name.to_s.chop) - end - - def valid_key?(name) - VALID_KEYS.include?(name.to_s) - end - - def description - # if description contains newline, remove it - metadata["description"].split("\n").join(" ") - end - - def method_missing(name, *args, &block) - # name?, description?, etc - return metadata.key?(name.to_s.chop) if valid_key_with_question?(name) - # name, etc - return metadata[name.to_s] if valid_key?(name) - - super - end - - def respond_to_missing?(name, include_private = false) - # when name is not something we don't know, do `super`, i.e. raising - # unknown methods error. - super unless valid_key_with_question?(name) || valid_key?(name) - end - - def group_of?(arg) - group_name = arg.respond_to?(:name) ? arg.name : arg - group.name == group_name || groups.map(&:name).include?(group_name) - end -end diff --git a/devtools/spec/component_spec.rb b/devtools/spec/component_spec.rb deleted file mode 100644 index 5813f7bf..00000000 --- a/devtools/spec/component_spec.rb +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -require_relative "spec_helper" - -VALID_THREAD_SAFE_VALUES = [true, false, "N/A"].freeze - -# rubocop:disable Metrics/BlockLength -metadata_array.each do |m| - RSpec.describe "metadata #{m}" do - it "has components" do - expect(m.components?).to be true - end - - it "has one or more of components" do - expect(m.components.length).to be >= 1 - end - - m.components.each do |c| - describe "component #{c}" do - subject { c } - it "does not raise error" do - expect { subject }.not_to raise_error - end - - describe "name" do - it "has name" do - expect(subject.name?).to be true - end - - it "has String name" do - expect(subject.name).to be_kind_of(String) - end - - it "has non-empty name" do - expect(subject.name).not_to be_empty - end - end - - describe "description" do - it "has description" do - expect(subject.description?).to be true - end - - it "has String description" do - expect(subject.description).to be_kind_of(String) - end - end - - describe "group" do - it "has a primary group" do - expect(subject.group?).to be true - end - - it "has a valid primary group" do - expect { subject.group }.not_to raise_error - end - end - - describe "groups" do - context "when it has one or more groups" do - it "has zero or more of groups" do - skip "it has no groups" unless subject.groups? - expect(subject.groups.length).to be >= 0 - end - - it "has valid groups" do - skip "it has no groups" unless subject.groups? - skip "it has zero group" if subject.groups? && subject.groups.empty? - expect { subject.groups }.not_to raise_error - end - end - end - - describe "depends" do - # XXX `depends` needs better tests because `depends` has zero or - # more of components, and some components are one in our components, - # others are one in esp-idf. we need to know one in `depends` - # actually exists. other resources, such as `People` resolves the - # issue by having a list of `People`. - context "when it has depends" do - it "has zero or more of depends" do - skip "it has no depends" unless subject.depends? - expect(subject.depends.length).to be >= 0 - end - - it "has valid depends" do - skip "it has no depends" unless subject.depends? - skip "it has zero depends" if subject.depends? && subject.depends.empty? - expect { subject.depends }.not_to raise_error - end - end - end - - describe "thread_safe" do - it "has thread_safe" do - expect(subject.thread_safe?).to be true - end - - it "has valid values of thread_safe" do - expect(VALID_THREAD_SAFE_VALUES).to include subject.thread_safe - end - end - - describe "targets" do - it "has targets" do - expect(subject.targets?).to be true - end - - it "has valid targets" do - expect { subject.targets }.not_to raise_error - end - end - - describe "licenses" do - it "has licenses" do - expect(subject.licenses?).to be true - end - - it "has valid licenses" do - expect { subject.licenses }.not_to raise_error - end - - it "has one or more of licenses" do - expect(subject.licenses.length).to be >= 1 - end - end - - describe "copyrights" do - it "has copyrights" do - expect(subject.copyrights?).to be true - end - - it "has valid copyrights" do - expect { subject.copyrights }.not_to raise_error - end - - it "has one or more of copyrights" do - expect(subject.copyrights.length).to be >= 1 - end - end - - describe "each copyright" do - it "has only one of name or author in copyrights" do - subject.copyrights.each do |copyright| - expect(copyright.name? && copyright.author?).to be false - end - end - - context "when a copyright has author" do - it "has valid Person as copyright author" do - subject.copyrights.select(&:author?).each do |copyright| - expect(copyright.author).to be_a Person - end - end - end - - context "when a copyright has name" do - it "has valid Person as copyright author" do - subject.copyrights.select(&:name?).each do |copyright| - expect(copyright.name).to be_a Person - end - end - end - end - end - end - end -end -# rubocop:enable Metrics/BlockLength diff --git a/devtools/spec/copyright.rb b/devtools/spec/copyright.rb deleted file mode 100644 index 4211bc97..00000000 --- a/devtools/spec/copyright.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -require_relative "person" - -class Copyright - VALID_KEYS = %w[ - author - name - year - ].freeze - - def initialize(hash) - raise ArgumentError, "expect Hash, got `#{hash.class}`" unless hash.is_a?(Hash) - - validate_keys(hash) - @metadata = hash - end - - attr_reader :metadata - - def validate_keys(hash) - hash.each_key do |k| - raise ArgumentError, "unknown key: `#{k}`. valid keys are: #{VALID_KEYS.join(' ')}" unless VALID_KEYS.include? k - end - end - - def author? - metadata.key?("author") - end - - def author - Person.new(metadata["author"]) - end - - def name - Person.new("name" => metadata["name"]) - end - - def name? - metadata.key?("name") - end - - def year - metadata["year"] - end - - def year? - metadata.key?("year") - end -end diff --git a/devtools/spec/group.rb b/devtools/spec/group.rb deleted file mode 100644 index 14bde483..00000000 --- a/devtools/spec/group.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -class Group - VALID_KEYS = %w[name description].freeze - - def initialize(arg) - validate_arg(arg) - validate_keys(arg) if arg.is_a? Hash - - @metadata = if arg.is_a? String - { "name" => arg } - else - arg - end - end - - def validate_keys(arg) - arg.each_key do |k| - raise ArgumentError, "unknown key: `#{k}`. valid keys are: #{VALID_KEYS.join(' ')}" unless VALID_KEYS.include? k - end - raise ArgumentError, "a key, `name` is required, but missing" unless arg.key?("name") - end - - def validate_arg(arg) - raise ArgumentError, "argument must be String or Hash" unless arg.is_a?(String) || arg.is_a?(Hash) - end - - def name? - @metadata.key?("name") - end - - def name - @metadata["name"] - end - - def description? - @metadata.key?("description") - end - - def description - @metadata["description"] - end - - def to_s - @metadata["name"] - end -end diff --git a/devtools/spec/group_list.rb b/devtools/spec/group_list.rb deleted file mode 100644 index faa16f0e..00000000 --- a/devtools/spec/group_list.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -require "yaml" -require_relative "group" - -class GroupList - # path to `groups.yml` - def initialize(arg) - @path = File.expand_path(arg) - end - - attr_reader :path - - def load_file - File.read(path) - end - - def parse - YAML.safe_load(load_file) - end - - def metadata - return @metadata if @metadata - - @metadata = parse - end - - def all - metadata.map { |g| Group.new(g) } - end - - def lookup(name) - metadata.select { |g| g["name"] == name }.map { |g| Group.new(g) } - end -end diff --git a/devtools/spec/groups_spec.rb b/devtools/spec/groups_spec.rb deleted file mode 100644 index 1101e6a8..00000000 --- a/devtools/spec/groups_spec.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -require_relative "spec_helper" -require_relative "group_list" - -file = File.join(File.dirname(__FILE__), "..", "groups.yml") - -RSpec.describe GroupList do - subject { GroupList.new(file) } - - it "creates new instance" do - expect { subject }.not_to raise_error - end - - describe "#load_file" do - it "does not raise" do - expect { subject.load_file }.not_to raise_error - end - end - - describe "#parse" do - it "does not raise" do - expect { subject.parse }.not_to raise_error - end - end - - describe "#metadata" do - it "returns Array" do - expect(subject.metadata).to be_a Array - end - end -end - -RSpec.describe "Group list metadata #{file}" do - groups = GroupList.new(file) - - groups.all.each do |group| - describe "Group #{group}" do - subject { group } - - it "is a Group" do - expect(group).to be_a Group - end - - it "has name as a key" do - expect(group.name?).to be true - end - - it "has non-empty name" do - expect(group.name).not_to be_empty - end - - it "has description as a key" do - expect(group.description?).to be true - end - - it "has non-empty description" do - expect(group.description).not_to be_empty - end - - it "is a unique group" do - expect(groups.lookup(group.name).length).to be 1 - end - end - end -end diff --git a/devtools/spec/license.rb b/devtools/spec/license.rb deleted file mode 100644 index 6b1e104a..00000000 --- a/devtools/spec/license.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class License - def initialize(hash) - raise ArgumentError, "missing key `name`" unless hash.key?("name") - - @metadata = hash - end - - def name - @metadata["name"] - end - - def to_s - name - end -end diff --git a/devtools/spec/metadata.rb b/devtools/spec/metadata.rb deleted file mode 100644 index 2dc6bfd1..00000000 --- a/devtools/spec/metadata.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -require_relative "component" - -# A class that represents metadaata, `.eil.yml` -class Metadata - # path: path to component root directory - def initialize(path) - raise ArgumentError, "path is missing" unless path - - @path = path - @name = File.basename(path) - raise ArgumentError, "path `#{path}` does not have basename" if @name.empty? - - metadata - end - - attr_reader :path, :name - - def metadata - return @metadata if @metadata - - file = File.join(path, ".eil.yml") - @metadata = YAML.safe_load(File.read(file)) - rescue StandardError => e - warn "failed to open `#{file}`. does component `#{File.basename(path)}` have `.eil.yml` file?" - raise e - end - - def components? - metadata.key?("components") - end - - def components - metadata["components"].map { |c| Component.new(c) } - end - - def to_s - name - end -end diff --git a/devtools/spec/person.rb b/devtools/spec/person.rb deleted file mode 100644 index 8fc7fd49..00000000 --- a/devtools/spec/person.rb +++ /dev/null @@ -1,100 +0,0 @@ -# frozen_string_literal: true - -require "yaml" - -# A class that repesents Peson -class Person - PERSON_FILE = File.expand_path(File.join(File.dirname("__FILE__"), "persons.yml")).freeze - - def initialize(arg) - validate_arg(arg) - validate_keys(arg) if arg.is_a? Hash - - name = if arg.is_a? String - arg - else - arg["name"] - end - @metadata = lookup_person(name) - end - - attr_reader :metadata, :persons - - def validate_keys(hash) - raise ArgumentError, "missing key: `name`" unless hash.key?("name") - end - - def valid_arg_class?(arg) - arg.is_a?(String) || arg.is_a?(Hash) - end - - def validate_arg(arg) - raise ArgumentError, "String or dict is ecpected, but got `#{arg.class}`" unless valid_arg_class?(arg) - end - - def load_person_file - File.read(PERSON_FILE) - end - - def parse(string) - return @persons if @persons - - @persons = YAML.safe_load(string) - rescue StandardError => e - warn "failed to parse #{PERSON_FILE} as YAML" - raise e - end - - def lookup_person(name) - parse(load_person_file) - person = persons.select { |p| p["name"] == name } - raise ArgumentError, "cannot find Person with name `#{name}` in #{PERSON_FILE}" unless person - raise ArgumentError, "Person with name `#{name}` has duplicated entry in #{PERSON_FILE}" if person.length > 1 - - person.first - end - - def name? - metadata.key?("name") - end - - def name - metadata["name"] - end - - def full_name? - metadata.key?("full_name") - end - - def full_name - metadata["full_name"] - end - - def gh_id? - metadata.key?("gh_id") - end - - def gh_id - metadata["gh_id"] - end - - def email? - metadata.key?("email") - end - - def email - metadata["email"] - end - - def website? - metadata.key?("website") - end - - def website - metadata["website"] - end - - def to_s - metadata["name"] - end -end diff --git a/devtools/spec/person_list.rb b/devtools/spec/person_list.rb deleted file mode 100644 index 3c9acb3f..00000000 --- a/devtools/spec/person_list.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -require "yaml" - -class PersonList - # path to `persons.yml` - def initialize(arg) - @path = File.expand_path(arg) - end - - attr_reader :path - - def load_file - File.read(path) - end - - def parse - YAML.safe_load(load_file) - end - - def metadata - return @metadata if @metadata - - @metadata = parse - end - - def all - metadata - end - - def lookup(name) - metadata.select { |g| g["name"] == name } - end -end diff --git a/devtools/spec/persons_spec.rb b/devtools/spec/persons_spec.rb deleted file mode 100644 index f287531d..00000000 --- a/devtools/spec/persons_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -require_relative "spec_helper" -require_relative "person_list" -require_relative "person" - -file = File.join(File.dirname(__FILE__), "..", "persons.yml") - -RSpec.describe "Person list metadata #{file}" do - persons = PersonList.new(file) - - persons.all.each do |person| - describe "Person #{person}" do - subject { Person.new(person) } - - it "has a name" do - expect(subject.name?).to be true - end - - it "has non-empty name" do - expect(subject.name).not_to be_empty - end - - it "has one or more of contact information" do - has_contact = subject.email? || subject.gh_id? || subject.full_name? || subject.website? - expect(has_contact).to be true - end - - it "is unique in persons.yml" do - expect(persons.lookup(subject.name).length).to be 1 - end - end - end -end diff --git a/devtools/spec/spec_helper.rb b/devtools/spec/spec_helper.rb deleted file mode 100644 index 4e894c35..00000000 --- a/devtools/spec/spec_helper.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -require "rspec" -require "yaml" -require_relative "metadata" - -@component_dir = File.expand_path(File.join(File.dirname(__FILE__), "../../components")) - -def metadata_array - directories = Dir.children(Dir.new(@component_dir)).map { |c| File.join(@component_dir, c) } - directories = directories.select { |d| File.directory?(d) } - directories.map { |path| Metadata.new(path) } -end diff --git a/devtools/spec/target.rb b/devtools/spec/target.rb deleted file mode 100644 index 353e6984..00000000 --- a/devtools/spec/target.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -require "yaml" - -# A class that represents build target - -class Target - VALID_KEYS = %w[name].freeze - TARGETS_FILE = File.expand_path(File.join(File.dirname("__FILE__"), "..", "targets.yml")).freeze - - def initialize(arg) - validate_arg(arg) - validate_keys(arg) if arg.is_a?(Hash) - @metadata = if arg.is_a?(String) - { "name" => arg } - else - arg - end - end - - attr_reader :metadata - - def valid_arg_class?(arg) - arg.is_a?(String) || arg.is_a?(Hash) - end - - def validate_arg(arg) - raise ArgumentError, "String or dict is ecpected, but got `#{arg.class}`" unless valid_arg_class?(arg) - end - - def validate_keys(hash) - hash.each_key do |k| - raise ArgumentError, "unknown key: `#{k}`. valid keys are: #{VALID_KEYS.join(' ')}" unless VALID_KEYS.include?(k) - end - end - - def name? - metadata.key?("name") - end - - def name - metadata["name"] - end - - def load_file - File.read(TARGETS_FILE) - end - - def parse(string) - YAML.safe_load(string) - rescue StandardError => e - warn "failed to parse #{TARGETS_FILE} as YAML" - raise e - end - - def targets - return @targets if @targets - - @targets = parse(load_file) - end - - def lookup(name) - targets.select { |t| t.name == name } - end -end diff --git a/devtools/spec/target_list.rb b/devtools/spec/target_list.rb deleted file mode 100644 index 987f2bf2..00000000 --- a/devtools/spec/target_list.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -require "person_list" - -class TargetList < PersonList -end diff --git a/devtools/spec/targets_spec.rb b/devtools/spec/targets_spec.rb deleted file mode 100644 index 05147729..00000000 --- a/devtools/spec/targets_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -require_relative "spec_helper" -require_relative "target_list" - -file = File.join(File.dirname(__FILE__), "..", "targets.yml") - -RSpec.describe "Target list metadata #{file}" do - targets = TargetList.new(file) - - targets.all.each do |target| - describe "Target #{target}" do - subject { Target.new(target) } - - it "has a name" do - expect(subject.name?).to be true - end - - it "has non-empty name" do - expect(subject.name).not_to be_empty - end - - it "is a unique target in the list" do - expect(targets.lookup(subject.name).length).to be 1 - end - end - end -end diff --git a/devtools/targets.yml b/devtools/targets.yml index 3555112e..47ba52f0 100644 --- a/devtools/targets.yml +++ b/devtools/targets.yml @@ -1,5 +1,11 @@ --- - name: esp32 - +- name: esp32c2 +- name: esp32c3 +- name: esp32c6 +- name: esp32h2 +- name: esp32h4 +- name: esp32s2 +- name: esp32s3 - name: esp8266