diff --git a/CHANGELOG.md b/CHANGELOG.md index f02a8257f..45ce15fd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,11 @@ All notable changes to this project will be documented in this file. - Support for Frysk language translations by Christiaan Heerze - ESP8266 Fallback to ``*.bin.gz`` binary when OTA upload of ``*.bin`` binary fails - Berry language improved Tasmota integration + +### Changed - IRremoteESP8266 library from v2.7.14 to v2.7.15 +- NeoPixelBus library from v2.6.0 to v2.6.1.4 +- ILI9341 library from Adafruit_ILI9341-1.2.0-Tasmota-1.0 to ILI9341-gemu-1.0 ## [9.2.0.6] 20210210 ### Changed diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 4645593b6..175054b38 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -141,6 +141,9 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota ### Changed - Remove support for direct migration from versions before v8.1.0 (Doris) +- IRremoteESP8266 library from v2.7.14 to v2.7.15 +- NeoPixelBus library from v2.6.0 to v2.6.1.4 +- ILI9341 library from Adafruit_ILI9341-1.2.0-Tasmota-1.0 to ILI9341-gemu-1.0 - Command ``Sleep 0`` removes any sleep from wifi modem except when ESP32 BLE is active - Logging from heap to stack freeing 700 bytes RAM - Disabled ``USE_LIGHT`` light support for ZBBridge saving 17.6kB [#10374](https://github.com/arendst/Tasmota/issues/10374) diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/.gitattributes b/lib/lib_basic/NeoPixelBus-2.6.1.4/.gitattributes similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/.gitattributes rename to lib/lib_basic/NeoPixelBus-2.6.1.4/.gitattributes diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/.github/FUNDING.yml b/lib/lib_basic/NeoPixelBus-2.6.1.4/.github/FUNDING.yml similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/.github/FUNDING.yml rename to lib/lib_basic/NeoPixelBus-2.6.1.4/.github/FUNDING.yml diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/.github/ISSUE_TEMPLATE/all-others.md b/lib/lib_basic/NeoPixelBus-2.6.1.4/.github/ISSUE_TEMPLATE/all-others.md similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/.github/ISSUE_TEMPLATE/all-others.md rename to lib/lib_basic/NeoPixelBus-2.6.1.4/.github/ISSUE_TEMPLATE/all-others.md diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/.github/ISSUE_TEMPLATE/bug_report.md b/lib/lib_basic/NeoPixelBus-2.6.1.4/.github/ISSUE_TEMPLATE/bug_report.md similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/.github/ISSUE_TEMPLATE/bug_report.md rename to lib/lib_basic/NeoPixelBus-2.6.1.4/.github/ISSUE_TEMPLATE/bug_report.md diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/.github/ISSUE_TEMPLATE/feature_request.md b/lib/lib_basic/NeoPixelBus-2.6.1.4/.github/ISSUE_TEMPLATE/feature_request.md similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/.github/ISSUE_TEMPLATE/feature_request.md rename to lib/lib_basic/NeoPixelBus-2.6.1.4/.github/ISSUE_TEMPLATE/feature_request.md diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/.gitignore b/lib/lib_basic/NeoPixelBus-2.6.1.4/.gitignore similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/.gitignore rename to lib/lib_basic/NeoPixelBus-2.6.1.4/.gitignore diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/COPYING b/lib/lib_basic/NeoPixelBus-2.6.1.4/COPYING similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/COPYING rename to lib/lib_basic/NeoPixelBus-2.6.1.4/COPYING diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/ReadMe.md b/lib/lib_basic/NeoPixelBus-2.6.1.4/ReadMe.md similarity index 80% rename from lib/lib_basic/NeoPixelBus-2.6.0/ReadMe.md rename to lib/lib_basic/NeoPixelBus-2.6.1.4/ReadMe.md index 7e76411f6..ab8d6fd42 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/ReadMe.md +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/ReadMe.md @@ -10,8 +10,11 @@ Supports most Arduino platforms. Please read this best practices link before connecting your NeoPixels, it will save you a lot of time and effort. [Adafruit NeoPixel Best Practices](https://learn.adafruit.com/adafruit-neopixel-uberguide/best-practices) -For quick questions and support jump on Gitter and ask away. -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Makuna/NeoPixelBus?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +For quick questions and support: +* [Try the new Github Discussions](https://github.com/Makuna/NeoPixelBus/discussions) +* [Discord NeoPixelBus Invitation](https://discord.gg/c6FrysvZyV) or if you are already a member of [Discord Server NeoPixelBus](https://discord.com/channels/789177382221119519/789177382221119521) +* Or jump on Gitter +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Makuna/NeoPixelBus?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) For bugs, make sure there isn't an active issue and then create one. diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/DotStarTest/DotStarTest.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/DotStarTest/DotStarTest.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/DotStarTest/DotStarTest.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/DotStarTest/DotStarTest.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/NeoPixelBrightness/NeoPixelBrightness.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/NeoPixelBrightness/NeoPixelBrightness.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/NeoPixelBrightness/NeoPixelBrightness.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/NeoPixelBrightness/NeoPixelBrightness.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/NeoPixelGamma/NeoPixelGamma.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/NeoPixelGamma/NeoPixelGamma.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/NeoPixelGamma/NeoPixelGamma.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/NeoPixelGamma/NeoPixelGamma.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/NeoPixelTest/NeoPixelTest.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/NeoPixelTest/NeoPixelTest.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/NeoPixelTest/NeoPixelTest.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/NeoPixelTest/NeoPixelTest.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/animations/NeoPixelAnimation/NeoPixelAnimation.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/animations/NeoPixelAnimation/NeoPixelAnimation.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/animations/NeoPixelAnimation/NeoPixelAnimation.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/animations/NeoPixelAnimation/NeoPixelAnimation.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/animations/NeoPixelCylon/NeoPixelCylon.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/animations/NeoPixelCylon/NeoPixelCylon.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/animations/NeoPixelCylon/NeoPixelCylon.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/animations/NeoPixelCylon/NeoPixelCylon.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/animations/NeoPixelFunFadeInOut/NeoPixelFunFadeInOut.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/animations/NeoPixelFunFadeInOut/NeoPixelFunFadeInOut.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/animations/NeoPixelFunFadeInOut/NeoPixelFunFadeInOut.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/animations/NeoPixelFunFadeInOut/NeoPixelFunFadeInOut.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/animations/NeoPixelFunLoop/NeoPixelFunLoop.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/animations/NeoPixelFunLoop/NeoPixelFunLoop.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/animations/NeoPixelFunLoop/NeoPixelFunLoop.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/animations/NeoPixelFunLoop/NeoPixelFunLoop.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/animations/NeoPixelFunRandomChange/NeoPixelFunRandomChange.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/animations/NeoPixelFunRandomChange/NeoPixelFunRandomChange.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/animations/NeoPixelFunRandomChange/NeoPixelFunRandomChange.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/animations/NeoPixelFunRandomChange/NeoPixelFunRandomChange.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/animations/NeoPixelRotateLoop/NeoPixelRotateLoop.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/animations/NeoPixelRotateLoop/NeoPixelRotateLoop.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/animations/NeoPixelRotateLoop/NeoPixelRotateLoop.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/animations/NeoPixelRotateLoop/NeoPixelRotateLoop.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBitmap/NeoPixelBitmap.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBitmap/NeoPixelBitmap.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBitmap/NeoPixelBitmap.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBitmap/NeoPixelBitmap.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBitmap/Strings.bmp b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBitmap/Strings.bmp similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBitmap/Strings.bmp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBitmap/Strings.bmp diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBitmap/StringsW.bmp b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBitmap/StringsW.bmp similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBitmap/StringsW.bmp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBitmap/StringsW.bmp diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBufferCylon/Cylon.pdn b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBufferCylon/Cylon.pdn similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBufferCylon/Cylon.pdn rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBufferCylon/Cylon.pdn diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBufferCylon/CylonGrb.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBufferCylon/CylonGrb.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBufferCylon/CylonGrb.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBufferCylon/CylonGrb.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBufferCylon/CylonGrbw.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBufferCylon/CylonGrbw.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBufferCylon/CylonGrbw.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBufferCylon/CylonGrbw.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBufferCylon/NeoPixelBufferCylon.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBufferCylon/NeoPixelBufferCylon.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBufferCylon/NeoPixelBufferCylon.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBufferCylon/NeoPixelBufferCylon.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBufferShader/NeoPixelBufferShader.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBufferShader/NeoPixelBufferShader.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelBufferShader/NeoPixelBufferShader.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelBufferShader/NeoPixelBufferShader.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelDibTest/NeoPixelDibTest.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelDibTest/NeoPixelDibTest.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/bitmaps/NeoPixelDibTest/NeoPixelDibTest.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/bitmaps/NeoPixelDibTest/NeoPixelDibTest.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/sevensegment/NeoSegmentBus/NeoSegmentBus.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/sevensegment/NeoSegmentBus/NeoSegmentBus.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/sevensegment/NeoSegmentBus/NeoSegmentBus.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/sevensegment/NeoSegmentBus/NeoSegmentBus.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/sevensegment/NeoSegmentFade/NeoSegmentFade.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/sevensegment/NeoSegmentFade/NeoSegmentFade.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/sevensegment/NeoSegmentFade/NeoSegmentFade.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/sevensegment/NeoSegmentFade/NeoSegmentFade.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelMosaicDump/NeoPixelMosaicDump.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelMosaicDump/NeoPixelMosaicDump.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelMosaicDump/NeoPixelMosaicDump.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelMosaicDump/NeoPixelMosaicDump.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelMosaicTest/NeoPixelMosaicTest.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelMosaicTest/NeoPixelMosaicTest.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelMosaicTest/NeoPixelMosaicTest.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelMosaicTest/NeoPixelMosaicTest.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelRingTopologyTest/NeoPixelRingTopologyTest.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelRingTopologyTest/NeoPixelRingTopologyTest.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelRingTopologyTest/NeoPixelRingTopologyTest.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelRingTopologyTest/NeoPixelRingTopologyTest.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelTilesDump/NeoPixelTilesDump.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelTilesDump/NeoPixelTilesDump.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelTilesDump/NeoPixelTilesDump.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelTilesDump/NeoPixelTilesDump.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelTilesTest/NeoPixelTilesTest.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelTilesTest/NeoPixelTilesTest.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelTilesTest/NeoPixelTilesTest.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelTilesTest/NeoPixelTilesTest.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelTopologyDump/NeoPixelTopologyDump.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelTopologyDump/NeoPixelTopologyDump.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelTopologyDump/NeoPixelTopologyDump.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelTopologyDump/NeoPixelTopologyDump.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelTopologyTest/NeoPixelTopologyTest.ino b/lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelTopologyTest/NeoPixelTopologyTest.ino similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/examples/topologies/NeoPixelTopologyTest/NeoPixelTopologyTest.ino rename to lib/lib_basic/NeoPixelBus-2.6.1.4/examples/topologies/NeoPixelTopologyTest/NeoPixelTopologyTest.ino diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/circular.png b/lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/circular.png similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/circular.png rename to lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/circular.png diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/cubic.png b/lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/cubic.png similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/cubic.png rename to lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/cubic.png diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/different.png b/lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/different.png similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/different.png rename to lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/different.png diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/exponential.png b/lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/exponential.png similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/exponential.png rename to lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/exponential.png diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/gamma.png b/lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/gamma.png similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/gamma.png rename to lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/gamma.png diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/pronounced.png b/lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/pronounced.png similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/pronounced.png rename to lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/pronounced.png diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/quadratic.png b/lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/quadratic.png similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/quadratic.png rename to lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/quadratic.png diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/quintic.png b/lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/quintic.png similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/quintic.png rename to lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/quintic.png diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/sinusoidal.png b/lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/sinusoidal.png similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/extras/curves/sinusoidal.png rename to lib/lib_basic/NeoPixelBus-2.6.1.4/extras/curves/sinusoidal.png diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/keywords.txt b/lib/lib_basic/NeoPixelBus-2.6.1.4/keywords.txt similarity index 88% rename from lib/lib_basic/NeoPixelBus-2.6.0/keywords.txt rename to lib/lib_basic/NeoPixelBus-2.6.1.4/keywords.txt index ca68e0715..f7e2f6832 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/keywords.txt +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/keywords.txt @@ -10,6 +10,8 @@ NeoPixelBus KEYWORD1 NeoPixelSegmentBus KEYWORD1 RgbwColor KEYWORD1 RgbColor KEYWORD1 +Rgb16Color KEYWORD1 +Rgb48Color KEYWORD1 HslColor KEYWORD1 HsbColor KEYWORD1 HtmlColor KEYWORD1 @@ -24,7 +26,12 @@ NeoRbgFeature KEYWORD1 NeoWrgbTm1814Feature KEYWORD1 DotStarBgrFeature KEYWORD1 DotStarLbgrFeature KEYWORD1 +Lpd6803GrbFeature KEYWORD1 +Lpd6803GbrFeature KEYWORD1 +Lpd6803BrgFeature KEYWORD1 +Lpd6803RgbFeature KEYWORD1 Lpd8806GrbFeature KEYWORD1 +Lpd8806BrgFeature KEYWORD1 P9813BgrFeature KEYWORD1 SevenSegmentFeature KEYWORD1 Neo800KbpsMethod KEYWORD1 @@ -159,6 +166,12 @@ NeoEsp8266BitBangLc8812InvertedMethod KEYWORD1 NeoEsp8266BitBangApa106InvertedMethod KEYWORD1 NeoEsp8266BitBang800KbpsInvertedMethod KEYWORD1 NeoEsp8266BitBang400KbpsInvertedMethod KEYWORD1 +NeoEsp32I2sNWs2812xMethod KEYWORD1 +NeoEsp32I2sNSk6812Method KEYWORD1 +NeoEsp32I2sNTm1814Method KEYWORD1 +NeoEsp32I2sN800KbpsMethod KEYWORD1 +NeoEsp32I2sN400KbpsMethod KEYWORD1 +NeoEsp32I2sNApa106Method KEYWORD1 NeoEsp32I2s0Ws2812xMethod KEYWORD1 NeoEsp32I2s0Sk6812Method KEYWORD1 NeoEsp32I2s0Tm1814Method KEYWORD1 @@ -171,6 +184,12 @@ NeoEsp32I2s1Tm1814Method KEYWORD1 NeoEsp32I2s1800KbpsMethod KEYWORD1 NeoEsp32I2s1400KbpsMethod KEYWORD1 NeoEsp32I2s1Apa106Method KEYWORD1 +NeoEsp32I2sNWs2812xInvertedMethod KEYWORD1 +NeoEsp32I2sNSk6812InvertedMethod KEYWORD1 +NeoEsp32I2sNTm1814InvertedMethod KEYWORD1 +NeoEsp32I2sN800KbpsInvertedMethod KEYWORD1 +NeoEsp32I2sN400KbpsInvertedMethod KEYWORD1 +NeoEsp32I2sNApa106InvertedMethod KEYWORD1 NeoEsp32I2s0Ws2812xInvertedMethod KEYWORD1 NeoEsp32I2s0Sk6812InvertedMethod KEYWORD1 NeoEsp32I2s0Tm1814InvertedMethod KEYWORD1 @@ -183,6 +202,13 @@ NeoEsp32I2s1Tm1814InvertedMethod KEYWORD1 NeoEsp32I2s1800KbpsInvertedMethod KEYWORD1 NeoEsp32I2s1400KbpsInvertedMethod KEYWORD1 NeoEsp32I2s1Apa106InvertedMethod KEYWORD1 +NeoEsp32RmtNWs2811Method KEYWORD1 +NeoEsp32RmtNWs2812xMethod KEYWORD1 +NeoEsp32RmtNSk6812Method KEYWORD1 +NeoEsp32RmtNTm1814Method KEYWORD1 +NeoEsp32RmtNApa106Method KEYWORD1 +NeoEsp32RmtN800KbpsMethod KEYWORD1 +NeoEsp32RmtN400KbpsMethod KEYWORD1 NeoEsp32Rmt0Ws2811Method KEYWORD1 NeoEsp32Rmt0Ws2812xMethod KEYWORD1 NeoEsp32Rmt0Sk6812Method KEYWORD1 @@ -239,6 +265,13 @@ NeoEsp32Rmt7Tm1814Method KEYWORD1 NeoEsp32Rmt7Apa106Method KEYWORD1 NeoEsp32Rmt7800KbpsMethod KEYWORD1 NeoEsp32Rmt7400KbpsMethod KEYWORD1 +NeoEsp32RmtNWs2811InvertedMethod KEYWORD1 +NeoEsp32RmtNWs2812xInvertedMethod KEYWORD1 +NeoEsp32RmtNSk6812InvertedMethod KEYWORD1 +NeoEsp32RmtNTm1814InvertedMethod KEYWORD1 +NeoEsp32RmtNApa106InvertedMethod KEYWORD1 +NeoEsp32RmtN800KbpsInvertedMethod KEYWORD1 +NeoEsp32RmtN400KbpsInvertedMethod KEYWORD1 NeoEsp32Rmt0Ws2811InvertedMethod KEYWORD1 NeoEsp32Rmt0Ws2812xInvertedMethod KEYWORD1 NeoEsp32Rmt0Sk6812InvertedMethod KEYWORD1 @@ -315,6 +348,12 @@ NeoEsp32BitBangLc8812InvertedMethod KEYWORD1 NeoEsp32BitBangApa106InvertedMethod KEYWORD1 NeoEsp32BitBang800KbpsInvertedMethod KEYWORD1 NeoEsp32BitBang400KbpsInvertedMethod KEYWORD1 +NeoNrf52xPwmNWs2812xMethod KEYWORD1 +NeoNrf52xPwmNSk6812Method KEYWORD1 +NeoNrf52xPwmNTm1814Method KEYWORD1 +NeoNrf52xPwmN800KbpsMethod KEYWORD1 +NeoNrf52xPwmN400KbpsMethod KEYWORD1 +NeoNrf52xPwmNApa106Method KEYWORD1 NeoNrf52xPwm0Ws2812xMethod KEYWORD1 NeoNrf52xPwm0Sk6812Method KEYWORD1 NeoNrf52xPwm0Tm1814Method KEYWORD1 @@ -339,6 +378,12 @@ NeoNrf52xPwm3Tm1814Method KEYWORD1 NeoNrf52xPwm3800KbpsMethod KEYWORD1 NeoNrf52xPwm3400KbpsMethod KEYWORD1 NeoNrf52xPwm3Apa106Method KEYWORD1 +NeoNrf52xPwmNWs2812xInvertedMethod KEYWORD1 +NeoNrf52xPwmNSk6812InvertedMethod KEYWORD1 +NeoNrf52xPwmNTm1814InvertedMethod KEYWORD1 +NeoNrf52xPwmN800KbpsInvertedMethod KEYWORD1 +NeoNrf52xPwmN400KbpsInvertedMethod KEYWORD1 +NeoNrf52xPwmNApa106InvertedMethod KEYWORD1 NeoNrf52xPwm0Ws2812xInvertedMethod KEYWORD1 NeoNrf52xPwm0Sk6812InvertedMethod KEYWORD1 NeoNrf52xPwm0Tm1814InvertedMethod KEYWORD1 @@ -368,21 +413,36 @@ DotStarSpiMethod KEYWORD1 DotStarSpi20MhzMethod KEYWORD1 DotStarSpi10MhzMethod KEYWORD1 DotStarSpi2MhzMethod KEYWORD1 +DotStarSpi1MhzMethod KEYWORD1 +DotStarSpi500KhzMethod KEYWORD1 NeoWs2801Method KEYWORD1 NeoWs2801SpiMethod KEYWORD1 NeoWs2801Spi20MhzMethod KEYWORD1 NeoWs2801Spi10MhzMethod KEYWORD1 NeoWs2801Spi2MhzMethod KEYWORD1 +NeoWs2801Spi1MhzMethod KEYWORD1 +NeoWs2801Spi500KhzMethod KEYWORD1 +Lpd6803SpiMethod KEYWORD1 +Lpd6803Method KEYWORD1 +Lpd6803Spi20MhzMethod KEYWORD1 +Lpd6803Spi10MhzMethod KEYWORD1 +Lpd6803Spi2MhzMethod KEYWORD1 +Lpd6803Spi1MhzMethod KEYWORD1 +Lpd6803Spi500KhzMethod KEYWORD1 Lpd8806Method KEYWORD1 Lpd8806SpiMethod KEYWORD1 Lpd8806Spi20MhzMethod KEYWORD1 Lpd8806Spi10MhzMethod KEYWORD1 Lpd8806Spi2MhzMethod KEYWORD1 +Lpd8806Spi1MhzMethod KEYWORD1 +Lpd8806Spi500KhzMethod KEYWORD1 P9813Method KEYWORD1 P9813SpiMethod KEYWORD1 P9813Spi20MhzMethod KEYWORD1 P9813Spi10MhzMethod KEYWORD1 P9813Spi2MhzMethod KEYWORD1 +P9813Spi1MhzMethod KEYWORD1 +P9813Spi500KhzMethod KEYWORD1 NeoPixelAnimator KEYWORD1 AnimUpdateCallback KEYWORD1 AnimationParam KEYWORD1 @@ -536,4 +596,12 @@ NeoTopologyHint_FirstOnPanel LITERAL1 NeoTopologyHint_InPanel LITERAL1 NeoTopologyHint_LastOnPanel LITERAL1 NeoTopologyHint_OutOfBounds LITERAL1 -PixelIndex_OutOfBounds LITERAL1 \ No newline at end of file +PixelIndex_OutOfBounds LITERAL1 +NeoBusChannel_0 LITERAL1 +NeoBusChannel_1 LITERAL1 +NeoBusChannel_2 LITERAL1 +NeoBusChannel_3 LITERAL1 +NeoBusChannel_4 LITERAL1 +NeoBusChannel_5 LITERAL1 +NeoBusChannel_6 LITERAL1 +NeoBusChannel_7 LITERAL1 diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/library.json b/lib/lib_basic/NeoPixelBus-2.6.1.4/library.json similarity index 91% rename from lib/lib_basic/NeoPixelBus-2.6.0/library.json rename to lib/lib_basic/NeoPixelBus-2.6.1.4/library.json index bd56c759c..6fa9a6e6f 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/library.json +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/library.json @@ -7,8 +7,13 @@ "type": "git", "url": "https://github.com/Makuna/NeoPixelBus" }, - "version": "2.6.0", + "version": "2.6.1", "frameworks": "arduino", - "platforms": ["espressif8266", "espressif32"] + "platforms": "*", + "dependencies": [ + { + "name": "SPI" + } + ] } diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/library.properties b/lib/lib_basic/NeoPixelBus-2.6.1.4/library.properties similarity index 97% rename from lib/lib_basic/NeoPixelBus-2.6.0/library.properties rename to lib/lib_basic/NeoPixelBus-2.6.1.4/library.properties index 718202639..df7a60866 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/library.properties +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/library.properties @@ -1,5 +1,5 @@ name=NeoPixelBus by Makuna -version=2.6.0 +version=2.6.1 author=Michael C. Miller (makuna@live.com) maintainer=Michael C. Miller (makuna@live.com) sentence=A library that makes controlling NeoPixels (APA106, WS2811, WS2812, WS2813 & SK6812) and DotStars (APA102, LPD8806, SK9822, WS2801, P9813) easy. diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/NeoPixelAnimator.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/NeoPixelAnimator.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/NeoPixelAnimator.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/NeoPixelAnimator.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/NeoPixelBrightnessBus.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/NeoPixelBrightnessBus.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/NeoPixelBrightnessBus.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/NeoPixelBrightnessBus.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/NeoPixelBus.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/NeoPixelBus.h similarity index 96% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/NeoPixelBus.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/NeoPixelBus.h index a9ec86565..597c288f1 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/NeoPixelBus.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/NeoPixelBus.h @@ -51,9 +51,13 @@ License along with NeoPixel. If not, see #include "internal/NeoSettings.h" #include "internal/RgbColor.h" +#include "internal/Rgb16Color.h" +#include "internal/Rgb48Color.h" + #include "internal/HslColor.h" #include "internal/HsbColor.h" #include "internal/HtmlColor.h" + #include "internal/RgbwColor.h" #include "internal/SegmentDigit.h" @@ -61,6 +65,7 @@ License along with NeoPixel. If not, see #include "internal/NeoTm1814ColorFeatures.h" #include "internal/DotStarColorFeatures.h" #include "internal/Lpd8806ColorFeatures.h" +#include "internal/Lpd6803ColorFeatures.h" #include "internal/P9813ColorFeatures.h" #include "internal/NeoSegmentFeatures.h" @@ -80,8 +85,11 @@ License along with NeoPixel. If not, see #include "internal/NeoEase.h" #include "internal/NeoGamma.h" +#include "internal/NeoBusChannel.h" + #include "internal/DotStarGenericMethod.h" #include "internal/Lpd8806GenericMethod.h" +#include "internal/Lpd6803GenericMethod.h" #include "internal/Ws2801GenericMethod.h" #include "internal/P9813GenericMethod.h" @@ -114,8 +122,6 @@ License along with NeoPixel. If not, see #endif - - template class NeoPixelBus { public: @@ -129,6 +135,13 @@ public: { } + NeoPixelBus(uint16_t countPixels, uint8_t pin, NeoBusChannel channel) : + _countPixels(countPixels), + _state(0), + _method(pin, countPixels, T_COLOR_FEATURE::PixelSize, T_COLOR_FEATURE::SettingsSize, channel) + { + } + NeoPixelBus(uint16_t countPixels, uint8_t pinClock, uint8_t pinData) : _countPixels(countPixels), _state(0), @@ -156,14 +169,14 @@ public: void Begin() { _method.Initialize(); - Dirty(); + ClearTo(0); } // used by DotStartSpiMethod if pins can be configured void Begin(int8_t sck, int8_t miso, int8_t mosi, int8_t ss) { _method.Initialize(sck, miso, mosi, ss); - Dirty(); + ClearTo(0); } void Show(bool maintainBufferConsistency = true) diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/NeoPixelSegmentBus.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/NeoPixelSegmentBus.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/NeoPixelSegmentBus.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/NeoPixelSegmentBus.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/DotStarColorFeatures.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/DotStarColorFeatures.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/DotStarColorFeatures.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/DotStarColorFeatures.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/DotStarGenericMethod.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/DotStarGenericMethod.h similarity index 95% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/DotStarGenericMethod.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/DotStarGenericMethod.h index 64c8f9a57..1804c32fd 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/DotStarGenericMethod.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/DotStarGenericMethod.h @@ -43,7 +43,7 @@ public: _wire(pinClock, pinData) { _data = static_cast(malloc(_sizeData)); - memset(_data, 0, _sizeData); + // data cleared later in Begin() } #if !defined(__AVR_ATtiny85__) && !defined(ARDUINO_attiny) @@ -128,6 +128,9 @@ typedef DotStarMethodBase> DotStarSpi40MhzMethod; typedef DotStarMethodBase> DotStarSpi20MhzMethod; typedef DotStarMethodBase> DotStarSpi10MhzMethod; typedef DotStarMethodBase> DotStarSpi2MhzMethod; +typedef DotStarMethodBase> DotStarSpi1MhzMethod; +typedef DotStarMethodBase> DotStarSpi500KhzMethod; + typedef DotStarSpi10MhzMethod DotStarSpiMethod; #endif diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Esp32_i2s.c b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Esp32_i2s.c similarity index 72% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Esp32_i2s.c rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Esp32_i2s.c index 44eb72120..032f0fe73 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Esp32_i2s.c +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Esp32_i2s.c @@ -1,4 +1,4 @@ -// WARNING: This file contains code that is more than likely already +// WARNING: This file contains code that is more than likely already // exposed from the Esp32 Arduino API. It will be removed once integration is complete. // // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD @@ -16,7 +16,6 @@ // limitations under the License. #if defined(ARDUINO_ARCH_ESP32) -#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4 #include #include @@ -47,15 +46,18 @@ #include "Esp32_i2s.h" #include "esp32-hal.h" -#if ESP_IDF_VERSION_MAJOR<4 +#if ESP_IDF_VERSION_MAJOR<=4 #define I2S_BASE_CLK (160000000L) #endif #define ESP32_REG(addr) (*((volatile uint32_t*)(0x3FF00000+(addr)))) -#define I2S_DMA_QUEUE_SIZE 16 - -#define I2S_DMA_SILENCE_LEN 256 // bytes +#define I2S_DMA_BLOCK_COUNT_DEFAULT 16 +// 24 bytes gives us enough time if we use single stage idle +// with the two stage idle we can use the minimum of 4 bytes +#define I2S_DMA_SILENCE_SIZE 4*1 +#define I2S_DMA_SILENCE_BLOCK_COUNT 3 // two front, one back +#define I2S_DMA_QUEUE_COUNT 2 typedef struct i2s_dma_item_s { uint32_t blocksize: 12; // datalen @@ -92,24 +94,29 @@ typedef struct { size_t dma_count; uint32_t dma_buf_len :12; uint32_t unused :20; + volatile uint32_t is_sending_data; } i2s_bus_t; -static uint8_t i2s_silence_buf[I2S_DMA_SILENCE_LEN]; +// is_sending_data values +#define I2s_Is_Idle 0 +#define I2s_Is_Pending 1 +#define I2s_Is_Sending 2 + +static uint8_t i2s_silence_buf[I2S_DMA_SILENCE_SIZE] = { 0 }; #if !defined(CONFIG_IDF_TARGET_ESP32S2) // (I2S_NUM_MAX == 2) static i2s_bus_t I2S[I2S_NUM_MAX] = { - {&I2S0, -1, -1, -1, -1, 0, NULL, NULL, i2s_silence_buf, I2S_DMA_SILENCE_LEN, NULL, I2S_DMA_QUEUE_SIZE, 0, 0}, - {&I2S1, -1, -1, -1, -1, 0, NULL, NULL, i2s_silence_buf, I2S_DMA_SILENCE_LEN, NULL, I2S_DMA_QUEUE_SIZE, 0, 0} + {&I2S0, -1, -1, -1, -1, 0, NULL, NULL, i2s_silence_buf, I2S_DMA_SILENCE_SIZE, NULL, I2S_DMA_BLOCK_COUNT_DEFAULT, 0, 0, I2s_Is_Idle}, + {&I2S1, -1, -1, -1, -1, 0, NULL, NULL, i2s_silence_buf, I2S_DMA_SILENCE_SIZE, NULL, I2S_DMA_BLOCK_COUNT_DEFAULT, 0, 0, I2s_Is_Idle} }; #else static i2s_bus_t I2S[I2S_NUM_MAX] = { - {&I2S0, -1, -1, -1, -1, 0, NULL, NULL, i2s_silence_buf, I2S_DMA_SILENCE_LEN, NULL, I2S_DMA_QUEUE_SIZE, 0, 0} + {&I2S0, -1, -1, -1, -1, 0, NULL, NULL, i2s_silence_buf, I2S_DMA_SILENCE_SIZE, NULL, I2S_DMA_BLOCK_COUNT_DEFAULT, 0, 0, I2s_Is_Idle} }; #endif void IRAM_ATTR i2sDmaISR(void* arg); -bool i2sInitDmaItems(uint8_t bus_num); bool i2sInitDmaItems(uint8_t bus_num) { if (bus_num >= I2S_NUM_MAX) { @@ -119,8 +126,10 @@ bool i2sInitDmaItems(uint8_t bus_num) { return true; } + size_t dmaCount = I2S[bus_num].dma_count; + if (I2S[bus_num].dma_items == NULL) { - I2S[bus_num].dma_items = (i2s_dma_item_t*)(malloc(I2S[bus_num].dma_count* sizeof(i2s_dma_item_t))); + I2S[bus_num].dma_items = (i2s_dma_item_t*)(malloc(dmaCount * sizeof(i2s_dma_item_t))); if (I2S[bus_num].dma_items == NULL) { log_e("MEM ERROR!"); return false; @@ -128,12 +137,15 @@ bool i2sInitDmaItems(uint8_t bus_num) { } int i, i2, a; - i2s_dma_item_t* item; + i2s_dma_item_t* item = NULL; + i2s_dma_item_t* itemPrev; - for(i=0; ieof = 1; + item->eof = 0; item->owner = 1; item->sub_sof = 0; item->unused = 0; @@ -142,23 +154,12 @@ bool i2sInitDmaItems(uint8_t bus_num) { item->datalen = I2S[bus_num].silence_len; item->next = &I2S[bus_num].dma_items[i2]; item->free_ptr = NULL; - if (I2S[bus_num].dma_buf_len) { - item->buf = (uint8_t*)(malloc(I2S[bus_num].dma_buf_len)); - if (item->buf == NULL) { - log_e("MEM ERROR!"); - for(a=0; abuf = NULL; - } + item->buf = NULL; } + itemPrev->eof = 1; + item->eof = 1; - I2S[bus_num].tx_queue = xQueueCreate(I2S[bus_num].dma_count, sizeof(i2s_dma_item_t*)); + I2S[bus_num].tx_queue = xQueueCreate(I2S_DMA_QUEUE_COUNT, sizeof(i2s_dma_item_t*)); if (I2S[bus_num].tx_queue == NULL) {// memory error log_e("MEM ERROR!"); free(I2S[bus_num].dma_items); @@ -168,14 +169,6 @@ bool i2sInitDmaItems(uint8_t bus_num) { return true; } -void i2sSetSilenceBuf(uint8_t bus_num, uint8_t* data, size_t len) { - if (bus_num >= I2S_NUM_MAX || !data || !len) { - return; - } - I2S[bus_num].silence_buf = data; - I2S[bus_num].silence_len = len; -} - esp_err_t i2sSetClock(uint8_t bus_num, uint8_t div_num, uint8_t div_b, uint8_t div_a, uint8_t bck, uint8_t bits) { if (bus_num >= I2S_NUM_MAX || div_a > 63 || div_b > 63 || bck > 63) { return ESP_FAIL; @@ -206,37 +199,6 @@ esp_err_t i2sSetClock(uint8_t bus_num, uint8_t div_num, uint8_t div_b, uint8_t d return ESP_OK; } -void i2sSetDac(uint8_t bus_num, bool right, bool left) { - if (bus_num >= I2S_NUM_MAX) { - return; - } - - if (!right && !left) { - dac_output_disable(DAC_CHANNEL_1); - dac_output_disable(DAC_CHANNEL_2); - dac_i2s_disable(); - I2S[bus_num].bus->conf2.lcd_en = 0; - I2S[bus_num].bus->conf.tx_right_first = 0; - I2S[bus_num].bus->conf2.camera_en = 0; - I2S[bus_num].bus->conf.tx_msb_shift = 1;// I2S signaling - return; - } - - i2sSetPins(bus_num, -1, false); - I2S[bus_num].bus->conf2.lcd_en = 1; - I2S[bus_num].bus->conf.tx_right_first = 0; - I2S[bus_num].bus->conf2.camera_en = 0; - I2S[bus_num].bus->conf.tx_msb_shift = 0; - dac_i2s_enable(); - - if (right) {// DAC1, right channel, GPIO25 - dac_output_enable(DAC_CHANNEL_1); - } - if (left) { // DAC2, left channel, GPIO26 - dac_output_enable(DAC_CHANNEL_2); - } -} - void i2sSetPins(uint8_t bus_num, int8_t out, bool invert) { if (bus_num >= I2S_NUM_MAX) { return; @@ -275,15 +237,22 @@ bool i2sWriteDone(uint8_t bus_num) { if (bus_num >= I2S_NUM_MAX) { return false; } - return (I2S[bus_num].dma_items[I2S[bus_num].dma_count - 1].data == I2S[bus_num].silence_buf); + + return (I2S[bus_num].is_sending_data == I2s_Is_Idle); } -void i2sInit(uint8_t bus_num, uint32_t bits_per_sample, uint32_t sample_rate, i2s_tx_chan_mod_t chan_mod, i2s_tx_fifo_mod_t fifo_mod, size_t dma_count, size_t dma_len) { +void i2sInit(uint8_t bus_num, + uint32_t bits_per_sample, + uint32_t sample_rate, + i2s_tx_chan_mod_t chan_mod, + i2s_tx_fifo_mod_t fifo_mod, + size_t dma_count, + size_t dma_len) { if (bus_num >= I2S_NUM_MAX) { return; } - I2S[bus_num].dma_count = dma_count; + I2S[bus_num].dma_count = dma_count + I2S_DMA_SILENCE_BLOCK_COUNT; // an extra two for looping silence I2S[bus_num].dma_buf_len = dma_len & 0xFFF; if (!i2sInitDmaItems(bus_num)) { @@ -294,7 +263,7 @@ void i2sInit(uint8_t bus_num, uint32_t bits_per_sample, uint32_t sample_rate, i2 // (I2S_NUM_MAX == 2) if (bus_num) { periph_module_enable(PERIPH_I2S1_MODULE); - } else + } else #endif { periph_module_enable(PERIPH_I2S0_MODULE); @@ -332,8 +301,10 @@ void i2sInit(uint8_t bus_num, uint32_t bits_per_sample, uint32_t sample_rate, i2 lc_conf.out_eof_mode = 1; i2s->lc_conf.val = lc_conf.val; +#if !defined(CONFIG_IDF_TARGET_ESP32S2) i2s->pdm_conf.pcm2pdm_conv_en = 0; i2s->pdm_conf.pdm2pcm_conv_en = 0; +#endif // SET_PERI_REG_BITS(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_SOC_CLK_SEL, 0x1, RTC_CNTL_SOC_CLK_SEL_S); typeof(i2s->conf_chan) conf_chan; @@ -361,12 +332,14 @@ void i2sInit(uint8_t bus_num, uint32_t bits_per_sample, uint32_t sample_rate, i2 i2s->fifo_conf.tx_fifo_mod_force_en = 1; +#if !defined(CONFIG_IDF_TARGET_ESP32S2) i2s->pdm_conf.rx_pdm_en = 0; i2s->pdm_conf.tx_pdm_en = 0; +#endif i2sSetSampleRate(bus_num, sample_rate, bits_per_sample); - // enable intr in cpu // + // enable intr in cpu // int i2sIntSource; #if !defined(CONFIG_IDF_TARGET_ESP32S2) @@ -443,57 +416,77 @@ esp_err_t i2sSetSampleRate(uint8_t bus_num, uint32_t rate, uint8_t bits) { return ESP_OK; } + + void IRAM_ATTR i2sDmaISR(void* arg) { - i2s_dma_item_t* dummy = NULL; i2s_bus_t* dev = (i2s_bus_t*)(arg); - portBASE_TYPE hpTaskAwoken = 0; - if (dev->bus->int_st.out_eof) { - i2s_dma_item_t* item = (i2s_dma_item_t*)(dev->bus->out_eof_des_addr); - item->data = dev->silence_buf; - item->blocksize = dev->silence_len; - item->datalen = dev->silence_len; - if (xQueueIsQueueFullFromISR(dev->tx_queue) == pdTRUE) { - xQueueReceiveFromISR(dev->tx_queue, &dummy, &hpTaskAwoken); + if (dev->bus->int_st.out_eof) + { + // i2s_dma_item_t* item = (i2s_dma_item_t*)(dev->bus->out_eof_des_addr); + if (dev->is_sending_data == I2s_Is_Pending) + { + dev->is_sending_data = I2s_Is_Idle; + } + else if (dev->is_sending_data == I2s_Is_Sending) + { + // loop the silent items + i2s_dma_item_t* itemSilence = &dev->dma_items[1]; + itemSilence->next = &dev->dma_items[0]; + + dev->is_sending_data = I2s_Is_Pending; } - xQueueSendFromISR(dev->tx_queue, (void*)&item, &hpTaskAwoken); } + dev->bus->int_clr.val = dev->bus->int_st.val; - if (hpTaskAwoken == pdTRUE) { - portYIELD_FROM_ISR(); - } } size_t i2sWrite(uint8_t bus_num, uint8_t* data, size_t len, bool copy, bool free_when_sent) { if (bus_num >= I2S_NUM_MAX || !I2S[bus_num].tx_queue) { return 0; } - size_t index = 0; - size_t toSend = len; - size_t limit = I2S_DMA_MAX_DATA_LEN; - i2s_dma_item_t* item = NULL; + size_t blockSize = len; - while (len) { - toSend = len; - if (toSend > limit) { - toSend = limit; - } + i2s_dma_item_t* itemPrev = NULL; + i2s_dma_item_t* item = &I2S[bus_num].dma_items[0]; + size_t dataLeft = len; + uint8_t* pos = data; - if (xQueueReceive(I2S[bus_num].tx_queue, &item, portMAX_DELAY) == pdFALSE) { - log_e("xQueueReceive failed\n"); - break; + // skip front two silent items + item += 2; + + while (dataLeft) { + + blockSize = dataLeft; + if (blockSize > I2S_DMA_MAX_DATA_LEN) { + blockSize = I2S_DMA_MAX_DATA_LEN; } + dataLeft -= blockSize; + // data is constant. no need to copy - item->data = data + index; - item->blocksize = toSend; - item->datalen = toSend; + item->data = pos; + item->blocksize = blockSize; + item->datalen = blockSize; - len -= toSend; - index += toSend; + itemPrev = item; + item++; + + pos += blockSize; } - return index; + + + // reset silence item to not loop + item = &I2S[bus_num].dma_items[1]; + item->next = &I2S[bus_num].dma_items[2]; + I2S[bus_num].is_sending_data = I2s_Is_Sending; + + + xQueueReset(I2S[bus_num].tx_queue); + xQueueSend(I2S[bus_num].tx_queue, (void*)&I2S[bus_num].dma_items[0], 10); + + return len; } -#endif // CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4 + #endif diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Esp32_i2s.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Esp32_i2s.h similarity index 75% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Esp32_i2s.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Esp32_i2s.h index a95e7c5a6..d31c51eea 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Esp32_i2s.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Esp32_i2s.h @@ -18,16 +18,19 @@ typedef enum { I2S_FIFO_16BIT_DUAL, I2S_FIFO_16BIT_SINGLE, I2S_FIFO_32BIT_DUAL, I2S_FIFO_32BIT_SINGLE } i2s_tx_fifo_mod_t; -void i2sInit(uint8_t bus_num, uint32_t bits_per_sample, uint32_t sample_rate, i2s_tx_chan_mod_t chan_mod, i2s_tx_fifo_mod_t fifo_mod, size_t dma_count, size_t dma_len); +void i2sInit(uint8_t bus_num, + uint32_t bits_per_sample, + uint32_t sample_rate, + i2s_tx_chan_mod_t chan_mod, + i2s_tx_fifo_mod_t fifo_mod, + size_t dma_count, + size_t dma_len); void i2sSetPins(uint8_t bus_num, int8_t out, bool invert); -void i2sSetDac(uint8_t bus_num, bool right, bool left); esp_err_t i2sSetClock(uint8_t bus_num, uint8_t div_num, uint8_t div_b, uint8_t div_a, uint8_t bck, uint8_t bits_per_sample); esp_err_t i2sSetSampleRate(uint8_t bus_num, uint32_t sample_rate, uint8_t bits_per_sample); -void i2sSetSilenceBuf(uint8_t bus_num, uint8_t* data, size_t len); - size_t i2sWrite(uint8_t bus_num, uint8_t* data, size_t len, bool copy, bool free_when_sent); bool i2sWriteDone(uint8_t bus_num); diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HsbColor.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HsbColor.cpp similarity index 79% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HsbColor.cpp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HsbColor.cpp index e47912fa9..146ddb84e 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HsbColor.cpp +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HsbColor.cpp @@ -25,22 +25,17 @@ License along with NeoPixel. If not, see -------------------------------------------------------------------------*/ #include "RgbColor.h" +#include "Rgb48Color.h" #include "HsbColor.h" - -HsbColor::HsbColor(const RgbColor& color) +void HsbColor::_RgbToHsb(float r, float g, float b, HsbColor* color) { - // convert colors to float between (0.0 - 1.0) - float r = color.R / 255.0f; - float g = color.G / 255.0f; - float b = color.B / 255.0f; - float max = (r > g && r > b) ? r : (g > b) ? g : b; - float min = (r < g && r < b) ? r : (g < b) ? g : b; + float min = (r < g&& r < b) ? r : (g < b) ? g : b; float d = max - min; - float h = 0.0; + float h = 0.0; float v = max; float s = (v == 0.0f) ? 0 : (d / v); @@ -62,7 +57,27 @@ HsbColor::HsbColor(const RgbColor& color) } - H = h; - S = s; - B = v; + color->H = h; + color->S = s; + color->B = v; +} + +HsbColor::HsbColor(const RgbColor& color) +{ + // convert colors to float between (0.0 - 1.0) + float r = color.R / 255.0f; + float g = color.G / 255.0f; + float b = color.B / 255.0f; + + _RgbToHsb(r, g, b, this); +} + +HsbColor::HsbColor(const Rgb48Color& color) +{ + // convert colors to float between (0.0 - 1.0) + float r = color.R / 65535.0f; + float g = color.G / 65535.0f; + float b = color.B / 65535.0f; + + _RgbToHsb(r, g, b, this); } diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HsbColor.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HsbColor.h similarity index 93% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HsbColor.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HsbColor.h index 4d0bdfaa9..939d5a100 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HsbColor.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HsbColor.h @@ -48,6 +48,11 @@ struct HsbColor // ------------------------------------------------------------------------ HsbColor(const RgbColor& color); + // ------------------------------------------------------------------------ + // Construct a HsbColor using Rgb48Color + // ------------------------------------------------------------------------ + HsbColor(const Rgb48Color& color); + // ------------------------------------------------------------------------ // Construct a HsbColor that will have its values set in latter operations // CAUTION: The H,S,B members are not initialized and may not be consistent @@ -109,5 +114,8 @@ struct HsbColor float H; float S; float B; + +private: + static void _RgbToHsb(float r, float g, float b, HsbColor* color); }; diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HslColor.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HslColor.cpp similarity index 82% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HslColor.cpp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HslColor.cpp index ce9b2388b..92ae68751 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HslColor.cpp +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HslColor.cpp @@ -26,16 +26,11 @@ License along with NeoPixel. If not, see -------------------------------------------------------------------------*/ #include "RgbColor.h" +#include "Rgb48Color.h" #include "HslColor.h" - -HslColor::HslColor(const RgbColor& color) +void HslColor::_RgbToHsl(float r, float g, float b, HslColor* color) { - // convert colors to float between (0.0 - 1.0) - float r = color.R / 255.0f; - float g = color.G / 255.0f; - float b = color.B / 255.0f; - float max = (r > g && r > b) ? r : (g > b) ? g : b; float min = (r < g && r < b) ? r : (g < b) ? g : b; @@ -66,7 +61,27 @@ HslColor::HslColor(const RgbColor& color) h /= 6.0f; } - H = h; - S = s; - L = l; + color->H = h; + color->S = s; + color->L = l; +} + +HslColor::HslColor(const RgbColor& color) +{ + // convert colors to float between (0.0 - 1.0) + float r = color.R / 255.0f; + float g = color.G / 255.0f; + float b = color.B / 255.0f; + + _RgbToHsl(r, g, b, this); +} + +HslColor::HslColor(const Rgb48Color& color) +{ + // convert colors to float between (0.0 - 1.0) + float r = color.R / 65535.0f; + float g = color.G / 65535.0f; + float b = color.B / 65535.0f; + + _RgbToHsl(r, g, b, this); } diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HslColor.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HslColor.h similarity index 93% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HslColor.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HslColor.h index f6988bd57..3555a5c06 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HslColor.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HslColor.h @@ -49,6 +49,11 @@ struct HslColor // ------------------------------------------------------------------------ HslColor(const RgbColor& color); + // ------------------------------------------------------------------------ + // Construct a HslColor using Rgb48Color + // ------------------------------------------------------------------------ + HslColor(const Rgb48Color& color); + // ------------------------------------------------------------------------ // Construct a HslColor that will have its values set in latter operations // CAUTION: The H,S,L members are not initialized and may not be consistent @@ -109,5 +114,9 @@ struct HslColor float H; float S; float L; + +private: + static void _RgbToHsl(float r, float g, float b, HslColor* color); + }; diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HtmlColor.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HtmlColor.cpp similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HtmlColor.cpp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HtmlColor.cpp diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HtmlColor.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HtmlColor.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HtmlColor.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HtmlColor.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HtmlColorNameStrings.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HtmlColorNameStrings.cpp similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HtmlColorNameStrings.cpp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HtmlColorNameStrings.cpp diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HtmlColorNameStrings.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HtmlColorNameStrings.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HtmlColorNameStrings.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HtmlColorNameStrings.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HtmlColorNames.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HtmlColorNames.cpp similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HtmlColorNames.cpp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HtmlColorNames.cpp diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HtmlColorShortNames.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HtmlColorShortNames.cpp similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/HtmlColorShortNames.cpp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/HtmlColorShortNames.cpp diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Layouts.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Layouts.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Layouts.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Layouts.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Lpd6803ColorFeatures.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Lpd6803ColorFeatures.h new file mode 100644 index 000000000..709935073 --- /dev/null +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Lpd6803ColorFeatures.h @@ -0,0 +1,301 @@ +/*------------------------------------------------------------------------- +Lpd6803ColorFeatures provides feature classes to describe color order and +color depth for NeoPixelBus template class when used with DotStar like chips + +Written by Michael C. Miller. + +I invest time and resources providing this open source code, +please support me by dontating (see https://github.com/Makuna/NeoPixelBus) + +------------------------------------------------------------------------- +This file is part of the Makuna/NeoPixelBus library. + +NeoPixelBus is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +NeoPixelBus is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with NeoPixel. If not, see +. +-------------------------------------------------------------------------*/ +#pragma once + +class Lpd68033ElementsNoSettings +{ +public: + typedef NeoNoSettings SettingsObject; + static const size_t SettingsSize = 0; + + static void applySettings(uint8_t*, const SettingsObject&) + { + } + + static uint8_t* pixels(uint8_t* pData) + { + return pData; + } + + static const uint8_t* pixels(const uint8_t* pData) + { + return pData; + } +}; + +class Lpd68033Elements : public Lpd68033ElementsNoSettings +{ +public: + static const size_t PixelSize = 2; // 1 bit + 555 encoded elements + + static uint8_t* getPixelAddress(uint8_t* pPixels, uint16_t indexPixel) + { + return pPixels + indexPixel * PixelSize; + } + static const uint8_t* getPixelAddress(const uint8_t* pPixels, uint16_t indexPixel) + { + return pPixels + indexPixel * PixelSize; + } + + static void replicatePixel(uint8_t* pPixelDest, const uint8_t* pPixelSrc, uint16_t count) + { + uint8_t* pEnd = pPixelDest + (count * PixelSize); + while (pPixelDest < pEnd) + { + *pPixelDest++ = pPixelSrc[0]; + *pPixelDest++ = pPixelSrc[1]; + } + } + + static void movePixelsInc(uint8_t* pPixelDest, const uint8_t* pPixelSrc, uint16_t count) + { + uint8_t* pEnd = pPixelDest + (count * PixelSize); + while (pPixelDest < pEnd) + { + *pPixelDest++ = *pPixelSrc++; + *pPixelDest++ = *pPixelSrc++; + } + } + + static void movePixelsInc_P(uint8_t* pPixelDest, PGM_VOID_P pPixelSrc, uint16_t count) + { + uint8_t* pEnd = pPixelDest + (count * PixelSize); + const uint8_t* pSrc = (const uint8_t*)pPixelSrc; + while (pPixelDest < pEnd) + { + *pPixelDest++ = pgm_read_byte(pSrc++); + *pPixelDest++ = pgm_read_byte(pSrc++); + } + } + + static void movePixelsDec(uint8_t* pPixelDest, const uint8_t* pPixelSrc, uint16_t count) + { + uint8_t* pDestBack = pPixelDest + (count * PixelSize); + const uint8_t* pSrcBack = pPixelSrc + (count * PixelSize); + while (pDestBack > pPixelDest) + { + *--pDestBack = *--pSrcBack; + *--pDestBack = *--pSrcBack; + } + } + + typedef RgbColor ColorObject; + +protected: + static void encodePixel(uint8_t c1, uint8_t c2, uint8_t c3, uint16_t* color555) + { + *color555 = (0x8000 | + ((c1 & 0xf8) << 7) | + ((c2 & 0xf8) << 2) | + ((c3 & 0xf8) >> 3)); + } + + static void decodePixel(uint16_t color555, uint8_t* c1, uint8_t* c2, uint8_t* c3) + { + *c1 = (color555 >> 7) & 0xf8; + *c2 = (color555 >> 2) & 0xf8; + *c3 = (color555 << 3) & 0xf8; + } +}; + +class Lpd6803BrgFeature : public Lpd68033Elements +{ +public: + static void applyPixelColor(uint8_t* pPixels, uint16_t indexPixel, ColorObject color) + { + uint8_t* p = getPixelAddress(pPixels, indexPixel); + uint16_t color555; + + encodePixel(color.B, color.R, color.G, &color555); + *p++ = color555 >> 8; + *p = color555 & 0xff; + } + + static ColorObject retrievePixelColor(const uint8_t* pPixels, uint16_t indexPixel) + { + ColorObject color; + const uint8_t* p = getPixelAddress(pPixels, indexPixel); + + uint16_t color555; + + color555 = ((*p++) << 8); + color555 |= (*p); + + decodePixel(color555, &color.B, &color.R, &color.G); + + return color; + } + + static ColorObject retrievePixelColor_P(PGM_VOID_P pPixels, uint16_t indexPixel) + { + ColorObject color; + const uint8_t* p = getPixelAddress((const uint8_t*)pPixels, indexPixel); + + uint16_t color555; + + color555 = (pgm_read_byte(p++) << 8); + color555 |= pgm_read_byte(p); + + decodePixel(color555, &color.B, &color.R, &color.G); + + return color; + } +}; + +class Lpd6803GrbFeature : public Lpd68033Elements +{ +public: + static void applyPixelColor(uint8_t* pPixels, uint16_t indexPixel, ColorObject color) + { + uint8_t* p = getPixelAddress(pPixels, indexPixel); + uint16_t color555; + + encodePixel(color.G, color.R, color.B, &color555); + *p++ = color555 >> 8; + *p = color555 & 0xff; + } + + static ColorObject retrievePixelColor(const uint8_t* pPixels, uint16_t indexPixel) + { + ColorObject color; + const uint8_t* p = getPixelAddress(pPixels, indexPixel); + + uint16_t color555; + + color555 = ((*p++) << 8); + color555 |= (*p); + + decodePixel(color555, &color.G, &color.R, &color.B); + + return color; + } + + static ColorObject retrievePixelColor_P(PGM_VOID_P pPixels, uint16_t indexPixel) + { + ColorObject color; + const uint8_t* p = getPixelAddress((const uint8_t*)pPixels, indexPixel); + + uint16_t color555; + + color555 = (pgm_read_byte(p++) << 8); + color555 |= pgm_read_byte(p); + + decodePixel(color555, &color.G, &color.R, &color.B); + + return color; + } +}; + +class Lpd6803GbrFeature : public Lpd68033Elements +{ +public: + static void applyPixelColor(uint8_t* pPixels, uint16_t indexPixel, ColorObject color) + { + uint8_t* p = getPixelAddress(pPixels, indexPixel); + uint16_t color555; + + encodePixel(color.G, color.B, color.R, &color555); + *p++ = color555 >> 8; + *p = color555 & 0xff; + } + + static ColorObject retrievePixelColor(const uint8_t* pPixels, uint16_t indexPixel) + { + ColorObject color; + const uint8_t* p = getPixelAddress(pPixels, indexPixel); + + uint16_t color555; + + color555 = ((*p++) << 8); + color555 |= (*p); + + decodePixel(color555, &color.G, &color.B, &color.R); + + return color; + } + + static ColorObject retrievePixelColor_P(PGM_VOID_P pPixels, uint16_t indexPixel) + { + ColorObject color; + const uint8_t* p = getPixelAddress((const uint8_t*)pPixels, indexPixel); + + uint16_t color555; + + color555 = (pgm_read_byte(p++) << 8); + color555 |= pgm_read_byte(p); + + decodePixel(color555, &color.G, &color.B, &color.R); + + return color; + } +}; + + +class Lpd6803RgbFeature : public Lpd68033Elements +{ +public: + static void applyPixelColor(uint8_t* pPixels, uint16_t indexPixel, ColorObject color) + { + uint8_t* p = getPixelAddress(pPixels, indexPixel); + uint16_t color555; + + encodePixel(color.R, color.G, color.B, &color555); + *p++ = color555 >> 8; + *p = color555 & 0xff; + } + + static ColorObject retrievePixelColor(const uint8_t* pPixels, uint16_t indexPixel) + { + ColorObject color; + const uint8_t* p = getPixelAddress(pPixels, indexPixel); + + uint16_t color555; + + color555 = ((*p++) << 8); + color555 |= (*p); + + decodePixel(color555, &color.R, &color.G, &color.B); + + return color; + } + + static ColorObject retrievePixelColor_P(PGM_VOID_P pPixels, uint16_t indexPixel) + { + ColorObject color; + const uint8_t* p = getPixelAddress((const uint8_t*)pPixels, indexPixel); + + uint16_t color555; + + color555 = (pgm_read_byte(p++) << 8); + color555 |= pgm_read_byte(p); + + decodePixel(color555, &color.R, &color.G, &color.B); + + return color; + } +}; + diff --git a/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Lpd6803GenericMethod.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Lpd6803GenericMethod.h new file mode 100644 index 000000000..8db4d3367 --- /dev/null +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Lpd6803GenericMethod.h @@ -0,0 +1,132 @@ +/*------------------------------------------------------------------------- +NeoPixel library helper functions for LPD6803 using general Pins + +Written by Michael C. Miller. + +I invest time and resources providing this open source code, +please support me by dontating (see https://github.com/Makuna/NeoPixelBus) + +------------------------------------------------------------------------- +This file is part of the Makuna/NeoPixelBus library. + +NeoPixelBus is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +NeoPixelBus is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with NeoPixel. If not, see +. +-------------------------------------------------------------------------*/ + +#pragma once + +// must also check for arm due to Teensy incorrectly having ARDUINO_ARCH_AVR set +#if defined(ARDUINO_ARCH_AVR) && !defined(__arm__) +#include "TwoWireBitBangImpleAvr.h" +#else +#include "TwoWireBitBangImple.h" +#endif + + +template class Lpd6803MethodBase +{ +public: + Lpd6803MethodBase(uint8_t pinClock, uint8_t pinData, uint16_t pixelCount, size_t elementSize, size_t settingsSize) : + _sizeData(pixelCount * elementSize + settingsSize), + _sizeFrame((pixelCount + 7) / 8), // bit for every pixel at least + _wire(pinClock, pinData) + { + _data = static_cast(malloc(_sizeData)); + // data cleared later in Begin() + } + +#if !defined(__AVR_ATtiny85__) && !defined(ARDUINO_attiny) + Lpd6803MethodBase(uint16_t pixelCount, size_t elementSize, size_t settingsSize) : + Lpd6803MethodBase(SCK, MOSI, pixelCount, elementSize, settingsSize) + { + } +#endif + + + ~Lpd6803MethodBase() + { + free(_data); + } + + bool IsReadyToUpdate() const + { + return true; // dot stars don't have a required delay + } + +#if defined(ARDUINO_ARCH_ESP32) + void Initialize(int8_t sck, int8_t miso, int8_t mosi, int8_t ss) + { + _wire.begin(sck, miso, mosi, ss); + } +#endif + + void Initialize() + { + _wire.begin(); + } + + void Update(bool) + { + const uint8_t startFrame[4] = { 0x00 }; + + _wire.beginTransaction(); + + // start frame + _wire.transmitBytes(startFrame, sizeof(startFrame)); + + // data + _wire.transmitBytes(_data, _sizeData); + + // end frame + // one bit for every pixel with no less than 1 byte + for (size_t frameByte = 0; frameByte < _sizeFrame; frameByte++) + { + _wire.transmitByte(0x00); + } + + _wire.endTransaction(); + } + + uint8_t* getData() const + { + return _data; + }; + + size_t getDataSize() const + { + return _sizeData; + }; + +private: + const size_t _sizeData; // Size of '_data' buffer below + const size_t _sizeFrame; + + T_TWOWIRE _wire; + uint8_t* _data; // Holds LED color values +}; + +typedef Lpd6803MethodBase Lpd6803Method; + +#if !defined(__AVR_ATtiny85__) && !defined(ARDUINO_attiny) +#include "TwoWireSpiImple.h" +typedef Lpd6803MethodBase> Lpd6803Spi20MhzMethod; +typedef Lpd6803MethodBase> Lpd6803Spi10MhzMethod; +typedef Lpd6803MethodBase> Lpd6803Spi2MhzMethod; +typedef Lpd6803MethodBase> Lpd6803Spi1MhzMethod; +typedef Lpd6803MethodBase> Lpd6803Spi500KhzMethod; +typedef Lpd6803Spi10MhzMethod Lpd6803SpiMethod; +#endif + + + diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Lpd8806ColorFeatures.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Lpd8806ColorFeatures.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Lpd8806ColorFeatures.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Lpd8806ColorFeatures.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Lpd8806GenericMethod.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Lpd8806GenericMethod.h similarity index 94% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Lpd8806GenericMethod.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Lpd8806GenericMethod.h index 2a741f991..a3b07cc5b 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Lpd8806GenericMethod.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Lpd8806GenericMethod.h @@ -43,7 +43,7 @@ public: _wire(pinClock, pinData) { _data = static_cast(malloc(_sizeData)); - memset(_data, 0, _sizeData); + // data cleared later in Begin() } #if !defined(__AVR_ATtiny85__) && !defined(ARDUINO_attiny) @@ -123,6 +123,8 @@ typedef Lpd8806MethodBase Lpd8806Method; typedef Lpd8806MethodBase> Lpd8806Spi20MhzMethod; typedef Lpd8806MethodBase> Lpd8806Spi10MhzMethod; typedef Lpd8806MethodBase> Lpd8806Spi2MhzMethod; +typedef Lpd8806MethodBase> Lpd8806Spi1MhzMethod; +typedef Lpd8806MethodBase> Lpd8806Spi500KhzMethod; typedef Lpd8806Spi10MhzMethod Lpd8806SpiMethod; #endif diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoArmMethod.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoArmMethod.h similarity index 99% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoArmMethod.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoArmMethod.h index 34f111604..048d5ee38 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoArmMethod.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoArmMethod.h @@ -42,7 +42,7 @@ public: pinMode(pin, OUTPUT); _data = static_cast(malloc(_sizeData)); - memset(_data, 0, _sizeData); + // data cleared later in Begin() } ~NeoArmMethodBase() @@ -334,7 +334,7 @@ typedef NeoArmMethodBase NeoArmWs2812xMethod; typedef NeoArmMethodBase NeoArmSk6812Method; typedef NeoArmMethodBase NeoArmTm1814InvertedMethod; typedef NeoArmMethodBase NeoArm800KbpsMethod; -typedef NeoArm800KbpsMethod NeoArmApa106Method +typedef NeoArm800KbpsMethod NeoArmApa106Method; #else #error "Teensy-LC: Sorry, only 48 MHz is supported, please set Tools > CPU Speed to 48 MHz" diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoAvrMethod.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoAvrMethod.h similarity index 99% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoAvrMethod.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoAvrMethod.h index b638d7b32..aa5b0a83c 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoAvrMethod.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoAvrMethod.h @@ -127,7 +127,7 @@ public: pinMode(pin, OUTPUT); _data = static_cast(malloc(_sizeData)); - memset(_data, 0, _sizeData); + // data cleared later in Begin() _port = portOutputRegister(digitalPinToPort(pin)); _pinMask = digitalPinToBitMask(pin); diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoBitmapFile.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoBitmapFile.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoBitmapFile.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoBitmapFile.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoBuffer.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoBuffer.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoBuffer.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoBuffer.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoBufferContext.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoBufferContext.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoBufferContext.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoBufferContext.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoBufferMethods.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoBufferMethods.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoBufferMethods.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoBufferMethods.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoBusChannel.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoBusChannel.h new file mode 100644 index 000000000..2743bff03 --- /dev/null +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoBusChannel.h @@ -0,0 +1,29 @@ +#pragma once + +// For those platforms/methods that support dynamic channel setting +enum NeoBusChannel +{ + NeoBusChannel_0, + NeoBusChannel_1, + NeoBusChannel_2, + +// NRF52x has only 3 or 4 channels of PWM +#if defined(ARDUINO_ARCH_NRF52840) + +#if defined(NRF_PWM3) + NeoBusChannel_3 +#endif + +// ESP32 has either 8 or 4 channels (S2 has only 4) +#elif defined(ARDUINO_ARCH_ESP32) + + NeoBusChannel_3, + +#if !defined(CONFIG_IDF_TARGET_ESP32S2) + NeoBusChannel_4, + NeoBusChannel_5, + NeoBusChannel_6, + NeoBusChannel_7, +#endif // CONFIG_IDF_TARGET_ESP32S2 +#endif // ARDUINO_ARCH_ESP32 +}; \ No newline at end of file diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoColorFeatures.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoColorFeatures.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoColorFeatures.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoColorFeatures.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoDib.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoDib.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoDib.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoDib.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEase.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEase.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEase.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEase.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp32I2sMethod.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp32I2sMethod.h similarity index 76% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp32I2sMethod.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp32I2sMethod.h index b3b8ee144..32411c2bb 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp32I2sMethod.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp32I2sMethod.h @@ -87,15 +87,32 @@ public: class NeoEsp32I2sBusZero { public: + NeoEsp32I2sBusZero() {}; + const static uint8_t I2sBusNumber = 0; }; class NeoEsp32I2sBusOne { public: + NeoEsp32I2sBusOne() {}; + const static uint8_t I2sBusNumber = 1; }; +// dynamic channel support +class NeoEsp32I2sBusN +{ +public: + NeoEsp32I2sBusN(NeoBusChannel channel) : + I2sBusNumber(static_cast(channel)) + { + } + NeoEsp32I2sBusN() = delete; // no default constructor + + const uint8_t I2sBusNumber; +}; + class NeoEsp32I2sNotInverted { public: @@ -115,24 +132,15 @@ public: _sizeData(pixelCount * elementSize + settingsSize), _pin(pin) { - uint16_t dmaSettingsSize = c_dmaBytesPerPixelBytes * settingsSize; - uint16_t dmaPixelSize = c_dmaBytesPerPixelBytes * elementSize; - uint16_t resetSize = c_dmaBytesPerPixelBytes * T_SPEED::ResetTimeUs / T_SPEED::ByteSendTimeUs; + construct(pixelCount, elementSize, settingsSize); + } - _i2sBufferSize = pixelCount * dmaPixelSize + dmaSettingsSize + resetSize; - - // must have a 4 byte aligned buffer for i2s - uint32_t alignment = _i2sBufferSize % 4; - if (alignment) - { - _i2sBufferSize += 4 - alignment; - } - - _data = static_cast(malloc(_sizeData)); - memset(_data, 0x00, _sizeData); - - _i2sBuffer = static_cast(malloc(_i2sBufferSize)); - memset(_i2sBuffer, 0x00, _i2sBufferSize); + NeoEsp32I2sMethodBase(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize, NeoBusChannel channel) : + _sizeData(pixelCount * elementSize + settingsSize), + _pin(pin), + _bus(channel) + { + construct(pixelCount, elementSize, settingsSize); } ~NeoEsp32I2sMethodBase() @@ -150,14 +158,21 @@ public: bool IsReadyToUpdate() const { - return (i2sWriteDone(T_BUS::I2sBusNumber)); + return (i2sWriteDone(_bus.I2sBusNumber)); } void Initialize() { - size_t dmaCount = (_i2sBufferSize + I2S_DMA_MAX_DATA_LEN - 1) / I2S_DMA_MAX_DATA_LEN; - i2sInit(T_BUS::I2sBusNumber, 16, T_SPEED::I2sSampleRate, I2S_CHAN_STEREO, I2S_FIFO_16BIT_DUAL, dmaCount, 0); - i2sSetPins(T_BUS::I2sBusNumber, _pin, T_INVERT::Inverted); + size_t dmaBlockCount = (_i2sBufferSize + I2S_DMA_MAX_DATA_LEN - 1) / I2S_DMA_MAX_DATA_LEN; + + i2sInit(_bus.I2sBusNumber, + 16, + T_SPEED::I2sSampleRate, + I2S_CHAN_STEREO, + I2S_FIFO_16BIT_DUAL, + dmaBlockCount, + 0); + i2sSetPins(_bus.I2sBusNumber, _pin, T_INVERT::Inverted); } void Update(bool) @@ -170,7 +185,7 @@ public: FillBuffers(); - i2sWrite(T_BUS::I2sBusNumber, _i2sBuffer, _i2sBufferSize, false, false); + i2sWrite(_bus.I2sBusNumber, _i2sBuffer, _i2sBufferSize, false, false); } uint8_t* getData() const @@ -186,12 +201,39 @@ public: private: const size_t _sizeData; // Size of '_data' buffer const uint8_t _pin; // output pin number - + const T_BUS _bus; // holds instance for multi bus support + uint8_t* _data; // Holds LED color values uint32_t _i2sBufferSize; // total size of _i2sBuffer uint8_t* _i2sBuffer; // holds the DMA buffer that is referenced by _i2sBufDesc + void construct(uint16_t pixelCount, size_t elementSize, size_t settingsSize) + { + ESP_ERROR_CHECK(pixelCount >= 2 ? ESP_OK : ESP_ERR_INVALID_ARG); + + uint16_t dmaSettingsSize = c_dmaBytesPerPixelBytes * settingsSize; + uint16_t dmaPixelSize = c_dmaBytesPerPixelBytes * elementSize; + uint16_t resetSize = c_dmaBytesPerPixelBytes * T_SPEED::ResetTimeUs / T_SPEED::ByteSendTimeUs; + + _i2sBufferSize = pixelCount * dmaPixelSize + dmaSettingsSize + resetSize; + + // must have a 4 byte aligned buffer for i2s + uint32_t alignment = _i2sBufferSize % 4; + if (alignment) + { + _i2sBufferSize += 4 - alignment; + } + + _data = static_cast(malloc(_sizeData)); + // data cleared later in Begin() + + _i2sBuffer = static_cast(malloc(_i2sBufferSize)); + // no need to initialize all of it, but since it contains + // "reset" bits that don't latter get overwritten we just clear it all + memset(_i2sBuffer, 0x00, _i2sBufferSize); + } + void FillBuffers() { const uint16_t bitpatterns[16] = @@ -244,6 +286,21 @@ typedef NeoEsp32I2sMethodBase NeoEsp32I2s1400KbpsInvertedMethod; typedef NeoEsp32I2sMethodBase NeoEsp32I2s1Apa106InvertedMethod; + +typedef NeoEsp32I2sMethodBase NeoEsp32I2sNWs2812xMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2sNSk6812Method; +typedef NeoEsp32I2sMethodBase NeoEsp32I2sNTm1814Method; +typedef NeoEsp32I2sMethodBase NeoEsp32I2sN800KbpsMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2sN400KbpsMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2sNApa106Method; + +typedef NeoEsp32I2sMethodBase NeoEsp32I2sNWs2812xInvertedMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2sNSk6812InvertedMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2sNTm1814InvertedMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2sN800KbpsInvertedMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2sN400KbpsInvertedMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2sNApa106InvertedMethod; + #endif /* due to a core issue where requests to send aren't consistent, I2s is no longer the default diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp32RmtMethod.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp32RmtMethod.cpp similarity index 99% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp32RmtMethod.cpp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp32RmtMethod.cpp index 278d56dce..4bea928e4 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp32RmtMethod.cpp +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp32RmtMethod.cpp @@ -27,6 +27,7 @@ License along with NeoPixel. If not, see . -------------------------------------------------------------------------*/ +#include "NeoBusChannel.h" #include "NeoEsp32RmtMethod.h" #ifdef ARDUINO_ARCH_ESP32 diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp32RmtMethod.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp32RmtMethod.h similarity index 89% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp32RmtMethod.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp32RmtMethod.h index 4d633ba3a..8dae5f3d4 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp32RmtMethod.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp32RmtMethod.h @@ -201,8 +201,8 @@ public: class NeoEsp32RmtSpeedApa106 : public NeoEsp32RmtSpeedBase { public: - const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(400, 1250); - const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(1250, 400); + const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(350, 1350); + const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(1350, 350); const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(50000); // 50us static void IRAM_ATTR Translate(const void* src, @@ -307,8 +307,8 @@ public: class NeoEsp32RmtInvertedSpeedApa106 : public NeoEsp32RmtInvertedSpeedBase { public: - const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(400, 1250); - const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(1250, 400); + const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(350, 1350); + const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(1350, 350); const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(50000); // 50us static void IRAM_ATTR Translate(const void* src, @@ -322,24 +322,32 @@ public: class NeoEsp32RmtChannel0 { public: + NeoEsp32RmtChannel0() {}; + const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_0; }; class NeoEsp32RmtChannel1 { public: + NeoEsp32RmtChannel1() {}; + const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_1; }; class NeoEsp32RmtChannel2 { public: + NeoEsp32RmtChannel2() {}; + const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_2; }; class NeoEsp32RmtChannel3 { public: + NeoEsp32RmtChannel3() {}; + const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_3; }; @@ -348,29 +356,50 @@ public: class NeoEsp32RmtChannel4 { public: + NeoEsp32RmtChannel4() {}; + const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_4; }; class NeoEsp32RmtChannel5 { public: + NeoEsp32RmtChannel5() {}; + const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_5; }; class NeoEsp32RmtChannel6 { public: + NeoEsp32RmtChannel6() {}; + const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_6; }; class NeoEsp32RmtChannel7 { public: + NeoEsp32RmtChannel7() {}; + const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_7; }; #endif +// dynamic channel support +class NeoEsp32RmtChannelN +{ +public: + NeoEsp32RmtChannelN(NeoBusChannel channel) : + RmtChannelNumber(static_cast(channel)) + { + } + NeoEsp32RmtChannelN() = delete; // no default constructor + + const rmt_channel_t RmtChannelNumber; +}; + template class NeoEsp32RmtMethodBase { public: @@ -378,20 +407,24 @@ public: _sizeData(pixelCount * elementSize + settingsSize), _pin(pin) { - _dataEditing = static_cast(malloc(_sizeData)); - memset(_dataEditing, 0x00, _sizeData); + construct(); + } - _dataSending = static_cast(malloc(_sizeData)); - // no need to initialize it, it gets overwritten on every send + NeoEsp32RmtMethodBase(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize, NeoBusChannel channel) : + _sizeData(pixelCount* elementSize + settingsSize), + _pin(pin), + _channel(channel) + { + construct(); } ~NeoEsp32RmtMethodBase() { // wait until the last send finishes before destructing everything // arbitrary time out of 10 seconds - ESP_ERROR_CHECK_WITHOUT_ABORT(rmt_wait_tx_done(T_CHANNEL::RmtChannelNumber, 10000 / portTICK_PERIOD_MS)); + ESP_ERROR_CHECK_WITHOUT_ABORT(rmt_wait_tx_done(_channel.RmtChannelNumber, 10000 / portTICK_PERIOD_MS)); - ESP_ERROR_CHECK(rmt_driver_uninstall(T_CHANNEL::RmtChannelNumber)); + ESP_ERROR_CHECK(rmt_driver_uninstall(_channel.RmtChannelNumber)); free(_dataEditing); free(_dataSending); @@ -400,7 +433,7 @@ public: bool IsReadyToUpdate() const { - return (ESP_OK == rmt_wait_tx_done(T_CHANNEL::RmtChannelNumber, 0)); + return (ESP_OK == rmt_wait_tx_done(_channel.RmtChannelNumber, 0)); } void Initialize() @@ -408,7 +441,7 @@ public: rmt_config_t config; config.rmt_mode = RMT_MODE_TX; - config.channel = T_CHANNEL::RmtChannelNumber; + config.channel = _channel.RmtChannelNumber; config.gpio_num = static_cast(_pin); config.mem_block_num = 1; config.tx_config.loop_en = false; @@ -422,8 +455,8 @@ public: config.clk_div = T_SPEED::RmtClockDivider; ESP_ERROR_CHECK(rmt_config(&config)); - ESP_ERROR_CHECK(rmt_driver_install(T_CHANNEL::RmtChannelNumber, 0, ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_LEVEL1)); - ESP_ERROR_CHECK(rmt_translator_init(T_CHANNEL::RmtChannelNumber, T_SPEED::Translate)); + ESP_ERROR_CHECK(rmt_driver_install(_channel.RmtChannelNumber, 0, ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_LEVEL1)); + ESP_ERROR_CHECK(rmt_translator_init(_channel.RmtChannelNumber, T_SPEED::Translate)); } void Update(bool maintainBufferConsistency) @@ -431,10 +464,10 @@ public: // wait for not actively sending data // this will time out at 10 seconds, an arbitrarily long period of time // and do nothing if this happens - if (ESP_OK == ESP_ERROR_CHECK_WITHOUT_ABORT(rmt_wait_tx_done(T_CHANNEL::RmtChannelNumber, 10000 / portTICK_PERIOD_MS))) + if (ESP_OK == ESP_ERROR_CHECK_WITHOUT_ABORT(rmt_wait_tx_done(_channel.RmtChannelNumber, 10000 / portTICK_PERIOD_MS))) { // now start the RMT transmit with the editing buffer before we swap - ESP_ERROR_CHECK_WITHOUT_ABORT(rmt_write_sample(T_CHANNEL::RmtChannelNumber, _dataEditing, _sizeData, false)); + ESP_ERROR_CHECK_WITHOUT_ABORT(rmt_write_sample(_channel.RmtChannelNumber, _dataEditing, _sizeData, false)); if (maintainBufferConsistency) { @@ -462,13 +495,32 @@ public: private: const size_t _sizeData; // Size of '_data*' buffers const uint8_t _pin; // output pin number + const T_CHANNEL _channel; // holds instance for multi channel support // Holds data stream which include LED color values and other settings as needed uint8_t* _dataEditing; // exposed for get and set uint8_t* _dataSending; // used for async send using RMT + + + void construct() + { + _dataEditing = static_cast(malloc(_sizeData)); + // data cleared later in Begin() + + _dataSending = static_cast(malloc(_sizeData)); + // no need to initialize it, it gets overwritten on every send + } }; // normal +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNWs2811Method; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNWs2812xMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNSk6812Method; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTm1814Method; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNApa106Method; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtN800KbpsMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtN400KbpsMethod; + typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Ws2811Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Ws2812xMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Sk6812Method; @@ -539,6 +591,14 @@ typedef NeoEsp32RmtMethodBase NeoE #endif // inverted +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNWs2811InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNWs2812xInvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNSk6812InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTm1814InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNApa106InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtN800KbpsInvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtN400KbpsInvertedMethod; + typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Ws2811InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Ws2812xInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Sk6812InvertedMethod; diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp8266DmaMethod.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp8266DmaMethod.h similarity index 99% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp8266DmaMethod.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp8266DmaMethod.h index be36eb346..4a25f61e5 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp8266DmaMethod.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp8266DmaMethod.h @@ -226,10 +226,10 @@ public: _i2sBufferSize = pixelCount * dmaPixelSize + dmaSettingsSize; _data = static_cast(malloc(_sizeData)); - memset(_data, 0x00, _sizeData); + // data cleared later in Begin() _i2sBuffer = static_cast(malloc(_i2sBufferSize)); - memset(_i2sBuffer, T_SPEED::Level, _i2sBufferSize); + // no need to initialize it, it gets overwritten on every send // _i2sBuffer[0] = 0b11101000; // debug, 1 bit then 0 bit diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp8266UartMethod.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp8266UartMethod.cpp similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp8266UartMethod.cpp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp8266UartMethod.cpp diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp8266UartMethod.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp8266UartMethod.h similarity index 99% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp8266UartMethod.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp8266UartMethod.h index 3be17bace..c7d45b2ca 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEsp8266UartMethod.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEsp8266UartMethod.h @@ -150,7 +150,7 @@ protected: _sizeData(pixelCount * elementSize + settingsSize) { _data = static_cast(malloc(_sizeData)); - memset(_data, 0x00, _sizeData); + // data cleared later in Begin() } ~NeoEsp8266UartBase() diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEspBitBangMethod.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEspBitBangMethod.h similarity index 92% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEspBitBangMethod.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEspBitBangMethod.h index 506adb70e..b0b9753b2 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoEspBitBangMethod.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoEspBitBangMethod.h @@ -71,6 +71,14 @@ public: const static uint32_t Period = (F_CPU / 400000 - CYCLES_LOOPTEST); }; +class NeoEspSpeedApa106 +{ +public: + const static uint32_t T0H = (F_CPU / 2857143 - CYCLES_LOOPTEST); // 0.35us + const static uint32_t T1H = (F_CPU / 740741 - CYCLES_LOOPTEST); // 1.35 + const static uint32_t Period = (F_CPU / 606061 - CYCLES_LOOPTEST); // 1.65us +}; + class NeoEspPinset { public: @@ -218,6 +226,11 @@ public: static const uint32_t ResetTimeUs = 50; }; +class NeoEspBitBangSpeedApa106 : public NeoEspBitBangBase +{ +public: + static const uint32_t ResetTimeUs = 50; +}; class NeoEspBitBangInvertedSpeedWs2811 : public NeoEspBitBangBase { @@ -256,6 +269,12 @@ public: static const uint32_t ResetTimeUs = 50; }; +class NeoEspBitBangInvertedSpeedApa106 : public NeoEspBitBangBase +{ +public: + static const uint32_t ResetTimeUs = 50; +}; + template class NeoEspBitBangMethodBase { public: @@ -266,7 +285,7 @@ public: pinMode(pin, OUTPUT); _data = static_cast(malloc(_sizeData)); - memset(_data, 0, _sizeData); + // data cleared later in Begin() } ~NeoEspBitBangMethodBase() @@ -352,11 +371,11 @@ typedef NeoEspBitBangMethodBase NeoEsp32 typedef NeoEspBitBangMethodBase NeoEsp32BitBangTm1814Method; typedef NeoEspBitBangMethodBase NeoEsp32BitBang800KbpsMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBang400KbpsMethod; +typedef NeoEspBitBangMethodBase NeoEsp32BitBangApa106Method; typedef NeoEsp32BitBangWs2812xMethod NeoEsp32BitBangWs2813Method; typedef NeoEsp32BitBang800KbpsMethod NeoEsp32BitBangWs2812Method; typedef NeoEsp32BitBangSk6812Method NeoEsp32BitBangLc8812Method; -typedef NeoEsp32BitBang400KbpsMethod NeoEsp32BitBangApa106Method; typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2811InvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2812xInvertedMethod; @@ -364,11 +383,11 @@ typedef NeoEspBitBangMethodBase NeoEsp32BitBangTm1814InvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBang800KbpsInvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBang400KbpsInvertedMethod; +typedef NeoEspBitBangMethodBase NeoEsp32BitBangApa106InvertedMethod; typedef NeoEsp32BitBangWs2812xInvertedMethod NeoEsp32BitBangWs2813InvertedMethod; typedef NeoEsp32BitBang800KbpsInvertedMethod NeoEsp32BitBangWs2812InvertedMethod; typedef NeoEsp32BitBangSk6812InvertedMethod NeoEsp32BitBangLc8812InvertedMethod; -typedef NeoEsp32BitBang400KbpsInvertedMethod NeoEsp32BitBangApa106InvertedMethod; #else @@ -378,11 +397,11 @@ typedef NeoEspBitBangMethodBase NeoEsp82 typedef NeoEspBitBangMethodBase NeoEsp8266BitBangTm1814Method; typedef NeoEspBitBangMethodBase NeoEsp8266BitBang800KbpsMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBang400KbpsMethod; +typedef NeoEspBitBangMethodBase NeoEsp8266BitBangApa106Method; typedef NeoEsp8266BitBangWs2812xMethod NeoEsp8266BitBangWs2813Method; typedef NeoEsp8266BitBang800KbpsMethod NeoEsp8266BitBangWs2812Method; typedef NeoEsp8266BitBangSk6812Method NeoEsp8266BitBangLc8812Method; -typedef NeoEsp8266BitBang400KbpsMethod NeoEsp8266BitBangApa106Method; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2811InvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2812xInvertedMethod; @@ -390,11 +409,12 @@ typedef NeoEspBitBangMethodBase NeoEsp8266BitBangTm1814InvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBang800KbpsInvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBang400KbpsInvertedMethod; +typedef NeoEspBitBangMethodBase NeoEsp8266BitBangApa106InvertedMethod; typedef NeoEsp8266BitBangWs2812xInvertedMethod NeoEsp8266BitBangWs2813InvertedMethod; typedef NeoEsp8266BitBang800KbpsInvertedMethod NeoEsp8266BitBangWs2812InvertedMethod; typedef NeoEsp8266BitBangSk6812InvertedMethod NeoEsp8266BitBangLc8812InvertedMethod; -typedef NeoEsp8266BitBang400KbpsInvertedMethod NeoEsp8266BitBangApa106InvertedMethod; + #endif // ESP bitbang doesn't have defaults and should avoided except for testing diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoGamma.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoGamma.cpp similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoGamma.cpp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoGamma.cpp diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoGamma.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoGamma.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoGamma.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoGamma.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoHueBlend.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoHueBlend.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoHueBlend.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoHueBlend.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoMosaic.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoMosaic.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoMosaic.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoMosaic.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoNrf52xMethod.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoNrf52xMethod.h similarity index 81% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoNrf52xMethod.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoNrf52xMethod.h index b8810ea38..975bc10ee 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoNrf52xMethod.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoNrf52xMethod.h @@ -102,12 +102,13 @@ public: const static PinStatus IdleLevel = LOW; }; +// count 1 = 0.0625us, so max count (32768) is 2048us class NeoNrf52xPwmSpeedApa106 { public: - const static uint32_t CountTop = 26UL; // 1.65us - const static nrf_pwm_values_common_t Bit0 = 6 | 0x8000; // ~0.4us - const static nrf_pwm_values_common_t Bit1 = 20 | 0x8000; // ~1.25us + const static uint32_t CountTop = 26UL; // ~1.525us (target is 1.65us) + const static nrf_pwm_values_common_t Bit0 = 6 | 0x8000; // ~0.375us (target is 0.35) + const static nrf_pwm_values_common_t Bit1 = 21 | 0x8000; // ~1.3125us (target is 1.350) const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW const static uint32_t CountReset = 40; // 50us / 1.25us pulse width const static PinStatus IdleLevel = LOW; @@ -182,9 +183,9 @@ public: class NeoNrf52xPwmInvertedSpeedApa106 { public: - const static uint32_t CountTop = 26UL; // 1.65us - const static nrf_pwm_values_common_t Bit0 = 6; // ~0.4us - const static nrf_pwm_values_common_t Bit1 = 20; // ~1.25us + const static uint32_t CountTop = 26UL; // ~1.525us (target is 1.65us) + const static nrf_pwm_values_common_t Bit0 = 6; // ~0.375us (target is 0.35) + const static nrf_pwm_values_common_t Bit1 = 21; // ~1.3125us (target is 1.350) const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH const static uint32_t CountReset = 40; // 50us / 1.25us pulse width const static PinStatus IdleLevel = HIGH; @@ -228,6 +229,34 @@ public: }; #endif +// dynamic channel support +class NeoNrf52xPwmN +{ +public: + NeoNrf52xPwmN(NeoBusChannel channel) + { + NRF_PWM_Type* PWM[] = { + NRF_PWM0, + NRF_PWM1, + NRF_PWM2 +#ifdef NRF_PWM3 + ,NRF_PWM3 +#endif + }; + _pwm = PWM[channel]; + } + + inline NRF_PWM_Type* Pwm() const + { + return _pwm; + } + +protected: + NRF_PWM_Type* _pwm; + + NeoNrf52xPwmN() {}; +}; + template class NeoNrf52xMethodBase { public: @@ -235,13 +264,15 @@ public: _sizeData(pixelCount * elementSize + settingsSize), _pin(pin) { - pinMode(pin, OUTPUT); + construct(); + } - _data = static_cast(malloc(_sizeData)); - memset(_data, 0, _sizeData); - - _dmaBufferSize = c_dmaBytesPerDataByte * _sizeData + sizeof(nrf_pwm_values_common_t); - _dmaBuffer = static_cast(malloc(_dmaBufferSize)); + NeoNrf52xMethodBase(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize, NeoBusChannel channel) : + _sizeData(pixelCount* elementSize + settingsSize), + _pin(pin), + _bus(channel) + { + construct(); } ~NeoNrf52xMethodBase() @@ -261,7 +292,7 @@ public: bool IsReadyToUpdate() const { - return (T_BUS::Pwm()->EVENTS_STOPPED); + return (_bus.Pwm()->EVENTS_STOPPED); } void Initialize() @@ -306,50 +337,62 @@ public: private: const size_t _sizeData; // Size of '_data' buffer below const uint8_t _pin; // output pin number + const T_BUS _bus; // holds instance for multi channel support uint8_t* _data; // Holds LED color values size_t _dmaBufferSize; // total size of _dmaBuffer nrf_pwm_values_common_t* _dmaBuffer; // Holds pixel data in native format for PWM hardware + void construct() + { + pinMode(_pin, OUTPUT); + + _data = static_cast(malloc(_sizeData)); + // data cleared later in Begin() + + _dmaBufferSize = c_dmaBytesPerDataByte * _sizeData + sizeof(nrf_pwm_values_common_t); + _dmaBuffer = static_cast(malloc(_dmaBufferSize)); + } + void dmaInit() { // only use channel zero - T_BUS::Pwm()->PSEL.OUT[0] = digitalPinToPinName(_pin); - T_BUS::Pwm()->PSEL.OUT[1] = NC; - T_BUS::Pwm()->PSEL.OUT[2] = NC; - T_BUS::Pwm()->PSEL.OUT[3] = NC; + _bus.Pwm()->PSEL.OUT[0] = digitalPinToPinName(_pin); + _bus.Pwm()->PSEL.OUT[1] = NC; + _bus.Pwm()->PSEL.OUT[2] = NC; + _bus.Pwm()->PSEL.OUT[3] = NC; - T_BUS::Pwm()->ENABLE = 1; - T_BUS::Pwm()->MODE = NRF_PWM_MODE_UP; - T_BUS::Pwm()->PRESCALER = NRF_PWM_CLK_16MHz; - T_BUS::Pwm()->COUNTERTOP = T_SPEED::CountTop; - T_BUS::Pwm()->LOOP = 1; // single fire so events get set - T_BUS::Pwm()->DECODER = NRF_PWM_LOAD_COMMON; + _bus.Pwm()->ENABLE = 1; + _bus.Pwm()->MODE = NRF_PWM_MODE_UP; + _bus.Pwm()->PRESCALER = NRF_PWM_CLK_16MHz; + _bus.Pwm()->COUNTERTOP = T_SPEED::CountTop; + _bus.Pwm()->LOOP = 1; // single fire so events get set + _bus.Pwm()->DECODER = NRF_PWM_LOAD_COMMON; // sequence zero is the primary data with a BitReset entry on the end for // the delay repeating - T_BUS::Pwm()->SEQ[0].PTR = reinterpret_cast(_dmaBuffer); - T_BUS::Pwm()->SEQ[0].CNT = _dmaBufferSize / sizeof(nrf_pwm_values_common_t); - T_BUS::Pwm()->SEQ[0].REFRESH = 0; // ignored - T_BUS::Pwm()->SEQ[0].ENDDELAY = T_SPEED::CountReset; // ignored still? + _bus.Pwm()->SEQ[0].PTR = reinterpret_cast(_dmaBuffer); + _bus.Pwm()->SEQ[0].CNT = _dmaBufferSize / sizeof(nrf_pwm_values_common_t); + _bus.Pwm()->SEQ[0].REFRESH = 0; // ignored + _bus.Pwm()->SEQ[0].ENDDELAY = T_SPEED::CountReset; // ignored still? // sequence one is pointing to the BitReset entry at the end of the primary data - T_BUS::Pwm()->SEQ[1].PTR = reinterpret_cast(_dmaBuffer + (T_BUS::Pwm()->SEQ[0].CNT - 1)); - T_BUS::Pwm()->SEQ[1].CNT = 1; - T_BUS::Pwm()->SEQ[1].REFRESH = 0; // ignored - T_BUS::Pwm()->SEQ[1].ENDDELAY = 0; // ignored + _bus.Pwm()->SEQ[1].PTR = reinterpret_cast(_dmaBuffer + (_bus.Pwm()->SEQ[0].CNT - 1)); + _bus.Pwm()->SEQ[1].CNT = 1; + _bus.Pwm()->SEQ[1].REFRESH = 0; // ignored + _bus.Pwm()->SEQ[1].ENDDELAY = 0; // ignored // stop when the loop finishes - T_BUS::Pwm()->SHORTS = PWM_SHORTS_LOOPSDONE_STOP_Msk; - T_BUS::Pwm()->INTEN = 0; + _bus.Pwm()->SHORTS = PWM_SHORTS_LOOPSDONE_STOP_Msk; + _bus.Pwm()->INTEN = 0; dmaResetEvents(); } void dmaDeinit() { - T_BUS::Pwm()->ENABLE = 0; - T_BUS::Pwm()->PSEL.OUT[0] = NC; + _bus.Pwm()->ENABLE = 0; + _bus.Pwm()->PSEL.OUT[0] = NC; } void FillBuffer() @@ -379,20 +422,28 @@ private: void dmaResetEvents() { - T_BUS::Pwm()->EVENTS_LOOPSDONE = 0; - T_BUS::Pwm()->EVENTS_SEQEND[0] = 0; - T_BUS::Pwm()->EVENTS_SEQEND[1] = 0; - T_BUS::Pwm()->EVENTS_STOPPED = 0; + _bus.Pwm()->EVENTS_LOOPSDONE = 0; + _bus.Pwm()->EVENTS_SEQEND[0] = 0; + _bus.Pwm()->EVENTS_SEQEND[1] = 0; + _bus.Pwm()->EVENTS_STOPPED = 0; } void dmaStart() { dmaResetEvents(); - T_BUS::Pwm()->TASKS_SEQSTART[0] = 1; + _bus.Pwm()->TASKS_SEQSTART[0] = 1; } }; // normal +typedef NeoNrf52xMethodBase NeoNrf52xPwmNWs2811Method; +typedef NeoNrf52xMethodBase NeoNrf52xPwmNWs2812xMethod; +typedef NeoNrf52xMethodBase NeoNrf52xPwmNSk6812Method; +typedef NeoNrf52xMethodBase NeoNrf52xPwmNTm1814Method; +typedef NeoNrf52xMethodBase NeoNrf52xPwmNApa106Method; +typedef NeoNrf52xMethodBase NeoNrf52xPwmN800KbpsMethod; +typedef NeoNrf52xMethodBase NeoNrf52xPwmN400KbpsMethod; + typedef NeoNrf52xMethodBase NeoNrf52xPwm0Ws2811Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Ws2812xMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Sk6812Method; @@ -428,6 +479,14 @@ typedef NeoNrf52xMethodBase NeoNrf52xPw #endif // inverted +typedef NeoNrf52xMethodBase NeoNrf52xPwmNWs2811InvertedMethod; +typedef NeoNrf52xMethodBase NeoNrf52xPwmNWs2812xInvertedMethod; +typedef NeoNrf52xMethodBase NeoNrf52xPwmNSk6812InvertedMethod; +typedef NeoNrf52xMethodBase NeoNrf52xPwmNTm1814InvertedMethod; +typedef NeoNrf52xMethodBase NeoNrf52xPwmNApa106InvertedMethod; +typedef NeoNrf52xMethodBase NeoNrf52xPwmN800KbpsInvertedMethod; +typedef NeoNrf52xMethodBase NeoNrf52xPwmN400KbpsInvertedMethod; + typedef NeoNrf52xMethodBase NeoNrf52xPwm0Ws2811InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Ws2812xInvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Sk6812InvertedMethod; diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoPixelAnimator.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoPixelAnimator.cpp similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoPixelAnimator.cpp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoPixelAnimator.cpp diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoPixelAvr.c b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoPixelAvr.c similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoPixelAvr.c rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoPixelAvr.c diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoRingTopology.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoRingTopology.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoRingTopology.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoRingTopology.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoSegmentFeatures.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoSegmentFeatures.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoSegmentFeatures.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoSegmentFeatures.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoSettings.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoSettings.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoSettings.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoSettings.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoSpriteSheet.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoSpriteSheet.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoSpriteSheet.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoSpriteSheet.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoTiles.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoTiles.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoTiles.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoTiles.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoTm1814ColorFeatures.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoTm1814ColorFeatures.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoTm1814ColorFeatures.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoTm1814ColorFeatures.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoTopology.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoTopology.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/NeoTopology.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/NeoTopology.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/P9813ColorFeatures.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/P9813ColorFeatures.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/P9813ColorFeatures.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/P9813ColorFeatures.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/P9813GenericMethod.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/P9813GenericMethod.h similarity index 94% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/P9813GenericMethod.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/P9813GenericMethod.h index 37a15f6ad..f72c31703 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/P9813GenericMethod.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/P9813GenericMethod.h @@ -43,7 +43,7 @@ public: _wire(pinClock, pinData) { _data = static_cast(malloc(_sizeData)); - memset(_data, 0, _sizeData); + // data cleared later in Begin() } #if !defined(__AVR_ATtiny85__) && !defined(ARDUINO_attiny) @@ -119,6 +119,9 @@ typedef P9813MethodBase P9813Method; typedef P9813MethodBase> P9813Spi20MhzMethod; typedef P9813MethodBase> P9813Spi10MhzMethod; typedef P9813MethodBase> P9813Spi2MhzMethod; +typedef P9813MethodBase> P9813Spi1MhzMethod; +typedef P9813MethodBase> P9813Spi500KhzMethod; + typedef P9813Spi10MhzMethod P9813SpiMethod; #endif diff --git a/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Rgb16Color.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Rgb16Color.h new file mode 100644 index 000000000..c038c4cce --- /dev/null +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Rgb16Color.h @@ -0,0 +1,272 @@ +/*------------------------------------------------------------------------- +Rgb16Color provides a color object that stores in only 16 bits, aka 565 format + +Written by Michael C. Miller. + +I invest time and resources providing this open source code, +please support me by dontating (see https://github.com/Makuna/NeoPixelBus) + +------------------------------------------------------------------------- +This file is part of the Makuna/NeoPixelBus library. + +NeoPixelBus is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +NeoPixelBus is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with NeoPixel. If not, see +. +-------------------------------------------------------------------------*/ +#pragma once + +#include +#include "NeoSettings.h" +#include "RgbColorBase.h" + + +// ------------------------------------------------------------------------ +// Rgb16Color represents a color object that is represented by Red, Green, Blue +// component values stored in a single 16 bit value using 565 model. +// It contains helpful color routines to manipulate the color. +// ------------------------------------------------------------------------ +struct Rgb16Color : RgbColorBase +{ + typedef NeoRgbCurrentSettings SettingsObject; + + // ------------------------------------------------------------------------ + // Construct a Rgb16Color using R, G, B values (0-255) + // ------------------------------------------------------------------------ + Rgb16Color(uint8_t r, uint8_t g, uint8_t b) + { + setR(r); + setG(g); + setB(b); + }; + + // ------------------------------------------------------------------------ + // Construct a Rgb16Color using a single brightness value (0-255) + // This works well for creating gray tone colors + // (0) = black, (255) = white, (128) = gray + // ------------------------------------------------------------------------ + Rgb16Color(uint8_t brightness) + { + setR(brightness); + setG(brightness); + setB(brightness); + }; + + // ------------------------------------------------------------------------ + // Construct a Rgb16Color using HtmlColor + // ------------------------------------------------------------------------ + Rgb16Color(const HtmlColor& color) + { + RgbColor converted = color; + + setR(converted.R); + setG(converted.G); + setB(converted.B); + }; + + // ------------------------------------------------------------------------ + // Construct a Rgb16Color using HslColor + // ------------------------------------------------------------------------ + Rgb16Color(const HslColor& color) + { + RgbColor converted = color; + + setR(converted.R); + setG(converted.G); + setB(converted.B); + }; + + // ------------------------------------------------------------------------ + // Construct a Rgb16Color using HsbColor + // ------------------------------------------------------------------------ + Rgb16Color(const HsbColor& color) + { + RgbColor converted = color; + + setR(converted.R); + setG(converted.G); + setB(converted.B); + }; + + // ------------------------------------------------------------------------ + // Construct a Rgb16Color that will have its values set in latter operations + // CAUTION: The _c members are not initialized and may not be consistent + // ------------------------------------------------------------------------ + Rgb16Color() + { + }; + + // ------------------------------------------------------------------------ + // properties + // ------------------------------------------------------------------------ + void setR(uint8_t r) + { + _c &= 0x07ff; + _c |= ((r & 0xf8) << 8); + }; + uint8_t getR() const + { + return (_c & 0xf800) >> 8; + }; + + void setG(uint8_t g) + { + _c &= 0xf81f; + _c |= ((g & 0xfe) << 3); + }; + uint8_t getG() const + { + return (_c & 0x07e0) >> 3; + }; + + void setB(uint8_t b) + { + _c &= 0xffe0; + _c |= ((b & 0xf8) >> 3); + }; + uint8_t getB() const + { + return (_c & 0x001f) << 3; + }; + + + // ------------------------------------------------------------------------ + // Comparison operators + // ------------------------------------------------------------------------ + bool operator==(const Rgb16Color& other) const + { + return (_c == other._c); + }; + + bool operator!=(const Rgb16Color& other) const + { + return !(*this == other); + }; + + // ------------------------------------------------------------------------ + // CalculateBrightness will calculate the overall brightness + // NOTE: This is a simple linear brightness + // ------------------------------------------------------------------------ + uint8_t CalculateBrightness() const + { + RgbColor converted = *this; + return converted.CalculateBrightness(); + }; + + // ------------------------------------------------------------------------ + // Dim will return a new color that is blended to black with the given ratio + // ratio - (0-255) where 255 will return the original color and 0 will return black + // + // NOTE: This is a simple linear blend + // ------------------------------------------------------------------------ + Rgb16Color Dim(uint8_t ratio) const + { + RgbColor converted = *this; + RgbColor result = converted.Dim(ratio); + + return Rgb16Color(result.R, result.G, result.B); + }; + + // ------------------------------------------------------------------------ + // Brighten will return a new color that is blended to white with the given ratio + // ratio - (0-255) where 255 will return the original color and 0 will return white + // + // NOTE: This is a simple linear blend + // ------------------------------------------------------------------------ + Rgb16Color Brighten(uint8_t ratio) const + { + RgbColor converted = *this; + RgbColor result = converted.Brighten(ratio); + + return Rgb16Color(result.R, result.G, result.B); + }; + + // ------------------------------------------------------------------------ + // Darken will adjust the color by the given delta toward black + // NOTE: This is a simple linear change + // delta - (0-255) the amount to dim the color + // ------------------------------------------------------------------------ + void Darken(uint8_t delta) + { + RgbColor converted = *this; + + converted.Darken(delta); + setR(converted.R); + setG(converted.G); + setB(converted.B); + }; + + // ------------------------------------------------------------------------ + // Lighten will adjust the color by the given delta toward white + // NOTE: This is a simple linear change + // delta - (0-255) the amount to lighten the color + // ------------------------------------------------------------------------ + void Lighten(uint8_t delta) + { + RgbColor converted = *this; + + converted.Lighten(delta); + setR(converted.R); + setG(converted.G); + setB(converted.B); + }; + + // ------------------------------------------------------------------------ + // LinearBlend between two colors by the amount defined by progress variable + // left - the color to start the blend at + // right - the color to end the blend at + // progress - (0.0 - 1.0) value where 0 will return left and 1.0 will return right + // and a value between will blend the color weighted linearly between them + // ------------------------------------------------------------------------ + static Rgb16Color LinearBlend(const Rgb16Color& left, const Rgb16Color& right, float progress) + { + RgbColor result = RgbColor::LinearBlend(left, right, progress); + + return Rgb16Color(result.R, result.G, result.B); + }; + + // ------------------------------------------------------------------------ + // BilinearBlend between four colors by the amount defined by 2d variable + // c00 - upper left quadrant color + // c01 - upper right quadrant color + // c10 - lower left quadrant color + // c11 - lower right quadrant color + // x - unit value (0.0 - 1.0) that defines the blend progress in horizontal space + // y - unit value (0.0 - 1.0) that defines the blend progress in vertical space + // ------------------------------------------------------------------------ + static Rgb16Color BilinearBlend(const Rgb16Color& c00, + const Rgb16Color& c01, + const Rgb16Color& c10, + const Rgb16Color& c11, + float x, + float y) + { + RgbColor result = RgbColor::BilinearBlend(c00, c01, c10, c11, x, y); + + return Rgb16Color(result.R, result.G, result.B); + }; + + uint32_t CalcTotalTenthMilliAmpere(const SettingsObject& settings) + { + auto total = 0; + + total += getR() * settings.RedTenthMilliAmpere / 255; + total += getG() * settings.GreenTenthMilliAmpere / 255; + total += getB() * settings.BlueTenthMilliAmpere / 255; + + return total; + }; + +protected: + uint16_t _c; +}; + diff --git a/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Rgb48Color.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Rgb48Color.cpp new file mode 100644 index 000000000..3743ac588 --- /dev/null +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Rgb48Color.cpp @@ -0,0 +1,170 @@ +/*------------------------------------------------------------------------- +Rgb48Color provides a color object that can be directly consumed by NeoPixelBus + +Written by Michael C. Miller. + +I invest time and resources providing this open source code, +please support me by dontating (see https://github.com/Makuna/NeoPixelBus) + +------------------------------------------------------------------------- +This file is part of the Makuna/NeoPixelBus library. + +NeoPixelBus is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +NeoPixelBus is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with NeoPixel. If not, see +. +-------------------------------------------------------------------------*/ + +#include "Rgb48Color.h" +#include "RgbColor.h" +#include "HslColor.h" +#include "HsbColor.h" +#include "HtmlColor.h" + +Rgb48Color::Rgb48Color(const HtmlColor& color) +{ + uint32_t temp = color.Color; + + B = (temp & 0xff); + temp = temp >> 8; + G = (temp & 0xff); + temp = temp >> 8; + R = (temp & 0xff); +}; + +Rgb48Color::Rgb48Color(const HslColor& color) +{ + float r; + float g; + float b; + + _HslToRgb(color, &r, &g, &b); + + R = (uint16_t)(r * Max); + G = (uint16_t)(g * Max); + B = (uint16_t)(b * Max); +} + +Rgb48Color::Rgb48Color(const HsbColor& color) +{ + float r; + float g; + float b; + + _HsbToRgb(color, &r, &g, &b); + + R = (uint16_t)(r * Max); + G = (uint16_t)(g * Max); + B = (uint16_t)(b * Max); +} + +uint16_t Rgb48Color::CalculateBrightness() const +{ + return (uint16_t)(((uint32_t)R + (uint32_t)G + (uint32_t)B) / 3); +} + +Rgb48Color Rgb48Color::Dim(uint16_t ratio) const +{ + // specifically avoids float math + return Rgb48Color(_elementDim(R, ratio), _elementDim(G, ratio), _elementDim(B, ratio)); +} + +Rgb48Color Rgb48Color::Brighten(uint16_t ratio) const +{ + // specifically avoids float math + return Rgb48Color(_elementBrighten(R, ratio), _elementBrighten(G, ratio), _elementBrighten(B, ratio)); +} + +void Rgb48Color::Darken(uint16_t delta) +{ + if (R > delta) + { + R -= delta; + } + else + { + R = 0; + } + + if (G > delta) + { + G -= delta; + } + else + { + G = 0; + } + + if (B > delta) + { + B -= delta; + } + else + { + B = 0; + } +} + +void Rgb48Color::Lighten(uint16_t delta) +{ + if (R < Max - delta) + { + R += delta; + } + else + { + R = Max; + } + + if (G < Max - delta) + { + G += delta; + } + else + { + G = Max; + } + + if (B < Max - delta) + { + B += delta; + } + else + { + B = Max; + } +} + +Rgb48Color Rgb48Color::LinearBlend(const Rgb48Color& left, const Rgb48Color& right, float progress) +{ + return Rgb48Color( left.R + ((right.R - left.R) * progress), + left.G + ((right.G - left.G) * progress), + left.B + ((right.B - left.B) * progress)); +} + +Rgb48Color Rgb48Color::BilinearBlend(const Rgb48Color& c00, + const Rgb48Color& c01, + const Rgb48Color& c10, + const Rgb48Color& c11, + float x, + float y) +{ + float v00 = (1.0f - x) * (1.0f - y); + float v10 = x * (1.0f - y); + float v01 = (1.0f - x) * y; + float v11 = x * y; + + return Rgb48Color( + c00.R * v00 + c10.R * v10 + c01.R * v01 + c11.R * v11, + c00.G * v00 + c10.G * v10 + c01.G * v01 + c11.G * v11, + c00.B * v00 + c10.B * v10 + c01.B * v01 + c11.B * v11); +} \ No newline at end of file diff --git a/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Rgb48Color.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Rgb48Color.h new file mode 100644 index 000000000..eb351421b --- /dev/null +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Rgb48Color.h @@ -0,0 +1,210 @@ +/*------------------------------------------------------------------------- +Rgb48Color provides a color object that contains 16bit color elements + +Written by Michael C. Miller. + +I invest time and resources providing this open source code, +please support me by dontating (see https://github.com/Makuna/NeoPixelBus) + +------------------------------------------------------------------------- +This file is part of the Makuna/NeoPixelBus library. + +NeoPixelBus is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +NeoPixelBus is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with NeoPixel. If not, see +. +-------------------------------------------------------------------------*/ +#pragma once + +#include +#include "NeoSettings.h" +#include "RgbColorBase.h" +#include "RgbColor.h" + + +// ------------------------------------------------------------------------ +// Rgb48Color represents a color object that is represented by Red, Green, Blue +// component values. It contains helpful color routines to manipulate the +// color. +// ------------------------------------------------------------------------ +struct Rgb48Color : RgbColorBase +{ + typedef NeoRgbCurrentSettings SettingsObject; + + // ------------------------------------------------------------------------ + // Construct a Rgb48Color using R, G, B values (0-65535) + // ------------------------------------------------------------------------ + Rgb48Color(uint16_t r, uint16_t g, uint16_t b) : + R(r), G(g), B(b) + { + }; + + // ------------------------------------------------------------------------ + // Construct a Rgb48Color using a single brightness value (0-65535) + // This works well for creating gray tone colors + // (0) = black, (65535) = white, (32768) = gray + // ------------------------------------------------------------------------ + Rgb48Color(uint16_t brightness) : + R(brightness), G(brightness), B(brightness) + { + }; + + // ------------------------------------------------------------------------ + // Construct a Rgb48Color using RgbColor + // ------------------------------------------------------------------------ + Rgb48Color(const RgbColor& color) + { + R = (color.R == 0) ? 0 : (color.R << 8 | 0xff); + G = (color.G == 0) ? 0 : (color.G << 8 | 0xff); + B = (color.B == 0) ? 0 : (color.B << 8 | 0xff); + } + + // ------------------------------------------------------------------------ + // Construct a Rgb48Color using HtmlColor + // ------------------------------------------------------------------------ + Rgb48Color(const HtmlColor& color); + + // ------------------------------------------------------------------------ + // Construct a Rgb48Color using HslColor + // ------------------------------------------------------------------------ + Rgb48Color(const HslColor& color); + + // ------------------------------------------------------------------------ + // Construct a Rgb48Color using HsbColor + // ------------------------------------------------------------------------ + Rgb48Color(const HsbColor& color); + + // ------------------------------------------------------------------------ + // Construct a Rgb48Color that will have its values set in latter operations + // CAUTION: The R,G,B members are not initialized and may not be consistent + // ------------------------------------------------------------------------ + Rgb48Color() + { + }; + + // ------------------------------------------------------------------------ + // Comparison operators + // ------------------------------------------------------------------------ + bool operator==(const Rgb48Color& other) const + { + return (R == other.R && G == other.G && B == other.B); + }; + + bool operator!=(const Rgb48Color& other) const + { + return !(*this == other); + }; + + // ------------------------------------------------------------------------ + // CalculateBrightness will calculate the overall brightness + // NOTE: This is a simple linear brightness + // ------------------------------------------------------------------------ + uint16_t CalculateBrightness() const; + + // ------------------------------------------------------------------------ + // Dim will return a new color that is blended to black with the given ratio + // ratio - (0-65535) where 65535 will return the original color and 0 will return black + // + // NOTE: This is a simple linear blend + // ------------------------------------------------------------------------ + Rgb48Color Dim(uint16_t ratio) const; + + // ------------------------------------------------------------------------ + // Brighten will return a new color that is blended to white with the given ratio + // ratio - (0-65535) where 65535 will return the original color and 0 will return white + // + // NOTE: This is a simple linear blend + // ------------------------------------------------------------------------ + Rgb48Color Brighten(uint16_t ratio) const; + + // ------------------------------------------------------------------------ + // Darken will adjust the color by the given delta toward black + // NOTE: This is a simple linear change + // delta - (0-65535) the amount to dim the color + // ------------------------------------------------------------------------ + void Darken(uint16_t delta); + + // ------------------------------------------------------------------------ + // Lighten will adjust the color by the given delta toward white + // NOTE: This is a simple linear change + // delta - (0-65535) the amount to lighten the color + // ------------------------------------------------------------------------ + void Lighten(uint16_t delta); + + // ------------------------------------------------------------------------ + // LinearBlend between two colors by the amount defined by progress variable + // left - the color to start the blend at + // right - the color to end the blend at + // progress - (0.0 - 1.0) value where 0 will return left and 1.0 will return right + // and a value between will blend the color weighted linearly between them + // ------------------------------------------------------------------------ + static Rgb48Color LinearBlend(const Rgb48Color& left, const Rgb48Color& right, float progress); + + // ------------------------------------------------------------------------ + // BilinearBlend between four colors by the amount defined by 2d variable + // c00 - upper left quadrant color + // c01 - upper right quadrant color + // c10 - lower left quadrant color + // c11 - lower right quadrant color + // x - unit value (0.0 - 1.0) that defines the blend progress in horizontal space + // y - unit value (0.0 - 1.0) that defines the blend progress in vertical space + // ------------------------------------------------------------------------ + static Rgb48Color BilinearBlend(const Rgb48Color& c00, + const Rgb48Color& c01, + const Rgb48Color& c10, + const Rgb48Color& c11, + float x, + float y); + + uint32_t CalcTotalTenthMilliAmpere(const SettingsObject& settings) + { + auto total = 0; + + total += R * settings.RedTenthMilliAmpere / Max; + total += G * settings.GreenTenthMilliAmpere / Max; + total += B * settings.BlueTenthMilliAmpere / Max; + + return total; + } + + // ------------------------------------------------------------------------ + // Red, Green, Blue color members (0-65535) where + // (0,0,0) is black and (65535,65535,65535) is white + // ------------------------------------------------------------------------ + uint16_t R; + uint16_t G; + uint16_t B; + + const static uint16_t Max = 65535; + +private: + inline static uint16_t _elementDim(uint16_t value, uint16_t ratio) + { + return (static_cast(value) * (static_cast(ratio) + 1)) >> 8; + } + + inline static uint16_t _elementBrighten(uint16_t value, uint16_t ratio) + { + uint32_t element = ((static_cast(value) + 1) << 8) / (static_cast(ratio) + 1); + + if (element > Max) + { + element = Max; + } + else + { + element -= 1; + } + return element; + } +}; + diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/RgbColor.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbColor.cpp similarity index 61% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/RgbColor.cpp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbColor.cpp index 30a781195..99f4e94b0 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/RgbColor.cpp +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbColor.cpp @@ -25,27 +25,25 @@ License along with NeoPixel. If not, see -------------------------------------------------------------------------*/ #include "RgbColor.h" +#include "Rgb16Color.h" +#include "Rgb48Color.h" #include "HslColor.h" #include "HsbColor.h" #include "HtmlColor.h" +#include "RgbwColor.h" -static float _CalcColor(float p, float q, float t) +RgbColor::RgbColor(const RgbwColor& color) : + R(color.R), + G(color.G), + B(color.B) { - if (t < 0.0f) - t += 1.0f; - if (t > 1.0f) - t -= 1.0f; +}; - if (t < 1.0f / 6.0f) - return p + (q - p) * 6.0f * t; - - if (t < 0.5f) - return q; - - if (t < 2.0f / 3.0f) - return p + ((q - p) * (2.0f / 3.0f - t) * 6.0f); - - return p; +RgbColor::RgbColor(const Rgb16Color& color) +{ + R = color.getR(); + G = color.getG(); + B = color.getB(); } RgbColor::RgbColor(const HtmlColor& color) @@ -65,27 +63,11 @@ RgbColor::RgbColor(const HslColor& color) float g; float b; - float h = color.H; - float s = color.S; - float l = color.L; + _HslToRgb(color, &r, &g, &b); - - if (color.S == 0.0f || color.L == 0.0f) - { - r = g = b = l; // achromatic or black - } - else - { - float q = l < 0.5f ? l * (1.0f + s) : l + s - (l * s); - float p = 2.0f * l - q; - r = _CalcColor(p, q, h + 1.0f / 3.0f); - g = _CalcColor(p, q, h); - b = _CalcColor(p, q, h - 1.0f / 3.0f); - } - - R = (uint8_t)(r * 255.0f); - G = (uint8_t)(g * 255.0f); - B = (uint8_t)(b * 255.0f); + R = (uint8_t)(r * Max); + G = (uint8_t)(g * Max); + B = (uint8_t)(b * Max); } RgbColor::RgbColor(const HsbColor& color) @@ -94,68 +76,11 @@ RgbColor::RgbColor(const HsbColor& color) float g; float b; - float h = color.H; - float s = color.S; - float v = color.B; + _HsbToRgb(color, &r, &g, &b); - if (color.S == 0.0f) - { - r = g = b = v; // achromatic or black - } - else - { - if (h < 0.0f) - { - h += 1.0f; - } - else if (h >= 1.0f) - { - h -= 1.0f; - } - h *= 6.0f; - int i = (int)h; - float f = h - i; - float q = v * (1.0f - s * f); - float p = v * (1.0f - s); - float t = v * (1.0f - s * (1.0f - f)); - switch (i) - { - case 0: - r = v; - g = t; - b = p; - break; - case 1: - r = q; - g = v; - b = p; - break; - case 2: - r = p; - g = v; - b = t; - break; - case 3: - r = p; - g = q; - b = v; - break; - case 4: - r = t; - g = p; - b = v; - break; - default: - r = v; - g = p; - b = q; - break; - } - } - - R = (uint8_t)(r * 255.0f); - G = (uint8_t)(g * 255.0f); - B = (uint8_t)(b * 255.0f); + R = (uint8_t)(r * Max); + G = (uint8_t)(g * Max); + B = (uint8_t)(b * Max); } uint8_t RgbColor::CalculateBrightness() const @@ -207,31 +132,31 @@ void RgbColor::Darken(uint8_t delta) void RgbColor::Lighten(uint8_t delta) { - if (R < 255 - delta) + if (R < Max - delta) { R += delta; } else { - R = 255; + R = Max; } - if (G < 255 - delta) + if (G < Max - delta) { G += delta; } else { - G = 255; + G = Max; } - if (B < 255 - delta) + if (B < Max - delta) { B += delta; } else { - B = 255; + B = Max; } } diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/RgbColor.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbColor.h similarity index 90% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/RgbColor.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbColor.h index b50857b1a..aa999f5ba 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/RgbColor.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbColor.h @@ -27,17 +27,16 @@ License along with NeoPixel. If not, see #include #include "NeoSettings.h" +#include "RgbColorBase.h" -struct HslColor; -struct HsbColor; -struct HtmlColor; +struct RgbwColor; // ------------------------------------------------------------------------ // RgbColor represents a color object that is represented by Red, Green, Blue // component values. It contains helpful color routines to manipulate the // color. // ------------------------------------------------------------------------ -struct RgbColor +struct RgbColor : RgbColorBase { typedef NeoRgbCurrentSettings SettingsObject; @@ -59,6 +58,16 @@ struct RgbColor { }; + // ------------------------------------------------------------------------ + // explicitly Construct a RgbColor using RgbwColor + // ------------------------------------------------------------------------ + explicit RgbColor(const RgbwColor& color); + + // ------------------------------------------------------------------------ + // Construct a RgbColor using Rgb16Color + // ------------------------------------------------------------------------ + RgbColor(const Rgb16Color& color); + // ------------------------------------------------------------------------ // Construct a RgbColor using HtmlColor // ------------------------------------------------------------------------ @@ -74,6 +83,7 @@ struct RgbColor // ------------------------------------------------------------------------ RgbColor(const HsbColor& color); + // ------------------------------------------------------------------------ // Construct a RgbColor that will have its values set in latter operations // CAUTION: The R,G,B members are not initialized and may not be consistent @@ -160,9 +170,9 @@ struct RgbColor { auto total = 0; - total += R * settings.RedTenthMilliAmpere / 255; - total += G * settings.GreenTenthMilliAmpere / 255; - total += B * settings.BlueTenthMilliAmpere / 255; + total += R * settings.RedTenthMilliAmpere / Max; + total += G * settings.GreenTenthMilliAmpere / Max; + total += B * settings.BlueTenthMilliAmpere / Max; return total; } @@ -175,6 +185,8 @@ struct RgbColor uint8_t G; uint8_t B; + const static uint8_t Max = 255; + private: inline static uint8_t _elementDim(uint8_t value, uint8_t ratio) { @@ -185,9 +197,9 @@ private: { uint16_t element = ((static_cast(value) + 1) << 8) / (static_cast(ratio) + 1); - if (element > 255) + if (element > Max) { - element = 255; + element = Max; } else { diff --git a/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbColorBase.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbColorBase.cpp new file mode 100644 index 000000000..ad0eb8277 --- /dev/null +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbColorBase.cpp @@ -0,0 +1,134 @@ +/*------------------------------------------------------------------------- +RgbColorBase provides a RGB color object common support + +Written by Michael C. Miller. + +I invest time and resources providing this open source code, +please support me by dontating (see https://github.com/Makuna/NeoPixelBus) + +------------------------------------------------------------------------- +This file is part of the Makuna/NeoPixelBus library. + +NeoPixelBus is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +NeoPixelBus is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with NeoPixel. If not, see +. +-------------------------------------------------------------------------*/ + +#include "RgbColorBase.h" +#include "RgbColor.h" +#include "Rgb48Color.h" +#include "HslColor.h" +#include "HsbColor.h" +#include "HtmlColor.h" + +float RgbColorBase::_CalcColor(float p, float q, float t) +{ + if (t < 0.0f) + t += 1.0f; + if (t > 1.0f) + t -= 1.0f; + + if (t < 1.0f / 6.0f) + return p + (q - p) * 6.0f * t; + + if (t < 0.5f) + return q; + + if (t < 2.0f / 3.0f) + return p + ((q - p) * (2.0f / 3.0f - t) * 6.0f); + + return p; +} + +void RgbColorBase::_HslToRgb(const HslColor& color, float* r, float* g, float* b) +{ + float h = color.H; + float s = color.S; + float l = color.L; + + + if (color.S == 0.0f || color.L == 0.0f) + { + *r = *g = *b = l; // achromatic or black + } + else + { + float q = l < 0.5f ? l * (1.0f + s) : l + s - (l * s); + float p = 2.0f * l - q; + *r = _CalcColor(p, q, h + 1.0f / 3.0f); + *g = _CalcColor(p, q, h); + *b = _CalcColor(p, q, h - 1.0f / 3.0f); + } +} + +void RgbColorBase::_HsbToRgb(const HsbColor& color, float* r, float* g, float* b) +{ + float h = color.H; + float s = color.S; + float v = color.B; + + if (color.S == 0.0f) + { + *r = *g = *b = v; // achromatic or black + } + else + { + if (h < 0.0f) + { + h += 1.0f; + } + else if (h >= 1.0f) + { + h -= 1.0f; + } + h *= 6.0f; + int i = (int)h; + float f = h - i; + float q = v * (1.0f - s * f); + float p = v * (1.0f - s); + float t = v * (1.0f - s * (1.0f - f)); + switch (i) + { + case 0: + *r = v; + *g = t; + *b = p; + break; + case 1: + *r = q; + *g = v; + *b = p; + break; + case 2: + *r = p; + *g = v; + *b = t; + break; + case 3: + *r = p; + *g = q; + *b = v; + break; + case 4: + *r = t; + *g = p; + *b = v; + break; + default: + *r = v; + *g = p; + *b = q; + break; + } + } +} \ No newline at end of file diff --git a/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbColorBase.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbColorBase.h new file mode 100644 index 000000000..689fe884e --- /dev/null +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbColorBase.h @@ -0,0 +1,42 @@ +/*------------------------------------------------------------------------- +RgbColorBase provides a RGB color object common support + +Written by Michael C. Miller. + +I invest time and resources providing this open source code, +please support me by dontating (see https://github.com/Makuna/NeoPixelBus) + +------------------------------------------------------------------------- +This file is part of the Makuna/NeoPixelBus library. + +NeoPixelBus is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +NeoPixelBus is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with NeoPixel. If not, see +. +-------------------------------------------------------------------------*/ +#pragma once + +struct HslColor; +struct HsbColor; +struct HtmlColor; +struct Rgb16Color; + +struct RgbColorBase +{ + +protected: + static float _CalcColor(float p, float q, float t); + + static void _HslToRgb(const HslColor& color, float* r, float* g, float* b); + + static void _HsbToRgb(const HsbColor& color, float* r, float* g, float* b); +}; \ No newline at end of file diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/RgbwColor.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbwColor.cpp similarity index 99% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/RgbwColor.cpp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbwColor.cpp index cb9681f2b..d73c7c9de 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/RgbwColor.cpp +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbwColor.cpp @@ -25,6 +25,7 @@ License along with NeoPixel. If not, see -------------------------------------------------------------------------*/ #include "RgbColor.h" +#include "Rgb48Color.h" #include "HslColor.h" #include "HsbColor.h" #include "RgbwColor.h" diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/RgbwColor.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbwColor.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/RgbwColor.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/RgbwColor.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/SegmentDigit.cpp b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/SegmentDigit.cpp similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/SegmentDigit.cpp rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/SegmentDigit.cpp diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/SegmentDigit.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/SegmentDigit.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/SegmentDigit.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/SegmentDigit.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/TwoWireBitBangImple.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/TwoWireBitBangImple.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/TwoWireBitBangImple.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/TwoWireBitBangImple.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/TwoWireBitBangImpleAvr.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/TwoWireBitBangImpleAvr.h similarity index 100% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/TwoWireBitBangImpleAvr.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/TwoWireBitBangImpleAvr.h diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/TwoWireSpiImple.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/TwoWireSpiImple.h similarity index 95% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/TwoWireSpiImple.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/TwoWireSpiImple.h index 9838f7b00..ce07ee722 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/TwoWireSpiImple.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/TwoWireSpiImple.h @@ -52,6 +52,18 @@ public: static const uint32_t Clock = 2000000L; }; +class SpiSpeed1Mhz +{ +public: + static const uint32_t Clock = 1000000L; +}; + +class SpiSpeed500Khz +{ +public: + static const uint32_t Clock = 500000L; +}; + template class TwoWireSpiImple { public: diff --git a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Ws2801GenericMethod.h b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Ws2801GenericMethod.h similarity index 93% rename from lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Ws2801GenericMethod.h rename to lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Ws2801GenericMethod.h index 01271086e..b3b3ea1c1 100644 --- a/lib/lib_basic/NeoPixelBus-2.6.0/src/internal/Ws2801GenericMethod.h +++ b/lib/lib_basic/NeoPixelBus-2.6.1.4/src/internal/Ws2801GenericMethod.h @@ -42,7 +42,7 @@ public: _wire(pinClock, pinData) { _data = static_cast(malloc(_sizeData)); - memset(_data, 0, _sizeData); + // data cleared later in Begin() } #if !defined(__AVR_ATtiny85__) && !defined(ARDUINO_attiny) @@ -68,6 +68,8 @@ public: void Initialize(int8_t sck, int8_t miso, int8_t mosi, int8_t ss) { _wire.begin(sck, miso, mosi, ss); + + _endTime = micros(); } #endif @@ -123,6 +125,8 @@ typedef Ws2801MethodBase NeoWs2801Method; typedef Ws2801MethodBase> NeoWs2801Spi20MhzMethod; typedef Ws2801MethodBase> NeoWs2801Spi10MhzMethod; typedef Ws2801MethodBase> NeoWs2801Spi2MhzMethod; +typedef Ws2801MethodBase> NeoWs2801Spi1MhzMethod; +typedef Ws2801MethodBase> NeoWs2801Spi500KhzMethod; typedef NeoWs2801Spi10MhzMethod NeoWs2801SpiMethod; #endif diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/.github/ISSUE_TEMPLATE.md b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index f0e26146f..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,46 +0,0 @@ -Thank you for opening an issue on an Adafruit Arduino library repository. To -improve the speed of resolution please review the following guidelines and -common troubleshooting steps below before creating the issue: - -- **Do not use GitHub issues for troubleshooting projects and issues.** Instead use - the forums at http://forums.adafruit.com to ask questions and troubleshoot why - something isn't working as expected. In many cases the problem is a common issue - that you will more quickly receive help from the forum community. GitHub issues - are meant for known defects in the code. If you don't know if there is a defect - in the code then start with troubleshooting on the forum first. - -- **If following a tutorial or guide be sure you didn't miss a step.** Carefully - check all of the steps and commands to run have been followed. Consult the - forum if you're unsure or have questions about steps in a guide/tutorial. - -- **For Arduino projects check these very common issues to ensure they don't apply**: - - - For uploading sketches or communicating with the board make sure you're using - a **USB data cable** and **not** a **USB charge-only cable**. It is sometimes - very hard to tell the difference between a data and charge cable! Try using the - cable with other devices or swapping to another cable to confirm it is not - the problem. - - - **Be sure you are supplying adequate power to the board.** Check the specs of - your board and plug in an external power supply. In many cases just - plugging a board into your computer is not enough to power it and other - peripherals. - - - **Double check all soldering joints and connections.** Flakey connections - cause many mysterious problems. See the [guide to excellent soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools) for examples of good solder joints. - - - **Ensure you are using an official Arduino or Adafruit board.** We can't - guarantee a clone board will have the same functionality and work as expected - with this code and don't support them. - -If you're sure this issue is a defect in the code and checked the steps above -please fill in the following fields to provide enough troubleshooting information. -You may delete the guideline and text above to just leave the following details: - -- Arduino board: **INSERT ARDUINO BOARD NAME/TYPE HERE** - -- Arduino IDE version (found in Arduino -> About Arduino menu): **INSERT ARDUINO - VERSION HERE** - -- List the steps to reproduce the problem below (if possible attach a sketch or - copy the sketch code in too): **LIST REPRO STEPS BELOW** diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/.github/PULL_REQUEST_TEMPLATE.md b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 7b641eb86..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,26 +0,0 @@ -Thank you for creating a pull request to contribute to Adafruit's GitHub code! -Before you open the request please review the following guidelines and tips to -help it be more easily integrated: - -- **Describe the scope of your change--i.e. what the change does and what parts - of the code were modified.** This will help us understand any risks of integrating - the code. - -- **Describe any known limitations with your change.** For example if the change - doesn't apply to a supported platform of the library please mention it. - -- **Please run any tests or examples that can exercise your modified code.** We - strive to not break users of the code and running tests/examples helps with this - process. - -Thank you again for contributing! We will try to test and integrate the change -as soon as we can, but be aware we have many GitHub repositories to manage and -can't immediately respond to every request. There is no need to bump or check in -on a pull request (it will clutter the discussion of the request). - -Also don't be worried if the request is closed or not integrated--sometimes the -priorities of Adafruit's GitHub code (education, ease of use) might not match the -priorities of the pull request. Don't fret, the open source community thrives on -forks and GitHub makes it easy to keep your changes in a forked repo. - -After reviewing the guidelines above you can delete this text from the pull request. diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/.gitignore b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/.gitignore deleted file mode 100644 index c2a26c038..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Our handy .gitignore for automation ease -Doxyfile* -doxygen_sqlite3.db -html diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/.travis.yml b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/.travis.yml deleted file mode 100644 index 3e5672cd6..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -language: c -sudo: false - -cache: - directories: - - ~/arduino_ide - # Caches Arduino IDE + ESP32 platform - - ~/.arduino15/packages/ - # Caches Arduino platforms -git: - depth: false - quiet: true - -# Blacklist -branches: - except: - - gh-pages - -env: - global: - - PRETTYNAME="Adafruit ILI9341 Arduino Library" -# Optional, will default to "$TRAVIS_BUILD_DIR/Doxyfile" -# - DOXYFILE: $TRAVIS_BUILD_DIR/Doxyfile - -before_install: - - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh) - -install: - - arduino --install-library "Adafruit GFX Library","Adafruit STMPE610","Adafruit TouchScreen" - -script: - - build_main_platforms - -# Generate and deploy documentation -after_success: - - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/library_check.sh) - - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/doxy_gen_and_deploy.sh) - diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/Adafruit_ILI9341.cpp b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/Adafruit_ILI9341.cpp deleted file mode 100644 index 442975ada..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/Adafruit_ILI9341.cpp +++ /dev/null @@ -1,282 +0,0 @@ -/*! -* @file Adafruit_ILI9341.cpp -* -* @mainpage Adafruit ILI9341 TFT Displays -* -* @section intro_sec Introduction -* -* This is the documentation for Adafruit's ILI9341 driver for the -* Arduino platform. -* -* This library works with the Adafruit 2.8" Touch Shield V2 (SPI) -* http://www.adafruit.com/products/1651 -* -* Adafruit 2.4" TFT LCD with Touchscreen Breakout w/MicroSD Socket - ILI9341 -* https://www.adafruit.com/product/2478 -* -* 2.8" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket - ILI9341 -* https://www.adafruit.com/product/1770 -* -* 2.2" 18-bit color TFT LCD display with microSD card breakout - ILI9340 -* https://www.adafruit.com/product/1770 -* -* TFT FeatherWing - 2.4" 320x240 Touchscreen For All Feathers -* https://www.adafruit.com/product/3315 -* -* These displays use SPI to communicate, 4 or 5 pins are required -* to interface (RST is optional). -* -* Adafruit invests time and resources providing this open source code, -* please support Adafruit and open-source hardware by purchasing -* products from Adafruit! -* -* @section dependencies Dependencies -* -* This library depends on -* Adafruit_GFX being present on your system. Please make sure you have -* installed the latest version before using this library. -* -* @section author Author -* -* Written by Limor "ladyada" Fried for Adafruit Industries. -* -* @section license License -* -* BSD license, all text here must be included in any redistribution. -* -*/ - -#include "Adafruit_ILI9341.h" -#ifndef ARDUINO_STM32_FEATHER - #include "pins_arduino.h" - #ifndef RASPI - #include "wiring_private.h" - #endif -#endif -#include - -#if defined (ARDUINO_ARCH_ARC32) || defined (ARDUINO_MAXIM) - #define SPI_DEFAULT_FREQ 16000000 -#elif defined (__AVR__) || defined(TEENSYDUINO) - #define SPI_DEFAULT_FREQ 8000000 -#elif defined(ESP8266) || defined(ESP32) - #define SPI_DEFAULT_FREQ 40000000 -#elif defined(RASPI) - #define SPI_DEFAULT_FREQ 80000000 -#elif defined(ARDUINO_ARCH_STM32F1) - #define SPI_DEFAULT_FREQ 36000000 -#else - #define SPI_DEFAULT_FREQ 24000000 ///< Default SPI data clock frequency -#endif - -#define MADCTL_MY 0x80 ///< Bottom to top -#define MADCTL_MX 0x40 ///< Right to left -#define MADCTL_MV 0x20 ///< Reverse Mode -#define MADCTL_ML 0x10 ///< LCD refresh Bottom to top -#define MADCTL_RGB 0x00 ///< Red-Green-Blue pixel order -#define MADCTL_BGR 0x08 ///< Blue-Green-Red pixel order -#define MADCTL_MH 0x04 ///< LCD refresh right to left - -/**************************************************************************/ -/*! - @brief Instantiate Adafruit ILI9341 driver with software SPI - @param cs Chip select pin # - @param dc Data/Command pin # - @param mosi SPI MOSI pin # - @param sclk SPI Clock pin # - @param rst Reset pin # (optional, pass -1 if unused) - @param miso SPI MISO pin # (optional, pass -1 if unused) -*/ -/**************************************************************************/ -Adafruit_ILI9341::Adafruit_ILI9341(int8_t cs, int8_t dc, int8_t mosi, - int8_t sclk, int8_t rst, int8_t miso) : Adafruit_SPITFT(ILI9341_TFTWIDTH, ILI9341_TFTHEIGHT, cs, dc, mosi, sclk, rst, miso) { -} - -/**************************************************************************/ -/*! - @brief Instantiate Adafruit ILI9341 driver with hardware SPI - @param cs Chip select pin # - @param dc Data/Command pin # - @param rst Reset pin # (optional, pass -1 if unused) -*/ -/**************************************************************************/ -Adafruit_ILI9341::Adafruit_ILI9341(int8_t cs, int8_t dc, int8_t rst) : Adafruit_SPITFT(ILI9341_TFTWIDTH, ILI9341_TFTHEIGHT, cs, dc, rst) { -} - -static const uint8_t PROGMEM initcmd[] = { - 0xEF, 3, 0x03, 0x80, 0x02, - 0xCF, 3, 0x00, 0xC1, 0x30, - 0xED, 4, 0x64, 0x03, 0x12, 0x81, - 0xE8, 3, 0x85, 0x00, 0x78, - 0xCB, 5, 0x39, 0x2C, 0x00, 0x34, 0x02, - 0xF7, 1, 0x20, - 0xEA, 2, 0x00, 0x00, - ILI9341_PWCTR1 , 1, 0x23, // Power control VRH[5:0] - ILI9341_PWCTR2 , 1, 0x10, // Power control SAP[2:0];BT[3:0] - ILI9341_VMCTR1 , 2, 0x3e, 0x28, // VCM control - ILI9341_VMCTR2 , 1, 0x86, // VCM control2 - ILI9341_MADCTL , 1, 0x48, // Memory Access Control - ILI9341_VSCRSADD, 1, 0x00, // Vertical scroll zero - ILI9341_PIXFMT , 1, 0x55, - ILI9341_FRMCTR1 , 2, 0x00, 0x18, - ILI9341_DFUNCTR , 3, 0x08, 0x82, 0x27, // Display Function Control - 0xF2, 1, 0x00, // 3Gamma Function Disable - ILI9341_GAMMASET , 1, 0x01, // Gamma curve selected - ILI9341_GMCTRP1 , 15, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, // Set Gamma - 0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03, 0x0E, 0x09, 0x00, - ILI9341_GMCTRN1 , 15, 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, // Set Gamma - 0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C, 0x31, 0x36, 0x0F, - ILI9341_SLPOUT , 0x80, // Exit Sleep - ILI9341_DISPON , 0x80, // Display on - 0x00 // End of list -}; - -/**************************************************************************/ -/*! - @brief Initialize ILI9341 chip - Connects to the ILI9341 over SPI and sends initialization procedure commands - @param freq Desired SPI clock frequency -*/ -/**************************************************************************/ -void Adafruit_ILI9341::begin(uint32_t freq) { - if(!freq) freq = SPI_DEFAULT_FREQ; - _freq = freq; - - initSPI(freq); - - startWrite(); - - uint8_t cmd, x, numArgs; - const uint8_t *addr = initcmd; - while((cmd = pgm_read_byte(addr++)) > 0) { - writeCommand(cmd); - x = pgm_read_byte(addr++); - numArgs = x & 0x7F; - while(numArgs--) spiWrite(pgm_read_byte(addr++)); - if(x & 0x80) delay(120); - } - - endWrite(); - - _width = ILI9341_TFTWIDTH; - _height = ILI9341_TFTHEIGHT; -} - - -/**************************************************************************/ -/*! - @brief Set origin of (0,0) and orientation of TFT display - @param m The index for rotation, from 0-3 inclusive -*/ -/**************************************************************************/ -void Adafruit_ILI9341::setRotation(uint8_t m) { - rotation = m % 4; // can't be higher than 3 - switch (rotation) { - case 0: - m = (MADCTL_MX | MADCTL_BGR); - _width = ILI9341_TFTWIDTH; - _height = ILI9341_TFTHEIGHT; - break; - case 1: - m = (MADCTL_MV | MADCTL_BGR); - _width = ILI9341_TFTHEIGHT; - _height = ILI9341_TFTWIDTH; - break; - case 2: - m = (MADCTL_MY | MADCTL_BGR); - _width = ILI9341_TFTWIDTH; - _height = ILI9341_TFTHEIGHT; - break; - case 3: - m = (MADCTL_MX | MADCTL_MY | MADCTL_MV | MADCTL_BGR); - _width = ILI9341_TFTHEIGHT; - _height = ILI9341_TFTWIDTH; - break; - } - - startWrite(); - writeCommand(ILI9341_MADCTL); - spiWrite(m); - endWrite(); -} - -/**************************************************************************/ -/*! - @brief Enable/Disable display color inversion - @param invert True to invert, False to have normal color -*/ -/**************************************************************************/ -void Adafruit_ILI9341::invertDisplay(boolean invert) { - startWrite(); - writeCommand(invert ? ILI9341_INVON : ILI9341_INVOFF); - endWrite(); -} - -/**************************************************************************/ -/*! - @brief Scroll display memory - @param y How many pixels to scroll display by -*/ -/**************************************************************************/ -void Adafruit_ILI9341::scrollTo(uint16_t y) { - startWrite(); - writeCommand(ILI9341_VSCRSADD); - SPI_WRITE16(y); - endWrite(); -} - -/**************************************************************************/ - -void Adafruit_ILI9341::setScrollMargins(uint16_t top, uint16_t bottom) -{ - uint16_t height = _height - (top + bottom); - - startWrite(); - writeCommand(0x33); - SPI_WRITE16(top); - SPI_WRITE16(height); - SPI_WRITE16(bottom); - endWrite(); -} - -/**************************************************************************/ -/*! - @brief Set the "address window" - the rectangle we will write to RAM with the next chunk of SPI data writes. The ILI9341 will automatically wrap the data as each row is filled - @param x TFT memory 'x' origin - @param y TFT memory 'y' origin - @param w Width of rectangle - @param h Height of rectangle -*/ -/**************************************************************************/ -void Adafruit_ILI9341::setAddrWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h) { - uint32_t xa = ((uint32_t)x << 16) | (x+w-1); - uint32_t ya = ((uint32_t)y << 16) | (y+h-1); - writeCommand(ILI9341_CASET); // Column addr set - SPI_WRITE32(xa); - writeCommand(ILI9341_PASET); // Row addr set - SPI_WRITE32(ya); - writeCommand(ILI9341_RAMWR); // write to RAM -} - -/**************************************************************************/ -/*! - @brief Read 8 bits of data from ILI9341 configuration memory. NOT from RAM! - This is highly undocumented/supported, it's really a hack but kinda works? - @param command The command register to read data from - @param index The byte index into the command to read from - @return Unsigned 8-bit data read from ILI9341 register -*/ -/**************************************************************************/ -uint8_t Adafruit_ILI9341::readcommand8(uint8_t command, uint8_t index) { - uint32_t freq = _freq; - if(_freq > 24000000) _freq = 24000000; - startWrite(); - writeCommand(0xD9); // woo sekret command? - spiWrite(0x10 + index); - writeCommand(command); - uint8_t r = spiRead(); - endWrite(); - _freq = freq; - return r; -} - diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/Adafruit_ILI9341.h b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/Adafruit_ILI9341.h deleted file mode 100644 index 368e1cc0f..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/Adafruit_ILI9341.h +++ /dev/null @@ -1,144 +0,0 @@ -/*! -* @file Adafruit_ILI9341.h -* -* This is the documentation for Adafruit's ILI9341 driver for the -* Arduino platform. -* -* This library works with the Adafruit 2.8" Touch Shield V2 (SPI) -* http://www.adafruit.com/products/1651 -* Adafruit 2.4" TFT LCD with Touchscreen Breakout w/MicroSD Socket - ILI9341 -* https://www.adafruit.com/product/2478 -* 2.8" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket - ILI9341 -* https://www.adafruit.com/product/1770 -* 2.2" 18-bit color TFT LCD display with microSD card breakout - ILI9340 -* https://www.adafruit.com/product/1770 -* TFT FeatherWing - 2.4" 320x240 Touchscreen For All Feathers -* https://www.adafruit.com/product/3315 -* -* These displays use SPI to communicate, 4 or 5 pins are required -* to interface (RST is optional). -* -* Adafruit invests time and resources providing this open source code, -* please support Adafruit and open-source hardware by purchasing -* products from Adafruit! -* -* -* This library depends on -* Adafruit_GFX being present on your system. Please make sure you have -* installed the latest version before using this library. -* -* Written by Limor "ladyada" Fried for Adafruit Industries. -* -* BSD license, all text here must be included in any redistribution. -* -*/ - -#ifndef _ADAFRUIT_ILI9341H_ -#define _ADAFRUIT_ILI9341H_ - -#include "Arduino.h" -#include "Print.h" -#include -#include "Adafruit_GFX.h" -#include -#include - -#define ILI9341_TFTWIDTH 240 ///< ILI9341 max TFT width -#define ILI9341_TFTHEIGHT 320 ///< ILI9341 max TFT height - -#define ILI9341_NOP 0x00 ///< No-op register -#define ILI9341_SWRESET 0x01 ///< Software reset register -#define ILI9341_RDDID 0x04 ///< Read display identification information -#define ILI9341_RDDST 0x09 ///< Read Display Status - -#define ILI9341_SLPIN 0x10 ///< Enter Sleep Mode -#define ILI9341_SLPOUT 0x11 ///< Sleep Out -#define ILI9341_PTLON 0x12 ///< Partial Mode ON -#define ILI9341_NORON 0x13 ///< Normal Display Mode ON - -#define ILI9341_RDMODE 0x0A ///< Read Display Power Mode -#define ILI9341_RDMADCTL 0x0B ///< Read Display MADCTL -#define ILI9341_RDPIXFMT 0x0C ///< Read Display Pixel Format -#define ILI9341_RDIMGFMT 0x0D ///< Read Display Image Format -#define ILI9341_RDSELFDIAG 0x0F ///< Read Display Self-Diagnostic Result - -#define ILI9341_INVOFF 0x20 ///< Display Inversion OFF -#define ILI9341_INVON 0x21 ///< Display Inversion ON -#define ILI9341_GAMMASET 0x26 ///< Gamma Set -#define ILI9341_DISPOFF 0x28 ///< Display OFF -#define ILI9341_DISPON 0x29 ///< Display ON - -#define ILI9341_CASET 0x2A ///< Column Address Set -#define ILI9341_PASET 0x2B ///< Page Address Set -#define ILI9341_RAMWR 0x2C ///< Memory Write -#define ILI9341_RAMRD 0x2E ///< Memory Read - -#define ILI9341_PTLAR 0x30 ///< Partial Area -#define ILI9341_MADCTL 0x36 ///< Memory Access Control -#define ILI9341_VSCRSADD 0x37 ///< Vertical Scrolling Start Address -#define ILI9341_PIXFMT 0x3A ///< COLMOD: Pixel Format Set - -#define ILI9341_FRMCTR1 0xB1 ///< Frame Rate Control (In Normal Mode/Full Colors) -#define ILI9341_FRMCTR2 0xB2 ///< Frame Rate Control (In Idle Mode/8 colors) -#define ILI9341_FRMCTR3 0xB3 ///< Frame Rate control (In Partial Mode/Full Colors) -#define ILI9341_INVCTR 0xB4 ///< Display Inversion Control -#define ILI9341_DFUNCTR 0xB6 ///< Display Function Control - -#define ILI9341_PWCTR1 0xC0 ///< Power Control 1 -#define ILI9341_PWCTR2 0xC1 ///< Power Control 2 -#define ILI9341_PWCTR3 0xC2 ///< Power Control 3 -#define ILI9341_PWCTR4 0xC3 ///< Power Control 4 -#define ILI9341_PWCTR5 0xC4 ///< Power Control 5 -#define ILI9341_VMCTR1 0xC5 ///< VCOM Control 1 -#define ILI9341_VMCTR2 0xC7 ///< VCOM Control 2 - -#define ILI9341_RDID1 0xDA ///< Read ID 1 -#define ILI9341_RDID2 0xDB ///< Read ID 2 -#define ILI9341_RDID3 0xDC ///< Read ID 3 -#define ILI9341_RDID4 0xDD ///< Read ID 4 - -#define ILI9341_GMCTRP1 0xE0 ///< Positive Gamma Correction -#define ILI9341_GMCTRN1 0xE1 ///< Negative Gamma Correction -//#define ILI9341_PWCTR6 0xFC - -// Color definitions -#define ILI9341_BLACK 0x0000 ///< 0, 0, 0 -#define ILI9341_NAVY 0x000F ///< 0, 0, 123 -#define ILI9341_DARKGREEN 0x03E0 ///< 0, 125, 0 -#define ILI9341_DARKCYAN 0x03EF ///< 0, 125, 123 -#define ILI9341_MAROON 0x7800 ///< 123, 0, 0 -#define ILI9341_PURPLE 0x780F ///< 123, 0, 123 -#define ILI9341_OLIVE 0x7BE0 ///< 123, 125, 0 -#define ILI9341_LIGHTGREY 0xC618 ///< 198, 195, 198 -#define ILI9341_DARKGREY 0x7BEF ///< 123, 125, 123 -#define ILI9341_BLUE 0x001F ///< 0, 0, 255 -#define ILI9341_GREEN 0x07E0 ///< 0, 255, 0 -#define ILI9341_CYAN 0x07FF ///< 0, 255, 255 -#define ILI9341_RED 0xF800 ///< 255, 0, 0 -#define ILI9341_MAGENTA 0xF81F ///< 255, 0, 255 -#define ILI9341_YELLOW 0xFFE0 ///< 255, 255, 0 -#define ILI9341_WHITE 0xFFFF ///< 255, 255, 255 -#define ILI9341_ORANGE 0xFD20 ///< 255, 165, 0 -#define ILI9341_GREENYELLOW 0xAFE5 ///< 173, 255, 41 -#define ILI9341_PINK 0xFC18 ///< 255, 130, 198 - -///< Class to manage hardware interface with ILI9341 chipset (also seems to work with ILI9340) -class Adafruit_ILI9341 : public Adafruit_SPITFT { - public: - Adafruit_ILI9341(int8_t _CS, int8_t _DC, int8_t _MOSI, int8_t _SCLK, int8_t _RST = -1, int8_t _MISO = -1); - Adafruit_ILI9341(int8_t _CS, int8_t _DC, int8_t _RST = -1); - - void begin(uint32_t freq=0); - void setRotation(uint8_t r); - void invertDisplay(boolean i); - void scrollTo(uint16_t y); - - void setScrollMargins(uint16_t top, uint16_t bottom); - - // Transaction API not used by GFX - void setAddrWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h); - - uint8_t readcommand8(uint8_t reg, uint8_t index=0); -}; - -#endif // _ADAFRUIT_ILI9341H_ diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/README.md b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/README.md deleted file mode 100644 index b08f63086..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Adafruit ILI9341 Arduino Library [![Build Status](https://travis-ci.org/adafruit/Adafruit_ILI9341.svg?branch=master)](https://travis-ci.org/adafruit/Adafruit_ILI9341) - -This is a library for the Adafruit ILI9341 display products - -This library works with the Adafruit 2.8" Touch Shield V2 (SPI) - * http://www.adafruit.com/products/1651 - -Adafruit 2.4" TFT LCD with Touchscreen Breakout w/MicroSD Socket - ILI9341 - * https://www.adafruit.com/product/2478 - -2.8" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket - ILI9341 - * https://www.adafruit.com/product/1770 - -2.2" 18-bit color TFT LCD display with microSD card breakout - ILI9340 - * https://www.adafruit.com/product/1480 - -TFT FeatherWing - 2.4" 320x240 Touchscreen For All Feathers - * https://www.adafruit.com/product/3315 - -Check out the links above for our tutorials and wiring diagrams. -These displays use SPI to communicate, 4 or 5 pins are required -to interface (RST is optional). - -Adafruit invests time and resources providing this open source code, -please support Adafruit and open-source hardware by purchasing -products from Adafruit! - -Written by Limor Fried/Ladyada for Adafruit Industries. -MIT license, all text above must be included in any redistribution - -To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_ILI9341. Check that the Adafruit_ILI9341 folder contains Adafruit_ILI9341.cpp and Adafruit_ILI9341. - -Place the Adafruit_ILI9341 library folder your arduinosketchfolder/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE - -Also requires the Adafruit_GFX library for Arduino. diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/breakouttouchpaint/.esp8266.test.skip b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/breakouttouchpaint/.esp8266.test.skip deleted file mode 100644 index e69de29bb..000000000 diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/breakouttouchpaint/breakouttouchpaint.ino b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/breakouttouchpaint/breakouttouchpaint.ino deleted file mode 100644 index 298bcad6b..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/breakouttouchpaint/breakouttouchpaint.ino +++ /dev/null @@ -1,145 +0,0 @@ -/*************************************************** - This is our touchscreen painting example for the Adafruit ILI9341 Breakout - ----> http://www.adafruit.com/products/1770 - - Check out the links above for our tutorials and wiring diagrams - These displays use SPI to communicate, 4 or 5 pins are required to - interface (RST is optional) - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing - products from Adafruit! - - Written by Limor Fried/Ladyada for Adafruit Industries. - MIT license, all text above must be included in any redistribution - ****************************************************/ - -/** NOT FOR USE WITH THE TOUCH SHIELD, ONLY FOR THE BREAKOUT! **/ - -#include // Core graphics library -#include -#include -#include "TouchScreen.h" - -// These are the four touchscreen analog pins -#define YP A2 // must be an analog pin, use "An" notation! -#define XM A3 // must be an analog pin, use "An" notation! -#define YM 5 // can be a digital pin -#define XP 4 // can be a digital pin - -// This is calibration data for the raw touch data to the screen coordinates -#define TS_MINX 150 -#define TS_MINY 120 -#define TS_MAXX 920 -#define TS_MAXY 940 - -#define MINPRESSURE 10 -#define MAXPRESSURE 1000 - -// The display uses hardware SPI, plus #9 & #10 -#define TFT_CS 10 -#define TFT_DC 9 -Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC); - -// For better pressure precision, we need to know the resistance -// between X+ and X- Use any multimeter to read it -// For the one we're using, its 300 ohms across the X plate -TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300); - -// Size of the color selection boxes and the paintbrush size -#define BOXSIZE 40 -#define PENRADIUS 3 -int oldcolor, currentcolor; - -void setup(void) { - // while (!Serial); // used for leonardo debugging - - Serial.begin(9600); - Serial.println(F("Touch Paint!")); - - tft.begin(); - tft.fillScreen(ILI9341_BLACK); - - // make the color selection boxes - tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED); - tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW); - tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN); - tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN); - tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE); - tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA); - - // select the current color 'red' - tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - currentcolor = ILI9341_RED; -} - - -void loop() -{ - // Retrieve a point - TSPoint p = ts.getPoint(); - - /* - Serial.print("X = "); Serial.print(p.x); - Serial.print("\tY = "); Serial.print(p.y); - Serial.print("\tPressure = "); Serial.println(p.z); - */ - - // we have some minimum pressure we consider 'valid' - // pressure of 0 means no pressing! - if (p.z < MINPRESSURE || p.z > MAXPRESSURE) { - return; - } - - // Scale from ~0->1000 to tft.width using the calibration #'s - p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width()); - p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height()); - - /* - Serial.print("("); Serial.print(p.x); - Serial.print(", "); Serial.print(p.y); - Serial.println(")"); - */ - - - if (p.y < BOXSIZE) { - oldcolor = currentcolor; - - if (p.x < BOXSIZE) { - currentcolor = ILI9341_RED; - tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*2) { - currentcolor = ILI9341_YELLOW; - tft.drawRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*3) { - currentcolor = ILI9341_GREEN; - tft.drawRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*4) { - currentcolor = ILI9341_CYAN; - tft.drawRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*5) { - currentcolor = ILI9341_BLUE; - tft.drawRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*6) { - currentcolor = ILI9341_MAGENTA; - tft.drawRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } - - if (oldcolor != currentcolor) { - if (oldcolor == ILI9341_RED) - tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED); - if (oldcolor == ILI9341_YELLOW) - tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW); - if (oldcolor == ILI9341_GREEN) - tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN); - if (oldcolor == ILI9341_CYAN) - tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN); - if (oldcolor == ILI9341_BLUE) - tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE); - if (oldcolor == ILI9341_MAGENTA) - tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA); - } - } - if (((p.y-PENRADIUS) > BOXSIZE) && ((p.y+PENRADIUS) < tft.height())) { - tft.fillCircle(p.x, p.y, PENRADIUS, currentcolor); - } -} diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/fulltest_featherwing/.mega2560.test.skip b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/fulltest_featherwing/.mega2560.test.skip deleted file mode 100644 index e69de29bb..000000000 diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/fulltest_featherwing/fulltest_featherwing.ino b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/fulltest_featherwing/fulltest_featherwing.ino deleted file mode 100644 index 25f32f2e6..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/fulltest_featherwing/fulltest_featherwing.ino +++ /dev/null @@ -1,265 +0,0 @@ -/*************************************************** - This is our touchscreen painting example for the Adafruit TFT FeatherWing - ----> http://www.adafruit.com/products/3315 - - Check out the links above for our tutorials and wiring diagrams - - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing - products from Adafruit! - - Written by Limor Fried/Ladyada for Adafruit Industries. - MIT license, all text above must be included in any redistribution - ****************************************************/ - -#include -#include // this is needed even tho we aren't using it - -#include // Core graphics library -#include // Hardware-specific library -#include -#include - -#ifdef ESP8266 - #define STMPE_CS 16 - #define TFT_CS 0 - #define TFT_DC 15 - #define SD_CS 2 -#endif -#ifdef ESP32 - #define STMPE_CS 32 - #define TFT_CS 15 - #define TFT_DC 33 - #define SD_CS 14 -#endif -#ifdef TEENSYDUINO - #define TFT_DC 10 - #define TFT_CS 4 - #define STMPE_CS 3 - #define SD_CS 8 -#endif -#ifdef ARDUINO_STM32_FEATHER - #define TFT_DC PB4 - #define TFT_CS PA15 - #define STMPE_CS PC7 - #define SD_CS PC5 -#endif -#ifdef ARDUINO_NRF52_FEATHER /* BSP 0.6.5 and higher! */ - #define TFT_DC 11 - #define TFT_CS 31 - #define STMPE_CS 30 - #define SD_CS 27 -#endif -#if defined(ARDUINO_MAX32620FTHR) || defined(ARDUINO_MAX32630FTHR) - #define TFT_DC P5_4 - #define TFT_CS P5_3 - #define STMPE_CS P3_3 - #define SD_CS P3_2 -#endif - -// Anything else! -#if defined (__AVR_ATmega32U4__) || defined(ARDUINO_SAMD_FEATHER_M0) || defined (__AVR_ATmega328P__) || defined(ARDUINO_SAMD_ZERO) || defined(__SAMD51__) || defined(__SAM3X8E__) - #define STMPE_CS 6 - #define TFT_CS 9 - #define TFT_DC 10 - #define SD_CS 5 -#endif - -Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC); -Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS); - - -// This is calibration data for the raw touch data to the screen coordinates -#define TS_MINX 3800 -#define TS_MAXX 100 -#define TS_MINY 100 -#define TS_MAXY 3750 - -#define PENRADIUS 3 - -void setup(void) { - Serial.begin(115200); - - delay(10); - Serial.println("FeatherWing TFT"); - if (!ts.begin()) { - Serial.println("Couldn't start touchscreen controller"); - while (1); - } - Serial.println("Touchscreen started"); - - tft.begin(); - tft.fillScreen(ILI9341_BLUE); - - yield(); - - Serial.print("Initializing SD card..."); - if (!SD.begin(SD_CS)) { - Serial.println("failed!"); - } - Serial.println("OK!"); - - bmpDraw("purple.bmp", 0, 0); -} - -void loop() { - // Retrieve a point - TS_Point p = ts.getPoint(); - - Serial.print("X = "); Serial.print(p.x); - Serial.print("\tY = "); Serial.print(p.y); - Serial.print("\tPressure = "); Serial.println(p.z); - - // Scale from ~0->4000 to tft.width using the calibration #'s - p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width()); - p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height()); - - if (((p.y-PENRADIUS) > 0) && ((p.y+PENRADIUS) < tft.height())) { - tft.fillCircle(p.x, p.y, PENRADIUS, ILI9341_RED); - } -} - -// This function opens a Windows Bitmap (BMP) file and -// displays it at the given coordinates. It's sped up -// by reading many pixels worth of data at a time -// (rather than pixel by pixel). Increasing the buffer -// size takes more of the Arduino's precious RAM but -// makes loading a little faster. 20 pixels seems a -// good balance. - -#define BUFFPIXEL 20 - -void bmpDraw(char *filename, int16_t x, int16_t y) { - - File bmpFile; - int bmpWidth, bmpHeight; // W+H in pixels - uint8_t bmpDepth; // Bit depth (currently must be 24) - uint32_t bmpImageoffset; // Start of image data in file - uint32_t rowSize; // Not always = bmpWidth; may have padding - uint8_t sdbuffer[3*BUFFPIXEL]; // pixel buffer (R+G+B per pixel) - uint8_t buffidx = sizeof(sdbuffer); // Current position in sdbuffer - boolean goodBmp = false; // Set to true on valid header parse - boolean flip = true; // BMP is stored bottom-to-top - int w, h, row, col; - uint8_t r, g, b; - uint32_t pos = 0, startTime = millis(); - - if((x >= tft.width()) || (y >= tft.height())) return; - - Serial.println(); - Serial.print(F("Loading image '")); - Serial.print(filename); - Serial.println('\''); - - // Open requested file on SD card - if ((bmpFile = SD.open(filename)) == NULL) { - Serial.print(F("File not found")); - return; - } - - // Parse BMP header - if(read16(bmpFile) == 0x4D42) { // BMP signature - Serial.print(F("File size: ")); Serial.println(read32(bmpFile)); - (void)read32(bmpFile); // Read & ignore creator bytes - bmpImageoffset = read32(bmpFile); // Start of image data - Serial.print(F("Image Offset: ")); Serial.println(bmpImageoffset, DEC); - // Read DIB header - Serial.print(F("Header size: ")); Serial.println(read32(bmpFile)); - bmpWidth = read32(bmpFile); - bmpHeight = read32(bmpFile); - if(read16(bmpFile) == 1) { // # planes -- must be '1' - bmpDepth = read16(bmpFile); // bits per pixel - Serial.print(F("Bit Depth: ")); Serial.println(bmpDepth); - if((bmpDepth == 24) && (read32(bmpFile) == 0)) { // 0 = uncompressed - - goodBmp = true; // Supported BMP format -- proceed! - Serial.print(F("Image size: ")); - Serial.print(bmpWidth); - Serial.print('x'); - Serial.println(bmpHeight); - - // BMP rows are padded (if needed) to 4-byte boundary - rowSize = (bmpWidth * 3 + 3) & ~3; - - // If bmpHeight is negative, image is in top-down order. - // This is not canon but has been observed in the wild. - if(bmpHeight < 0) { - bmpHeight = -bmpHeight; - flip = false; - } - - // Crop area to be loaded - w = bmpWidth; - h = bmpHeight; - if((x+w-1) >= tft.width()) w = tft.width() - x; - if((y+h-1) >= tft.height()) h = tft.height() - y; - - // Set TFT address window to clipped image bounds - tft.startWrite(); - tft.setAddrWindow(x, y, w, h); - - for (row=0; row= sizeof(sdbuffer)) { // Indeed - tft.endWrite(); - bmpFile.read(sdbuffer, sizeof(sdbuffer)); - tft.startWrite(); - buffidx = 0; // Set index to beginning - } - - // Convert pixel from BMP to TFT format, push to display - b = sdbuffer[buffidx++]; - g = sdbuffer[buffidx++]; - r = sdbuffer[buffidx++]; - tft.pushColor(tft.color565(r,g,b)); - } // end pixel - tft.endWrite(); - } // end scanline - Serial.print(F("Loaded in ")); - Serial.print(millis() - startTime); - Serial.println(" ms"); - } // end goodBmp - } - } - - bmpFile.close(); - if(!goodBmp) Serial.println(F("BMP format not recognized.")); -} - -// These read 16- and 32-bit types from the SD card file. -// BMP data is stored little-endian, Arduino is little-endian too. -// May need to reverse subscript order if porting elsewhere. - -uint16_t read16(File &f) { - uint16_t result; - ((uint8_t *)&result)[0] = f.read(); // LSB - ((uint8_t *)&result)[1] = f.read(); // MSB - return result; -} - -uint32_t read32(File &f) { - uint32_t result; - ((uint8_t *)&result)[0] = f.read(); // LSB - ((uint8_t *)&result)[1] = f.read(); - ((uint8_t *)&result)[2] = f.read(); - ((uint8_t *)&result)[3] = f.read(); // MSB - return result; -} diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/graphicstest/graphicstest.ino b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/graphicstest/graphicstest.ino deleted file mode 100644 index 3154d4095..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/graphicstest/graphicstest.ino +++ /dev/null @@ -1,365 +0,0 @@ -/*************************************************** - This is our GFX example for the Adafruit ILI9341 Breakout and Shield - ----> http://www.adafruit.com/products/1651 - - Check out the links above for our tutorials and wiring diagrams - These displays use SPI to communicate, 4 or 5 pins are required to - interface (RST is optional) - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing - products from Adafruit! - - Written by Limor Fried/Ladyada for Adafruit Industries. - MIT license, all text above must be included in any redistribution - ****************************************************/ - - -#include "SPI.h" -#include "Adafruit_GFX.h" -#include "Adafruit_ILI9341.h" - -// For the Adafruit shield, these are the default. -#define TFT_DC 9 -#define TFT_CS 10 - -// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC -Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC); -// If using the breakout, change pins as desired -//Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO); - -void setup() { - Serial.begin(9600); - Serial.println("ILI9341 Test!"); - - tft.begin(); - - // read diagnostics (optional but can help debug problems) - uint8_t x = tft.readcommand8(ILI9341_RDMODE); - Serial.print("Display Power Mode: 0x"); Serial.println(x, HEX); - x = tft.readcommand8(ILI9341_RDMADCTL); - Serial.print("MADCTL Mode: 0x"); Serial.println(x, HEX); - x = tft.readcommand8(ILI9341_RDPIXFMT); - Serial.print("Pixel Format: 0x"); Serial.println(x, HEX); - x = tft.readcommand8(ILI9341_RDIMGFMT); - Serial.print("Image Format: 0x"); Serial.println(x, HEX); - x = tft.readcommand8(ILI9341_RDSELFDIAG); - Serial.print("Self Diagnostic: 0x"); Serial.println(x, HEX); - - Serial.println(F("Benchmark Time (microseconds)")); - delay(10); - Serial.print(F("Screen fill ")); - Serial.println(testFillScreen()); - delay(500); - - Serial.print(F("Text ")); - Serial.println(testText()); - delay(3000); - - Serial.print(F("Lines ")); - Serial.println(testLines(ILI9341_CYAN)); - delay(500); - - Serial.print(F("Horiz/Vert Lines ")); - Serial.println(testFastLines(ILI9341_RED, ILI9341_BLUE)); - delay(500); - - Serial.print(F("Rectangles (outline) ")); - Serial.println(testRects(ILI9341_GREEN)); - delay(500); - - Serial.print(F("Rectangles (filled) ")); - Serial.println(testFilledRects(ILI9341_YELLOW, ILI9341_MAGENTA)); - delay(500); - - Serial.print(F("Circles (filled) ")); - Serial.println(testFilledCircles(10, ILI9341_MAGENTA)); - - Serial.print(F("Circles (outline) ")); - Serial.println(testCircles(10, ILI9341_WHITE)); - delay(500); - - Serial.print(F("Triangles (outline) ")); - Serial.println(testTriangles()); - delay(500); - - Serial.print(F("Triangles (filled) ")); - Serial.println(testFilledTriangles()); - delay(500); - - Serial.print(F("Rounded rects (outline) ")); - Serial.println(testRoundRects()); - delay(500); - - Serial.print(F("Rounded rects (filled) ")); - Serial.println(testFilledRoundRects()); - delay(500); - - Serial.println(F("Done!")); - -} - - -void loop(void) { - for(uint8_t rotation=0; rotation<4; rotation++) { - tft.setRotation(rotation); - testText(); - delay(1000); - } -} - -unsigned long testFillScreen() { - unsigned long start = micros(); - tft.fillScreen(ILI9341_BLACK); - yield(); - tft.fillScreen(ILI9341_RED); - yield(); - tft.fillScreen(ILI9341_GREEN); - yield(); - tft.fillScreen(ILI9341_BLUE); - yield(); - tft.fillScreen(ILI9341_BLACK); - yield(); - return micros() - start; -} - -unsigned long testText() { - tft.fillScreen(ILI9341_BLACK); - unsigned long start = micros(); - tft.setCursor(0, 0); - tft.setTextColor(ILI9341_WHITE); tft.setTextSize(1); - tft.println("Hello World!"); - tft.setTextColor(ILI9341_YELLOW); tft.setTextSize(2); - tft.println(1234.56); - tft.setTextColor(ILI9341_RED); tft.setTextSize(3); - tft.println(0xDEADBEEF, HEX); - tft.println(); - tft.setTextColor(ILI9341_GREEN); - tft.setTextSize(5); - tft.println("Groop"); - tft.setTextSize(2); - tft.println("I implore thee,"); - tft.setTextSize(1); - tft.println("my foonting turlingdromes."); - tft.println("And hooptiously drangle me"); - tft.println("with crinkly bindlewurdles,"); - tft.println("Or I will rend thee"); - tft.println("in the gobberwarts"); - tft.println("with my blurglecruncheon,"); - tft.println("see if I don't!"); - return micros() - start; -} - -unsigned long testLines(uint16_t color) { - unsigned long start, t; - int x1, y1, x2, y2, - w = tft.width(), - h = tft.height(); - - tft.fillScreen(ILI9341_BLACK); - yield(); - - x1 = y1 = 0; - y2 = h - 1; - start = micros(); - for(x2=0; x20; i-=6) { - i2 = i / 2; - start = micros(); - tft.fillRect(cx-i2, cy-i2, i, i, color1); - t += micros() - start; - // Outlines are not included in timing results - tft.drawRect(cx-i2, cy-i2, i, i, color2); - yield(); - } - - return t; -} - -unsigned long testFilledCircles(uint8_t radius, uint16_t color) { - unsigned long start; - int x, y, w = tft.width(), h = tft.height(), r2 = radius * 2; - - tft.fillScreen(ILI9341_BLACK); - start = micros(); - for(x=radius; x10; i-=5) { - start = micros(); - tft.fillTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i, - tft.color565(0, i*10, i*10)); - t += micros() - start; - tft.drawTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i, - tft.color565(i*10, i*10, 0)); - yield(); - } - - return t; -} - -unsigned long testRoundRects() { - unsigned long start; - int w, i, i2, - cx = tft.width() / 2 - 1, - cy = tft.height() / 2 - 1; - - tft.fillScreen(ILI9341_BLACK); - w = min(tft.width(), tft.height()); - start = micros(); - for(i=0; i20; i-=6) { - i2 = i / 2; - tft.fillRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(0, i, 0)); - yield(); - } - - return micros() - start; -} \ No newline at end of file diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/graphicstest_featherwing/.mega2560.test.skip b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/graphicstest_featherwing/.mega2560.test.skip deleted file mode 100644 index e69de29bb..000000000 diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/graphicstest_featherwing/graphicstest_featherwing.ino b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/graphicstest_featherwing/graphicstest_featherwing.ino deleted file mode 100644 index 2a108d29c..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/graphicstest_featherwing/graphicstest_featherwing.ino +++ /dev/null @@ -1,404 +0,0 @@ -/*************************************************** - This is our GFX example for the Adafruit ILI9341 TFT FeatherWing - ----> http://www.adafruit.com/products/3315 - - Check out the links above for our tutorials and wiring diagrams - - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing - products from Adafruit! - - Written by Limor Fried/Ladyada for Adafruit Industries. - MIT license, all text above must be included in any redistribution - ****************************************************/ - -#include -#include -#include - -#ifdef ESP8266 - #define STMPE_CS 16 - #define TFT_CS 0 - #define TFT_DC 15 - #define SD_CS 2 -#endif -#ifdef ESP32 - #define STMPE_CS 32 - #define TFT_CS 15 - #define TFT_DC 33 - #define SD_CS 14 -#endif -#ifdef TEENSYDUINO - #define TFT_DC 10 - #define TFT_CS 4 - #define STMPE_CS 3 - #define SD_CS 8 -#endif -#ifdef ARDUINO_STM32_FEATHER - #define TFT_DC PB4 - #define TFT_CS PA15 - #define STMPE_CS PC7 - #define SD_CS PC5 -#endif -#ifdef ARDUINO_NRF52_FEATHER /* BSP 0.6.5 and higher! */ - #define TFT_DC 11 - #define TFT_CS 31 - #define STMPE_CS 30 - #define SD_CS 27 -#endif -#if defined(ARDUINO_MAX32620FTHR) || defined(ARDUINO_MAX32630FTHR) - #define TFT_DC P5_4 - #define TFT_CS P5_3 - #define STMPE_CS P3_3 - #define SD_CS P3_2 -#endif - -// Anything else! -#if defined (__AVR_ATmega32U4__) || defined(ARDUINO_SAMD_FEATHER_M0) || defined (__AVR_ATmega328P__) || defined(ARDUINO_SAMD_ZERO) || defined(__SAMD51__) || defined(__SAM3X8E__) - #define STMPE_CS 6 - #define TFT_CS 9 - #define TFT_DC 10 - #define SD_CS 5 -#endif - - -Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC); - -void setup() { - Serial.begin(115200); - - delay(10); - Serial.println("FeatherWing TFT Test!"); - - tft.begin(); - - // read diagnostics (optional but can help debug problems) - uint8_t x = tft.readcommand8(ILI9341_RDMODE); - Serial.print("Display Power Mode: 0x"); Serial.println(x, HEX); - x = tft.readcommand8(ILI9341_RDMADCTL); - Serial.print("MADCTL Mode: 0x"); Serial.println(x, HEX); - x = tft.readcommand8(ILI9341_RDPIXFMT); - Serial.print("Pixel Format: 0x"); Serial.println(x, HEX); - x = tft.readcommand8(ILI9341_RDIMGFMT); - Serial.print("Image Format: 0x"); Serial.println(x, HEX); - x = tft.readcommand8(ILI9341_RDSELFDIAG); - Serial.print("Self Diagnostic: 0x"); Serial.println(x, HEX); - - Serial.println(F("Benchmark Time (microseconds)")); - delay(10); - Serial.print(F("Screen fill ")); - Serial.println(testFillScreen()); - delay(500); - - Serial.print(F("Text ")); - Serial.println(testText()); - delay(3000); - - Serial.print(F("Lines ")); - Serial.println(testLines(ILI9341_CYAN)); - delay(500); - - Serial.print(F("Horiz/Vert Lines ")); - Serial.println(testFastLines(ILI9341_RED, ILI9341_BLUE)); - delay(500); - - Serial.print(F("Rectangles (outline) ")); - Serial.println(testRects(ILI9341_GREEN)); - delay(500); - - Serial.print(F("Rectangles (filled) ")); - Serial.println(testFilledRects(ILI9341_YELLOW, ILI9341_MAGENTA)); - delay(500); - - Serial.print(F("Circles (filled) ")); - Serial.println(testFilledCircles(10, ILI9341_MAGENTA)); - - Serial.print(F("Circles (outline) ")); - Serial.println(testCircles(10, ILI9341_WHITE)); - delay(500); - - Serial.print(F("Triangles (outline) ")); - Serial.println(testTriangles()); - delay(500); - - Serial.print(F("Triangles (filled) ")); - Serial.println(testFilledTriangles()); - delay(500); - - Serial.print(F("Rounded rects (outline) ")); - Serial.println(testRoundRects()); - delay(500); - - Serial.print(F("Rounded rects (filled) ")); - Serial.println(testFilledRoundRects()); - delay(500); - - Serial.println(F("Done!")); - -} - - -void loop(void) { - for(uint8_t rotation=0; rotation<4; rotation++) { - tft.setRotation(rotation); - testText(); - delay(1000); - } -} - -unsigned long testFillScreen() { - unsigned long start = micros(); - tft.fillScreen(ILI9341_BLACK); - yield(); - tft.fillScreen(ILI9341_RED); - yield(); - tft.fillScreen(ILI9341_GREEN); - yield(); - tft.fillScreen(ILI9341_BLUE); - yield(); - tft.fillScreen(ILI9341_BLACK); - yield(); - return micros() - start; -} - -unsigned long testText() { - tft.fillScreen(ILI9341_BLACK); - unsigned long start = micros(); - tft.setCursor(0, 0); - tft.setTextColor(ILI9341_WHITE); tft.setTextSize(1); - tft.println("Hello World!"); - tft.setTextColor(ILI9341_YELLOW); tft.setTextSize(2); - tft.println(1234.56); - tft.setTextColor(ILI9341_RED); tft.setTextSize(3); - tft.println(0xDEADBEEF, HEX); - tft.println(); - tft.setTextColor(ILI9341_GREEN); - tft.setTextSize(5); - tft.println("Groop"); - tft.setTextSize(2); - tft.println("I implore thee,"); - tft.setTextSize(1); - tft.println("my foonting turlingdromes."); - tft.println("And hooptiously drangle me"); - tft.println("with crinkly bindlewurdles,"); - tft.println("Or I will rend thee"); - tft.println("in the gobberwarts"); - tft.println("with my blurglecruncheon,"); - tft.println("see if I don't!"); - return micros() - start; -} - -unsigned long testLines(uint16_t color) { - unsigned long start, t; - int x1, y1, x2, y2, - w = tft.width(), - h = tft.height(); - - tft.fillScreen(ILI9341_BLACK); - yield(); - - x1 = y1 = 0; - y2 = h - 1; - start = micros(); - for(x2=0; x20; i-=6) { - i2 = i / 2; - start = micros(); - tft.fillRect(cx-i2, cy-i2, i, i, color1); - t += micros() - start; - // Outlines are not included in timing results - tft.drawRect(cx-i2, cy-i2, i, i, color2); - yield(); - } - - return t; -} - -unsigned long testFilledCircles(uint8_t radius, uint16_t color) { - unsigned long start; - int x, y, w = tft.width(), h = tft.height(), r2 = radius * 2; - - tft.fillScreen(ILI9341_BLACK); - start = micros(); - for(x=radius; x10; i-=5) { - start = micros(); - tft.fillTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i, - tft.color565(0, i*10, i*10)); - t += micros() - start; - tft.drawTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i, - tft.color565(i*10, i*10, 0)); - yield(); - } - - return t; -} - -unsigned long testRoundRects() { - unsigned long start; - int w, i, i2, - cx = tft.width() / 2 - 1, - cy = tft.height() / 2 - 1; - - tft.fillScreen(ILI9341_BLACK); - w = min(tft.width(), tft.height()); - start = micros(); - for(i=0; i20; i-=6) { - i2 = i / 2; - tft.fillRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(0, i, 0)); - yield(); - } - - return micros() - start; -} diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/onoffbutton/onoffbutton.ino b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/onoffbutton/onoffbutton.ino deleted file mode 100644 index 3365d3385..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/onoffbutton/onoffbutton.ino +++ /dev/null @@ -1,125 +0,0 @@ -//This example implements a simple sliding On/Off button. The example -// demonstrates drawing and touch operations. -// -//Thanks to Adafruit forums member Asteroid for the original sketch! -// -#include -#include -#include -#include -#include - -// This is calibration data for the raw touch data to the screen coordinates -#define TS_MINX 150 -#define TS_MINY 130 -#define TS_MAXX 3800 -#define TS_MAXY 4000 - -#define STMPE_CS 8 -Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS); -#define TFT_CS 10 -#define TFT_DC 9 -Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC); - -boolean RecordOn = false; - -#define FRAME_X 210 -#define FRAME_Y 180 -#define FRAME_W 100 -#define FRAME_H 50 - -#define REDBUTTON_X FRAME_X -#define REDBUTTON_Y FRAME_Y -#define REDBUTTON_W (FRAME_W/2) -#define REDBUTTON_H FRAME_H - -#define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W) -#define GREENBUTTON_Y FRAME_Y -#define GREENBUTTON_W (FRAME_W/2) -#define GREENBUTTON_H FRAME_H - -void drawFrame() -{ - tft.drawRect(FRAME_X, FRAME_Y, FRAME_W, FRAME_H, ILI9341_BLACK); -} - -void redBtn() -{ - tft.fillRect(REDBUTTON_X, REDBUTTON_Y, REDBUTTON_W, REDBUTTON_H, ILI9341_RED); - tft.fillRect(GREENBUTTON_X, GREENBUTTON_Y, GREENBUTTON_W, GREENBUTTON_H, ILI9341_BLUE); - drawFrame(); - tft.setCursor(GREENBUTTON_X + 6 , GREENBUTTON_Y + (GREENBUTTON_H/2)); - tft.setTextColor(ILI9341_WHITE); - tft.setTextSize(2); - tft.println("ON"); - RecordOn = false; -} - -void greenBtn() -{ - tft.fillRect(GREENBUTTON_X, GREENBUTTON_Y, GREENBUTTON_W, GREENBUTTON_H, ILI9341_GREEN); - tft.fillRect(REDBUTTON_X, REDBUTTON_Y, REDBUTTON_W, REDBUTTON_H, ILI9341_BLUE); - drawFrame(); - tft.setCursor(REDBUTTON_X + 6 , REDBUTTON_Y + (REDBUTTON_H/2)); - tft.setTextColor(ILI9341_WHITE); - tft.setTextSize(2); - tft.println("OFF"); - RecordOn = true; -} - -void setup(void) -{ - Serial.begin(9600); - tft.begin(); - if (!ts.begin()) { - Serial.println("Unable to start touchscreen."); - } - else { - Serial.println("Touchscreen started."); - } - - tft.fillScreen(ILI9341_BLUE); - // origin = left,top landscape (USB left upper) - tft.setRotation(1); - redBtn(); -} - -void loop() -{ - // See if there's any touch data for us - if (!ts.bufferEmpty()) - { - // Retrieve a point - TS_Point p = ts.getPoint(); - // Scale using the calibration #'s - // and rotate coordinate system - p.x = map(p.x, TS_MINY, TS_MAXY, 0, tft.height()); - p.y = map(p.y, TS_MINX, TS_MAXX, 0, tft.width()); - int y = tft.height() - p.x; - int x = p.y; - - if (RecordOn) - { - if((x > REDBUTTON_X) && (x < (REDBUTTON_X + REDBUTTON_W))) { - if ((y > REDBUTTON_Y) && (y <= (REDBUTTON_Y + REDBUTTON_H))) { - Serial.println("Red btn hit"); - redBtn(); - } - } - } - else //Record is off (RecordOn == false) - { - if((x > GREENBUTTON_X) && (x < (GREENBUTTON_X + GREENBUTTON_W))) { - if ((y > GREENBUTTON_Y) && (y <= (GREENBUTTON_Y + GREENBUTTON_H))) { - Serial.println("Green btn hit"); - greenBtn(); - } - } - } - - Serial.println(RecordOn); - } -} - - - diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/onoffbutton_breakout/.esp8266.test.skip b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/onoffbutton_breakout/.esp8266.test.skip deleted file mode 100644 index e69de29bb..000000000 diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/onoffbutton_breakout/onoffbutton_breakout.ino b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/onoffbutton_breakout/onoffbutton_breakout.ino deleted file mode 100644 index aa8cb9992..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/onoffbutton_breakout/onoffbutton_breakout.ino +++ /dev/null @@ -1,133 +0,0 @@ -//This example implements a simple sliding On/Off button. The example -// demonstrates drawing and touch operations. -// -//Thanks to Adafruit forums member Asteroid for the original sketch! -// -#include -#include -#include -#include -#include - -//Touchscreen X+ X- Y+ Y- pins -#define YP A3 // must be an analog pin, use "An" notation! -#define XM A2 // must be an analog pin, use "An" notation! -#define YM 5 // can be a digital pin -#define XP 4 // can be a digital pin - -// This is calibration data for the raw touch data to the screen coordinates -#define TS_MINX 150 -#define TS_MINY 120 -#define TS_MAXX 920 -#define TS_MAXY 940 - -#define MINPRESSURE 10 -#define MAXPRESSURE 1000 - -// For better pressure precision, we need to know the resistance -// between X+ and X- Use any multimeter to read it -// For the one we're using, its 300 ohms across the X plate -TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300); - - -#define TFT_CS 10 -#define TFT_DC 9 -Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC); - -boolean RecordOn = false; - -#define FRAME_X 210 -#define FRAME_Y 180 -#define FRAME_W 100 -#define FRAME_H 50 - -#define REDBUTTON_X FRAME_X -#define REDBUTTON_Y FRAME_Y -#define REDBUTTON_W (FRAME_W/2) -#define REDBUTTON_H FRAME_H - -#define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W) -#define GREENBUTTON_Y FRAME_Y -#define GREENBUTTON_W (FRAME_W/2) -#define GREENBUTTON_H FRAME_H - -void drawFrame() -{ - tft.drawRect(FRAME_X, FRAME_Y, FRAME_W, FRAME_H, ILI9341_BLACK); -} - -void redBtn() -{ - tft.fillRect(REDBUTTON_X, REDBUTTON_Y, REDBUTTON_W, REDBUTTON_H, ILI9341_RED); - tft.fillRect(GREENBUTTON_X, GREENBUTTON_Y, GREENBUTTON_W, GREENBUTTON_H, ILI9341_BLUE); - drawFrame(); - tft.setCursor(GREENBUTTON_X + 6 , GREENBUTTON_Y + (GREENBUTTON_H/2)); - tft.setTextColor(ILI9341_WHITE); - tft.setTextSize(2); - tft.println("ON"); - RecordOn = false; -} - -void greenBtn() -{ - tft.fillRect(GREENBUTTON_X, GREENBUTTON_Y, GREENBUTTON_W, GREENBUTTON_H, ILI9341_GREEN); - tft.fillRect(REDBUTTON_X, REDBUTTON_Y, REDBUTTON_W, REDBUTTON_H, ILI9341_BLUE); - drawFrame(); - tft.setCursor(REDBUTTON_X + 6 , REDBUTTON_Y + (REDBUTTON_H/2)); - tft.setTextColor(ILI9341_WHITE); - tft.setTextSize(2); - tft.println("OFF"); - RecordOn = true; -} - -void setup(void) -{ - Serial.begin(9600); - tft.begin(); - - tft.fillScreen(ILI9341_BLUE); - // origin = left,top landscape (USB left upper) - tft.setRotation(1); - redBtn(); -} - -void loop() -{ - // Retrieve a point - TSPoint p = ts.getPoint(); - - // See if there's any touch data for us - if (p.z > MINPRESSURE && p.z < MAXPRESSURE) - { - // Scale using the calibration #'s - // and rotate coordinate system - p.x = map(p.x, TS_MINY, TS_MAXY, 0, tft.height()); - p.y = map(p.y, TS_MINX, TS_MAXX, 0, tft.width()); - int y = tft.height() - p.x; - int x = p.y; - - if (RecordOn) - { - if((x > REDBUTTON_X) && (x < (REDBUTTON_X + REDBUTTON_W))) { - if ((y > REDBUTTON_Y) && (y <= (REDBUTTON_Y + REDBUTTON_H))) { - Serial.println("Red btn hit"); - redBtn(); - } - } - } - else //Record is off (RecordOn == false) - { - if((x > GREENBUTTON_X) && (x < (GREENBUTTON_X + GREENBUTTON_W))) { - if ((y > GREENBUTTON_Y) && (y <= (GREENBUTTON_Y + GREENBUTTON_H))) { - Serial.println("Green btn hit"); - greenBtn(); - } - } - } - - Serial.println(RecordOn); - } -} - - - diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/pictureEmbed/dragon.h b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/pictureEmbed/dragon.h deleted file mode 100644 index ab61bb77c..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/pictureEmbed/dragon.h +++ /dev/null @@ -1,861 +0,0 @@ -#define DRAGON_WIDTH 110 -#define DRAGON_HEIGHT 70 - -const PROGMEM uint16_t dragonBitmap[DRAGON_WIDTH * DRAGON_HEIGHT] = { - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X8C10, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XBD14, 0XAC92, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XDEFB, 0XB431, 0XA1C9, 0XAA4B, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE18, 0X9A2A, 0X9044, - 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XDEFB, 0XB3B0, 0XA148, 0XB865, 0XC066, 0XC066, 0XAA4B, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XAB2E, 0X9864, - 0XA865, 0XAAAC, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XAC92, - 0X728B, 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XCE18, 0XAB2E, 0XAA4B, 0XAA4B, 0XAA4B, 0XA3AF, - 0XB431, 0XB431, 0XB431, 0XA411, 0XA8E6, 0XD086, 0XB865, 0X7043, 0XA865, - 0XD086, 0XAA4B, 0XCE79, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB493, 0XA8E6, - 0X9864, 0XC066, 0XD086, 0XB493, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE79, 0X830D, - 0X80C5, 0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB431, 0XC066, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XB865, 0X9864, - 0XC066, 0XD086, 0XB8E7, 0XB493, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A, 0XA1C9, - 0XB865, 0X9864, 0XD086, 0XD086, 0XD086, 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XAD14, 0X71A8, - 0X9864, 0XC066, 0XC515, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XDEFB, 0XBDF7, 0XBD14, 0XA411, 0XB431, 0XB148, 0XD086, 0XC066, - 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0XD086, 0XA865, - 0XB865, 0XD086, 0XD086, 0XB1CA, 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XB3B0, - 0XB865, 0XA865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XBD14, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE79, 0X932D, 0X78C5, - 0XA865, 0XD086, 0XC066, 0XC515, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XDEFB, 0XAB2E, 0XA0C6, 0XB865, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, - 0XB865, 0X78C5, 0X4208, 0X2104, 0X8947, 0X9864, 0X9864, 0X9864, 0XD086, - 0XD086, 0XA865, 0X9864, 0XD086, 0XB865, 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE18, - 0XB148, 0XC066, 0XA865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XB493, 0X89A8, 0X9044, - 0XB865, 0XD086, 0XD086, 0XC066, 0XC515, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0X7B8E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XAD14, 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XB431, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0XA865, - 0X9864, 0XD086, 0XD086, 0XD086, 0XAA4B, 0X9A2A, 0XC066, 0XD086, 0XD086, - 0XD086, 0XD086, 0XC066, 0X9044, 0X9864, 0X9864, 0X9044, 0XCE18, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, - 0XB3B0, 0XC066, 0XB865, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XAAAC, 0XBD96, 0XAD14, 0XAAAC, 0X8044, 0X9864, - 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XB431, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XB3B0, 0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XBD96, 0XB8E7, 0XB431, 0XEF7D, 0XFFFF, - 0XFFFF, 0XFFFF, 0XA32E, 0X9864, 0X9864, 0XAA4B, 0XAA4B, 0X9147, 0XB865, - 0X9044, 0XD086, 0XA865, 0XD086, 0XC066, 0XC066, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, - 0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XDE9A, 0XB148, 0XD086, 0XA865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X9864, 0X9864, 0XA865, 0X9864, - 0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA148, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XC515, 0XC066, 0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAA4B, 0XD086, - 0XA865, 0XAB2E, 0XBD96, 0XEF7D, 0XCE79, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XDEFB, 0XB1CA, 0XD086, 0XD086, 0X9864, 0X822A, 0XBDF7, 0XB493, - 0XB148, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X9864, - 0XD086, 0XD086, 0XD086, 0XAA4B, 0XBD14, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XB431, 0XB865, 0XD086, 0X9864, 0XC066, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XC066, 0X9864, 0X9864, 0XC066, 0XA865, 0X9864, - 0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XB3B0, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCD96, 0XC066, 0XD086, 0XAA4B, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XDE9A, 0XB865, 0XD086, 0XD086, 0XD086, 0XA865, 0X9147, 0X9C92, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE18, 0X80C5, 0X5822, 0X5A08, 0XDEFB, - 0XFFFF, 0XFFFF, 0XCE79, 0XA0C6, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0X9044, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XAB2E, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XEF7D, 0XAA4B, 0XD086, 0XC066, 0X9864, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XA865, 0X9864, 0XA865, 0XD086, 0X9864, 0X9864, - 0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A, 0XB8E7, 0XD086, 0XD086, - 0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XC515, 0XC066, 0XD086, 0XB865, 0X8044, 0X82AB, - 0XBDF7, 0XBDF7, 0XBDF7, 0XBDF7, 0XBDF7, 0XBDF7, 0XAC92, 0XA3AF, 0X92AC, - 0XAB2E, 0XAA4B, 0XA1C9, 0X9864, 0XB865, 0XA865, 0XC066, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XB1CA, 0XBD14, - 0X9CF3, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XCE18, 0XA8E6, 0XD086, 0XC066, 0XA865, 0XD086, 0XD086, - 0XD086, 0XD086, 0XC066, 0X9864, 0X9864, 0XC066, 0XD086, 0X9864, 0X9864, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XC066, 0XC515, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A, 0XB8E7, 0XD086, - 0XD086, 0XD086, 0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB3B0, 0XD086, 0XA865, - 0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XC066, 0XA865, 0X8044, 0X4822, 0X9044, 0X9044, - 0XD086, 0XD086, 0XD086, 0XD086, 0X8044, 0X9864, 0XD086, 0XD086, 0XD086, - 0XAA4B, 0XCE18, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XB493, 0XC066, 0XD086, 0XC066, 0XA865, 0XD086, - 0XD086, 0XD086, 0XA865, 0X9864, 0XA865, 0XD086, 0XC066, 0X9864, 0X9864, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X9044, 0X3986, 0XCE79, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A, 0XB8E7, - 0XD086, 0XD086, 0XC066, 0XD086, 0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XB431, 0XC066, 0X90C6, 0XAA4B, 0XAA4B, 0XAA4B, 0XAA4B, 0X99C9, 0X9864, - 0X9864, 0X9864, 0X6843, 0X6843, 0X5822, 0X4822, 0X7043, 0X9044, 0XC066, - 0X9864, 0X7043, 0XC066, 0XB865, 0XD086, 0X7043, 0X8044, 0XC066, 0XD086, - 0XD086, 0XD086, 0XD086, 0XC066, 0XB431, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XAB2E, 0XD086, 0XD086, 0XC066, 0XA865, - 0XD086, 0XD086, 0X9864, 0X9044, 0XC066, 0XD086, 0XC066, 0X9864, 0XA865, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XB865, 0X9864, 0X9864, 0X9864, 0X9044, 0X6843, 0X6843, 0X8044, 0X7B0C, - 0XCE79, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A, - 0XB8E7, 0XD086, 0X9864, 0XC066, 0X9864, 0XD086, 0XAA4B, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XC515, 0XA8E6, 0XCE18, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XA148, 0XD086, 0XD086, 0XD086, 0XD086, - 0XB148, 0XBD14, 0X9A2A, 0XD086, 0X9864, 0X9864, 0X6843, 0XD086, 0XC066, - 0XC066, 0XD086, 0XD086, 0XD086, 0XA865, 0XC066, 0XA865, 0XEF7D, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XB1CA, 0XD086, 0XD086, 0XD086, - 0X9864, 0XC066, 0X9864, 0X9864, 0XD086, 0XD086, 0XC066, 0X9864, 0XA865, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X9864, 0X9864, 0X9864, - 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0XA865, 0XD086, 0XA1C9, - 0XDE9A, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XDE9A, 0XB8E7, 0XD086, 0XD086, 0X9864, 0XD086, 0X9864, 0XD086, 0XAA4B, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDEFB, 0XCE18, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAA4B, 0XD086, 0XC066, - 0XD086, 0XAAAC, 0XEF7D, 0XFFFF, 0X932D, 0XB865, 0XB865, 0XC066, 0X7043, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XB148, 0XEF7D, 0XBD14, 0XA148, - 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAA4B, 0XD086, 0XD086, - 0XD086, 0X8044, 0X9864, 0XA865, 0XD086, 0XD086, 0XC066, 0X9864, 0XA865, - 0XD086, 0XD086, 0XA865, 0X9864, 0X9864, 0X9864, 0X9864, 0XA865, 0XD086, - 0XB865, 0X9864, 0X9864, 0X9864, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, - 0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XDE9A, 0XB8E7, 0XD086, 0XD086, 0XC066, 0XA865, 0XD086, 0X9864, - 0XD086, 0XA0C6, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X8C10, 0XB431, 0XEF7D, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XBD14, - 0XD086, 0XA1C9, 0X80C5, 0XEF7D, 0XFFFF, 0XB431, 0XD086, 0XB865, 0X9864, - 0X8044, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XAA4B, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XBD14, 0XD086, - 0XD086, 0XD086, 0XA865, 0XB865, 0XD086, 0XD086, 0XC066, 0X9864, 0X9864, - 0X9864, 0X9044, 0X9864, 0X9864, 0XC066, 0XD086, 0XD086, 0XB865, 0X9864, - 0X9864, 0X9864, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XDE9A, 0XB8E7, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, - 0XD086, 0X9864, 0XD086, 0X9864, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XB148, - 0XA1C9, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XBDF7, 0XD086, 0XBD14, 0XEF7D, 0XFFFF, 0XFFFF, 0XA148, 0XD086, - 0XD086, 0XD086, 0X9864, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XC066, 0XB431, 0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XAA4B, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XC066, 0X7043, - 0X9864, 0XA865, 0XD086, 0XD086, 0XD086, 0XC066, 0X9864, 0X9864, 0X9864, - 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XAAAC, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XA32E, 0XAA4B, 0XAA4B, 0XAA4B, 0XAB2E, - 0X9044, 0XD086, 0XA865, 0X9864, 0XD086, 0XD086, 0XBDF7, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XBDF7, 0XDEFB, 0XFFFF, 0XFFFF, - 0XFFFF, 0XB431, 0XB865, 0XAC92, 0XFFFF, 0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0X8947, 0XEF7D, 0XFFFF, 0XFFFF, 0XEF7D, - 0X9044, 0XD086, 0XD086, 0XB865, 0XB865, 0X9864, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XA0C6, 0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0X9864, 0XA865, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XA8E6, 0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XCE18, 0XC066, 0XD086, 0XA1C9, 0XB431, 0XD086, 0XD086, 0XB493, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XAB2E, 0XB865, - 0XB3B0, 0XFFFF, 0XFFFF, 0X9AAC, 0XB865, 0XA148, 0XFFFF, 0X9AAC, 0XCD96, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XAA4B, 0XB865, 0X9864, 0X9864, 0X8044, 0X9044, 0X8044, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XA1C9, 0X90C6, 0XD086, 0XB3B0, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XD086, 0X9864, 0XD086, - 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0X9864, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XDEFB, 0XB3B0, 0XAA4B, 0X9864, 0X9864, 0XA1C9, - 0XAB2E, 0XBD96, 0XFFFF, 0XAA4B, 0XD086, 0XD086, 0XB493, 0XFFFF, 0XAB2E, - 0XC066, 0XAAAC, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0X8947, 0X9864, 0X9A2A, 0XFFFF, 0X9864, 0XD086, 0XA148, 0XEF7D, - 0XA8E6, 0XB431, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XCE79, 0XC066, 0XD086, 0XD086, 0XD086, 0X9044, 0X7043, - 0X8044, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XFFFF, 0XFFFF, 0XBD14, - 0X92AC, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XB865, - 0XB865, 0XD086, 0XD086, 0X8044, 0X6843, 0X9864, 0X9864, 0X9864, 0X9864, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XBD96, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB431, 0XB865, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0X9147, 0XA865, 0XD086, 0XC066, 0XCE79, - 0XFFFF, 0XFFFF, 0XCD96, 0X7926, 0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XC066, 0X9CF3, 0XC066, 0XD086, - 0X8A2A, 0X8947, 0XD086, 0XBD14, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAD14, 0XC066, 0XD086, 0XD086, 0XD086, - 0X9864, 0X9864, 0X8044, 0XD086, 0XD086, 0XD086, 0XD086, 0XB865, 0XDEFB, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X9864, - 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, - 0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB493, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0XA865, - 0XA148, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAA4B, 0XD086, 0XD086, 0X71A8, - 0XD086, 0XD086, 0X9044, 0XD086, 0X9864, 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A, 0XB865, 0XA865, 0XA865, - 0XD086, 0XD086, 0X7043, 0X9864, 0X9044, 0XA865, 0XD086, 0XD086, 0XD086, - 0XD086, 0XA8E6, 0XB493, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0X9864, 0XB865, 0XB865, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, - 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XA865, 0X9864, 0X9864, 0X9864, 0X9864, 0XD086, 0XD086, - 0XD086, 0XD086, 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XA0C6, 0XD086, - 0XD086, 0XD086, 0XA865, 0X80C5, 0X9864, 0XC066, 0XD086, 0XD086, 0XD086, - 0XD086, 0XC066, 0X8B8E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB493, 0XD086, - 0XD086, 0X9864, 0XA865, 0XA865, 0XC066, 0XD086, 0XA8E6, 0XEF7D, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAAAC, 0XD086, - 0XD086, 0XC066, 0X9864, 0X8044, 0XA865, 0X9044, 0XC066, 0X8044, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9A2A, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XEF7D, 0XA865, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, - 0X9864, 0X9864, 0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X9864, - 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0XD086, 0XD086, - 0X9864, 0X9864, 0X9864, 0XC066, 0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0X9864, 0XD086, 0XD086, 0X90C6, 0XCE79, 0XFFFF, 0XFFFF, 0X9C92, 0X9864, - 0XD086, 0XD086, 0XD086, 0XD086, 0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XEF7D, 0XA0C6, 0XD086, 0XD086, 0XB865, 0X9864, 0XD086, 0XB1CA, 0XDE9A, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XAA4B, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X7043, 0XA865, 0X9044, - 0X9044, 0XD086, 0XD086, 0XD086, 0XD086, 0XB1CA, 0XB431, 0X82AB, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XBD14, 0XA865, 0XC066, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X9864, 0XC066, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X7043, 0X8044, 0XDEFB, 0XFFFF, - 0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XD086, 0XA32E, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0X728B, 0XB865, 0XD086, 0XD086, 0XD086, 0X9864, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XAA4B, 0XD086, 0XD086, 0XB865, 0X90C6, - 0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XC515, 0X9044, 0XC066, 0XD086, 0XD086, 0XD086, 0X9864, 0X8044, - 0XC066, 0X8044, 0X9044, 0XC066, 0XD086, 0XD086, 0XD086, 0XBDF7, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0X6926, 0XC066, 0XD086, - 0XD086, 0XD086, 0X9044, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, - 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA8E6, 0XAAAC, 0XB431, 0X8410, - 0X8C71, 0XFFFF, 0XFFFF, 0XFFFF, 0XAAAC, 0XD086, 0XD086, 0XA865, 0XA32E, - 0XB431, 0XB431, 0X8947, 0XC066, 0X9864, 0XD086, 0XD086, 0XD086, 0XC066, - 0XCE79, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB431, 0XD086, 0XD086, - 0XD086, 0XB8E7, 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XA0C6, 0XD086, 0XA865, 0X9864, 0X9864, 0X9864, - 0X9044, 0X9044, 0XA865, 0X9864, 0XA865, 0X9864, 0XD086, 0XD086, 0XD086, - 0XB3B0, 0XFFFF, 0XEF7D, 0XBDF7, 0XB431, 0XAAAC, 0XA148, 0XA865, 0XD086, - 0XD086, 0XD086, 0XC066, 0XD086, 0XB865, 0X9044, 0X9864, 0X9864, 0XC066, - 0XD086, 0XD086, 0XD086, 0X9864, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XB8E7, 0XB493, 0XEF7D, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A, 0XB8E7, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, - 0XD086, 0XD086, 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAAAC, - 0XD086, 0XD086, 0XD086, 0XD086, 0XB3B0, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDEFB, 0XB865, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0X8044, 0X9864, 0XB865, 0X8044, 0XC066, 0X6843, 0XD086, - 0XD086, 0X9864, 0XA0C6, 0X99C9, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0X8044, 0XB865, 0XD086, 0XC066, 0XA865, - 0XD086, 0XA865, 0X9864, 0X9864, 0XD086, 0XD086, 0XB865, 0X9864, 0XC066, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XB1CA, 0XDEFB, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XDEFB, 0XAB2E, 0X9864, 0XC066, 0XD086, 0XC066, 0X9864, 0X89A8, 0XA865, - 0XD086, 0XD086, 0XD086, 0XA865, 0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XAA4B, 0XD086, 0XD086, 0XD086, 0XD086, 0XA148, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XBDF7, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0X7043, 0XC066, 0X6843, 0XD086, 0X7043, - 0XC066, 0X9044, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0XD086, 0X9864, 0XB865, 0XB865, - 0XD086, 0XC066, 0XA865, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0XC066, - 0XD086, 0XA865, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X9C92, - 0XBDF7, 0XBDF7, 0XBDF7, 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE79, 0XBDF7, 0XCE79, 0XEF7D, - 0XAAAC, 0XD086, 0XD086, 0XD086, 0XD086, 0XA1C9, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XA148, 0XD086, 0XD086, 0XD086, 0XD086, 0XB865, - 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCD96, - 0X8044, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X6843, 0X9044, 0X9864, - 0XA865, 0XA865, 0X9044, 0XB865, 0XD086, 0XD086, 0XB865, 0X9864, 0X8044, - 0XC066, 0XD086, 0XD086, 0XB865, 0XD086, 0XA865, 0X9044, 0XD086, 0XB865, - 0XB865, 0XB865, 0XA865, 0XD086, 0XB865, 0XB865, 0XD086, 0XD086, 0XD086, - 0XD086, 0XA865, 0X9864, 0XB865, 0XC066, 0X9864, 0XD086, 0XD086, 0XD086, - 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0XA1C9, - 0XAB2E, 0XBD14, 0XCE79, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE79, - 0XB493, 0XB148, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XBD14, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XA148, 0XD086, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, - 0X9864, 0X9864, 0X7043, 0X9864, 0XD086, 0XD086, 0XA865, 0X9864, 0XB865, - 0XD086, 0X9864, 0XD086, 0XC066, 0X7043, 0XD086, 0XD086, 0X9864, 0XC066, - 0XA865, 0XD086, 0X9864, 0XD086, 0XC066, 0XA865, 0XD086, 0XA865, 0XC066, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X9864, 0X9044, 0X9864, - 0XC066, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X9864, 0X9864, 0X9864, 0X9864, - 0X9864, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA1C9, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XC515, 0XC066, 0XA865, - 0XD086, 0XD086, 0XD086, 0XD086, 0XAD14, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0X9044, 0X8044, 0X9864, 0XA865, 0XD086, 0XA865, 0X9864, 0XC066, - 0XD086, 0XD086, 0XA865, 0XC066, 0XC066, 0XA865, 0X9864, 0XD086, 0XA865, - 0XC066, 0XD086, 0X9864, 0XD086, 0X9864, 0XD086, 0XD086, 0XB865, 0XB865, - 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0X9864, 0X8044, 0X8044, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, - 0XA865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XB8E7, 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, - 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X04A6, 0XB865, - 0XD086, 0X31C3, 0XC066, 0XD086, 0XD086, 0X9864, 0XB865, 0X2305, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X9864, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0X6843, 0X9864, 0XA865, 0XB865, 0X9864, 0XC066, - 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XC066, 0XA865, 0XD086, 0X9864, - 0XD086, 0X9864, 0XD086, 0XD086, 0XA865, 0XC066, 0X9864, 0XD086, 0XD086, - 0XD086, 0XC066, 0XA865, 0XB865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X8044, 0X8044, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0X9864, 0XC066, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0X8145, 0X0C66, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0506, - 0X8145, 0XD086, 0X9105, 0X0506, 0X80E5, 0XD086, 0XD086, 0X9864, 0XD086, - 0X9864, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X80E5, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X8044, 0XB865, 0X9864, 0XB865, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0XC066, 0X9864, 0XD086, - 0XD086, 0X9864, 0XC066, 0XA865, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, - 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0XA865, 0X9864, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XA865, 0X9864, 0X9864, 0X7043, 0X9864, 0XA865, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0XC066, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XC066, 0X59E5, 0X0506, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X2305, 0XB865, 0XD086, 0X2305, 0X0547, 0X1B65, 0XD086, 0XD086, - 0XB865, 0XB865, 0X9864, 0X6985, 0X1B65, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0C05, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0X9044, 0X8044, 0X9864, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, - 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, - 0X9864, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XB865, 0XA865, - 0XA865, 0XD086, 0XD086, 0XA865, 0X9864, 0XC066, 0XD086, 0XD086, 0X9864, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XA865, 0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0X80E5, 0X0C05, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X1B65, 0XC066, 0X8044, 0X04A6, 0X0547, 0X0547, - 0X80E5, 0XD086, 0XD086, 0X9864, 0XA865, 0XD086, 0XD086, 0X1AC4, 0X0405, - 0X0547, 0X0547, 0X4285, 0XC066, 0X9864, 0X9864, 0X9864, 0X9864, 0X8044, - 0XA865, 0XD086, 0XD086, 0XC066, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086, - 0X7043, 0XC066, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0XD086, 0XD086, - 0XD086, 0XD086, 0XA865, 0XA865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XB865, 0X8044, 0XD086, 0XA865, 0XC066, 0XD086, 0XD086, 0XD086, - 0XD086, 0XC066, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XA865, 0X59E5, 0X0BA5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0506, 0X3264, 0X98A5, 0X7145, 0X04A6, 0X0547, - 0X0547, 0X0547, 0X1BC5, 0XC066, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, - 0X9864, 0XD086, 0X7145, 0X4984, 0X80A4, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0X9864, 0X7043, 0X9864, 0X9864, 0XB865, 0X9864, 0XD086, 0XD086, - 0XD086, 0X8044, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086, 0X9044, 0XA865, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X8044, 0XC066, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0XC066, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9044, 0XA865, 0X9864, - 0X6985, 0X4285, 0X1B65, 0X0506, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0445, 0X0445, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X4A25, 0XD086, 0XD086, 0XD086, - 0X9864, 0X9864, 0XC066, 0XD086, 0XD086, 0X9864, 0X9864, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0X9864, - 0XD086, 0XB865, 0X9864, 0X4822, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0X6843, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, - 0XD086, 0XC066, 0X9864, 0X8044, 0X9864, 0X9864, 0X9864, 0X8044, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X9864, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XA8C5, 0X32C5, 0X0506, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X4A25, - 0XD086, 0XD086, 0XD086, 0XA865, 0X9864, 0XB865, 0XD086, 0X9864, 0X9864, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, - 0XD086, 0X9864, 0XA865, 0XB865, 0XD086, 0X8044, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0X6843, 0XD086, 0X9044, 0X9864, 0X9044, 0X9864, 0XB865, - 0X9864, 0X9864, 0XB865, 0XA865, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, - 0XA865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XC066, 0X9864, 0XA865, 0X9864, 0X9044, 0XA865, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0X98A5, 0X32C5, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X32C5, 0XC066, 0XD086, 0XD086, 0XD086, 0XB865, 0X9864, - 0X8044, 0X9864, 0X8044, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, - 0XD086, 0XD086, 0XD086, 0X9864, 0XC066, 0XA865, 0X9864, 0X9864, 0XA865, - 0X9864, 0X9044, 0X9864, 0XD086, 0X6843, 0X9864, 0XC066, 0XA865, 0XD086, - 0XD086, 0XB865, 0X8044, 0X7043, 0XB865, 0XD086, 0X9864, 0X9864, 0X9864, - 0X9864, 0X9864, 0XA865, 0XB865, 0X9864, 0X9864, 0X9864, 0XA865, 0XD086, - 0XD086, 0XD086, 0X9044, 0XD086, 0XD086, 0XC066, 0XA865, 0XC066, 0X9864, - 0X9864, 0X9044, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X80E5, - 0X1BC5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X4285, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, - 0XB865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0X9044, 0X7043, 0XD086, - 0X8044, 0X9044, 0XD086, 0XD086, 0X9044, 0X9864, 0X6843, 0XD086, 0XD086, - 0X9864, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XB865, 0XA865, - 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X6985, - 0X04A6, 0X4A25, 0X80A4, 0XA865, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, - 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0X9864, 0X8044, 0X9864, 0XC066, - 0XD086, 0XD086, 0XC066, 0X6985, 0X0C66, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X4A25, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, - 0XD086, 0XD086, 0XA865, 0X9044, 0XB865, 0XA865, 0X9864, 0X9044, 0X9864, - 0XB865, 0X9044, 0XC066, 0X9864, 0XD086, 0XD086, 0X9864, 0XD086, 0XA865, - 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0X9864, 0XC066, 0X9864, - 0XB865, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0X4A25, 0X0506, 0X0547, 0X0547, 0X1BC5, 0XA8C5, 0XD086, 0XD086, 0XB865, - 0XB865, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0X9864, - 0XD086, 0X9864, 0XB865, 0XD086, 0XD086, 0XD086, 0XB865, 0X32C5, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0506, 0X8145, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, - 0XA865, 0XD086, 0XD086, 0XB865, 0XB865, 0XD086, 0XB865, 0X8044, 0XB865, - 0XA865, 0X8044, 0XA865, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0X9864, - 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0X8044, 0X7043, - 0X7043, 0XC066, 0XD086, 0XC066, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0X6985, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X04A6, 0X2305, - 0X32C5, 0X6944, 0XD086, 0XD086, 0XD086, 0X9864, 0XC066, 0XD086, 0XD086, - 0X9864, 0XD086, 0XD086, 0X9864, 0XB865, 0XB865, 0XD086, 0XC066, 0XB865, - 0XD086, 0X7145, 0X0C66, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0C66, 0XB865, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XA865, 0XC066, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, - 0X9044, 0XB865, 0X9044, 0XD086, 0XD086, 0XD086, 0XC066, 0XA865, 0XD086, - 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XB865, 0XA865, 0XD086, 0XB865, - 0XB865, 0XD086, 0XD086, 0XB865, 0X9864, 0X7043, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0X32C5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0405, 0X2305, 0X0BA5, 0X0BA5, 0X7145, - 0X9864, 0X90A4, 0X58E3, 0XD086, 0XB865, 0XB865, 0XD086, 0X9864, 0XD086, - 0XD086, 0X1A63, 0XA8C5, 0XD086, 0XA8C5, 0X0C66, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X32C5, 0XD086, - 0XD086, 0XD086, 0XD086, 0XA865, 0X90A4, 0X4183, 0X6985, 0X5924, 0X9044, - 0XD086, 0XB865, 0XB865, 0X9044, 0X9864, 0XD086, 0XD086, 0XD086, 0X9864, - 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XA8C5, 0X1B65, 0X0405, - 0X0405, 0X9044, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X4A25, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0405, 0X1AC4, 0XD086, 0XD086, - 0X9864, 0XD086, 0XD086, 0X4285, 0X04A6, 0X59E5, 0X9864, 0X4224, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0506, 0X98A5, 0XD086, 0XD086, 0X22C4, 0X0506, 0X0547, 0X0547, 0X0547, - 0X2305, 0XD086, 0XA865, 0X8044, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0X9864, 0XD086, 0XD086, 0X9044, 0XD086, 0XB865, 0X6985, 0X04A6, - 0X0547, 0X0547, 0X0547, 0X90A4, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XA865, 0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XB865, 0X0BA5, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X22C4, 0XA865, 0X9044, 0X9864, 0XD086, 0X6985, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X4A25, 0XD086, 0X98A5, 0X0506, 0X0547, 0X0547, - 0X0547, 0X0506, 0X4183, 0X9864, 0X9044, 0XB865, 0XD086, 0XD086, 0XD086, - 0X9864, 0XD086, 0XD086, 0X9864, 0XD086, 0X7145, 0X0BA5, 0X0405, 0X04A6, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X32C5, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0X9044, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0X90A4, 0X4285, 0X04A6, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0405, 0XD086, 0XD086, 0X9864, 0XD086, 0X6985, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X1B65, 0XD086, 0X4A25, 0X0547, - 0X0547, 0X0547, 0X0547, 0X4A25, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, - 0XD086, 0X8145, 0X0B64, 0XD086, 0XD086, 0XA865, 0X32C5, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X2305, - 0X98A5, 0XC066, 0X9864, 0X9864, 0X9864, 0XC066, 0X9864, 0XA865, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X80E5, 0X59E5, - 0X0C05, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0445, 0XC066, 0XD086, 0X9044, 0XD086, - 0X6985, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0405, 0X98A5, - 0X0506, 0X0547, 0X0547, 0X0547, 0X0547, 0X59E5, 0XD086, 0XB865, 0XB865, - 0XD086, 0XD086, 0XA8C5, 0X0C66, 0X0506, 0X98A5, 0XD086, 0X90A4, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0506, 0X70E4, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, - 0X9864, 0X9864, 0X9864, 0X9044, 0X9864, 0XC066, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XC066, 0X1BC5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X68E4, 0X9044, - 0X9864, 0XD086, 0X6985, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0445, 0X1BC5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0C66, 0X90A4, 0XA865, - 0X9044, 0XD086, 0XD086, 0XA8C5, 0X0C66, 0X0547, 0X0547, 0X32C5, 0XD086, - 0X4A25, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0C66, 0X7145, 0X9864, 0X9864, - 0XA865, 0XA865, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0X9864, 0XD086, - 0XD086, 0X90A4, 0X80E5, 0XC066, 0XD086, 0X7145, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X9864, 0XD086, 0X9864, 0XD086, 0X6985, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X80E5, - 0XD086, 0XB865, 0XB865, 0XD086, 0XA8C5, 0X0C66, 0X0547, 0X0547, 0X0547, - 0X0506, 0X9044, 0X04A6, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X4285, 0XB865, 0XA865, 0X9864, 0XC066, 0XD086, 0XA865, - 0XC066, 0XD086, 0XC066, 0X0C05, 0X0547, 0X0445, 0X4285, 0X58E3, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X9864, 0XD086, 0X9864, 0XD086, 0X4285, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X9864, 0XD086, 0X9864, 0XD086, 0XA8C5, 0X0C66, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0405, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0405, 0X04A6, 0X2305, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0C66, 0X80E5, 0X9864, 0X9864, 0X9864, - 0X8044, 0XB865, 0XD086, 0XD086, 0X32C5, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X4285, 0XA865, 0X7043, 0XB865, 0XD086, 0X2305, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X2365, 0X9864, 0XB865, 0XB865, 0XA8C5, 0X0C66, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0506, 0X70A4, 0XA865, 0X8044, 0XD086, 0X7145, 0X0506, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X04A6, 0X3224, 0XD086, 0XD086, - 0XC066, 0X9864, 0XC066, 0XD086, 0XD086, 0X4A25, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X1B65, 0X32C5, 0X68E4, 0X2365, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X9864, 0XD086, 0X9864, 0XD086, - 0XC066, 0X0445, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X2305, 0X6985, 0X59E5, 0X22C4, 0X0445, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0C66, 0XA8C5, 0XA865, 0XA865, 0XD086, 0X2305, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0BA5, 0X0C05, 0X0C66, 0X9044, 0XD086, 0XD086, 0X8145, - 0X04A6, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0C05, 0XB865, 0XC066, - 0X9864, 0X9044, 0XA865, 0XD086, 0XD086, 0XD086, 0X4A25, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X22C4, 0X70E4, 0XB865, 0X9864, 0XC066, - 0X2365, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X5924, 0X9864, - 0XA865, 0XD086, 0X9864, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X3224, 0X22C4, 0X9864, 0XA865, 0XC066, 0X6985, - 0X0BA5, 0X0506, 0X0547, 0X0506, 0X32C5, 0XB865, 0XD086, 0XD086, 0XD086, - 0X80E5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0C05, 0X4A25, - 0X80E5, 0XD086, 0XB865, 0X4A25, 0X0BA5, 0X22C4, 0X6985, 0X90A4, 0X9864, - 0X9864, 0X9864, 0X9044, 0XD086, 0XD086, 0XD086, 0XB865, 0X2305, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X04A6, 0X0547, 0X1B04, - 0XC066, 0XD086, 0XC066, 0X4285, 0X0506, 0X0547, 0X0547, 0X0547, 0X4A25, - 0XD086, 0XD086, 0XD086, 0XD086, 0X59E5, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X7043, 0XA865, - 0XD086, 0XD086, 0XB865, 0X7043, 0X6843, 0X9864, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0X1B65, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0506, 0X32C5, 0X3264, 0X6985, - 0X59E5, 0X04A6, 0X0547, 0X4A25, 0XC066, 0X9864, 0XA865, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X6985, 0X04A6, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0C66, 0X59E5, 0X6883, 0X9864, 0X9864, 0XD086, 0X98A5, 0X4285, 0X32C5, - 0X6944, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X2305, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0506, 0X32C5, 0X6985, 0X6944, - 0XC066, 0XC066, 0X9864, 0X9864, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XA865, 0X0506, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0506, 0X80E5, 0X9864, - 0X9864, 0XD086, 0XD086, 0XB865, 0X6985, 0X6985, 0X9044, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X59E5, 0X0C05, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0506, 0X6985, 0XA865, 0XA865, 0XD086, 0XD086, 0XD086, 0X9864, 0XB865, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X6985, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X3264, 0X7145, - 0X6985, 0X9864, 0X9044, 0X9864, 0X9864, 0X9864, 0XA865, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X90A4, 0X6985, 0X4285, - 0X1BC5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0445, - 0X2305, 0X04A6, 0X90A4, 0XC066, 0X9864, 0X9044, 0X9864, 0X9864, 0X9864, - 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X58E3, 0X3264, - 0X1B65, 0X0506, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X4224, 0X4224, 0X3264, 0X7043, 0X4A25, 0X32C5, 0X49C4, - 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0X7145, 0X1B65, 0X0506, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X04A6, 0X0547, 0X0547, 0X04A6, 0X80E5, 0XD086, 0XD086, 0XD086, 0XD086, - 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X7145, 0X49C4, 0XB865, 0XD086, - 0XD086, 0XD086, 0X9044, 0X9864, 0X32C5, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0445, 0X5883, 0XA865, 0XD086, 0XD086, - 0XC066, 0X9864, 0X7145, 0X6985, 0X3264, 0X80E5, 0X7145, 0X32C5, 0X70E4, - 0XD086, 0XD086, 0XD086, 0X68E4, 0X4285, 0X04A6, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0405, 0X0547, 0X0547, 0X0547, 0X0506, - 0X6985, 0X9864, 0XD086, 0XD086, 0XA865, 0X9864, 0XD086, 0XD086, 0XD086, - 0XB865, 0X80E5, 0X80A4, 0XC066, 0XD086, 0XD086, 0X58E3, 0X32C5, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0C66, 0X90A4, 0XA865, 0XA865, 0XD086, - 0XD086, 0XD086, 0X6985, 0X0BA5, 0X0405, 0X22C4, 0X0C05, 0X0547, 0X0547, - 0X0C66, 0X7145, 0XC066, 0XD086, 0X70A4, 0X4285, 0X58E3, 0X0506, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X59E5, 0XA865, 0X9044, - 0X9864, 0X4A25, 0X0445, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X1B65, 0X98A5, 0XD086, 0X9044, 0X7145, 0X8044, 0X04A6, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X1BC5, 0X7145, 0X9864, 0XD086, 0X98A5, 0X2305, 0X0506, 0X0506, 0X32C5, - 0X6985, 0X32C5, 0X04A6, 0X0547, 0X0547, 0X0C05, 0X5984, 0XA865, 0X9864, - 0X9864, 0X32C5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X49C4, 0X59E5, 0X22C4, - 0X70E4, 0X9864, 0X7145, 0X1B65, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0445, 0X0405, 0X0506, 0X0547, 0X0506, - 0X0506, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X2264, - 0X0506, 0X0506, 0X0445, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0506, 0X0405, 0X0445, 0X0547, - 0X0C66, 0X0445, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0506, 0X90A4, 0X80E5, 0X4224, 0X3224, 0X0506, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0405, 0X0547, 0X0506, 0X1A03, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0B64, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X04A6, 0X1BC5, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, - 0X0547, 0X0547, 0X0547, 0X0547, 0X0547 }; - diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/pictureEmbed/pictureEmbed.ino b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/pictureEmbed/pictureEmbed.ino deleted file mode 100644 index 5c5475756..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/pictureEmbed/pictureEmbed.ino +++ /dev/null @@ -1,69 +0,0 @@ -// ILI9341 example with embedded color bitmaps in sketch. -// WILL NOT FIT ON ARDUINO UNO OR OTHER AVR BOARDS; -// uses large bitmap image stored in array! - -// Options for converting images to the format used here include: -// http://www.rinkydinkelectronics.com/t_imageconverter565.php -// or -// GIMP (https://www.gimp.org/) as follows: -// 1. File -> Export As -// 2. In Export Image dialog, use 'C source code (*.c)' as filetype. -// 3. Press export to get the export options dialog. -// 4. Type the desired variable name into the 'prefixed name' box. -// 5. Uncheck 'GLIB types (guint8*)' -// 6. Check 'Save as RGB565 (16-bit)' -// 7. Press export to save your image. -// Assuming 'image_name' was typed in the 'prefixed name' box of step 4, -// you can have to include the c file, then using the image can be done with: -// tft.drawRGBBitmap(0, 0, image_name.pixel_data, image_name.width, image_name.height); -// See also https://forum.pjrc.com/threads/35575-Export-for-ILI9341_t3-with-GIMP - -#include "SPI.h" -#include -#include "dragon.h" - -// For the Adafruit shield, these are the default. -//#define TFT_DC 9 -//#define TFT_CS 10 - -// Feather 32u4 or M0 with TFT FeatherWing: -#define TFT_DC 10 -#define TFT_CS 9 -// ESP8266: -//#define TFT_DC 15 -//#define TFT_CS 0 -// Other boards (including Feather boards) may have other pinouts; -// see learn.adafruit.com/adafruit-2-4-tft-touch-screen-featherwing/pinouts - -Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC); -// If using the breakout, change pins as desired -//Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO); - -void setup() { - tft.begin(); -} - -void loop(void) { - for(uint8_t r=0; r<4; r++) { - tft.setRotation(r); - tft.fillScreen(ILI9341_BLACK); - for(uint8_t j=0; j<20; j++) { - tft.drawRGBBitmap( - random(-DRAGON_WIDTH , tft.width()), - random(-DRAGON_HEIGHT, tft.height()), -#if defined(__AVR__) || defined(ESP8266) - dragonBitmap, -#else - // Some non-AVR MCU's have a "flat" memory model and don't - // distinguish between flash and RAM addresses. In this case, - // the RAM-resident-optimized drawRGBBitmap in the ILI9341 - // library can be invoked by forcibly type-converting the - // PROGMEM bitmap pointer to a non-const uint16_t *. - (uint16_t *)dragonBitmap, -#endif - DRAGON_WIDTH, DRAGON_HEIGHT); - delay(1); // Allow ESP8266 to handle watchdog & WiFi stuff - } - delay(3000); - } -} diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/spitftbitmap/spitftbitmap.ino b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/spitftbitmap/spitftbitmap.ino deleted file mode 100644 index 7e2fedc5e..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/spitftbitmap/spitftbitmap.ino +++ /dev/null @@ -1,218 +0,0 @@ -/*************************************************** - This is our Bitmap drawing example for the Adafruit ILI9341 Breakout and Shield - ----> http://www.adafruit.com/products/1651 - - Check out the links above for our tutorials and wiring diagrams - These displays use SPI to communicate, 4 or 5 pins are required to - interface (RST is optional) - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing - products from Adafruit! - - Written by Limor Fried/Ladyada for Adafruit Industries. - MIT license, all text above must be included in any redistribution - ****************************************************/ - - -#include // Core graphics library -#include "Adafruit_ILI9341.h" // Hardware-specific library -#include -#include - -// TFT display and SD card will share the hardware SPI interface. -// Hardware SPI pins are specific to the Arduino board type and -// cannot be remapped to alternate pins. For Arduino Uno, -// Duemilanove, etc., pin 11 = MOSI, pin 12 = MISO, pin 13 = SCK. - -#define TFT_DC 9 -#define TFT_CS 10 -Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC); - -#define SD_CS 4 - -void setup(void) { - Serial.begin(9600); - - tft.begin(); - - yield(); - - Serial.print("Initializing SD card..."); - if (!SD.begin(SD_CS)) { - Serial.println("failed!"); - } - Serial.println("OK!"); - -} - -void loop() { - for(uint8_t r=0; r<4; r++) { - tft.setRotation(r); - tft.fillScreen(ILI9341_BLUE); - for(int8_t i=-2; i<1; i++) { - bmpDraw("purple.bmp", - (tft.width() / 2) + (i * 120), - (tft.height() / 2) + (i * 160)); - } - } -} - -// This function opens a Windows Bitmap (BMP) file and -// displays it at the given coordinates. It's sped up -// by reading many pixels worth of data at a time -// (rather than pixel by pixel). Increasing the buffer -// size takes more of the Arduino's precious RAM but -// makes loading a little faster. 20 pixels seems a -// good balance. - -#define BUFFPIXEL 20 - -void bmpDraw(char *filename, int16_t x, int16_t y) { - - File bmpFile; - int bmpWidth, bmpHeight; // W+H in pixels - uint8_t bmpDepth; // Bit depth (currently must be 24) - uint32_t bmpImageoffset; // Start of image data in file - uint32_t rowSize; // Not always = bmpWidth; may have padding - uint8_t sdbuffer[3*BUFFPIXEL]; // pixel buffer (R+G+B per pixel) - uint8_t buffidx = sizeof(sdbuffer); // Current position in sdbuffer - boolean goodBmp = false; // Set to true on valid header parse - boolean flip = true; // BMP is stored bottom-to-top - int w, h, row, col, x2, y2, bx1, by1; - uint8_t r, g, b; - uint32_t pos = 0, startTime = millis(); - - if((x >= tft.width()) || (y >= tft.height())) return; - - Serial.println(); - Serial.print(F("Loading image '")); - Serial.print(filename); - Serial.println('\''); - - // Open requested file on SD card - if ((bmpFile = SD.open(filename)) == NULL) { - Serial.print(F("File not found")); - return; - } - - // Parse BMP header - if(read16(bmpFile) == 0x4D42) { // BMP signature - Serial.print(F("File size: ")); Serial.println(read32(bmpFile)); - (void)read32(bmpFile); // Read & ignore creator bytes - bmpImageoffset = read32(bmpFile); // Start of image data - Serial.print(F("Image Offset: ")); Serial.println(bmpImageoffset, DEC); - // Read DIB header - Serial.print(F("Header size: ")); Serial.println(read32(bmpFile)); - bmpWidth = read32(bmpFile); - bmpHeight = read32(bmpFile); - if(read16(bmpFile) == 1) { // # planes -- must be '1' - bmpDepth = read16(bmpFile); // bits per pixel - Serial.print(F("Bit Depth: ")); Serial.println(bmpDepth); - if((bmpDepth == 24) && (read32(bmpFile) == 0)) { // 0 = uncompressed - - goodBmp = true; // Supported BMP format -- proceed! - Serial.print(F("Image size: ")); - Serial.print(bmpWidth); - Serial.print('x'); - Serial.println(bmpHeight); - - // BMP rows are padded (if needed) to 4-byte boundary - rowSize = (bmpWidth * 3 + 3) & ~3; - - // If bmpHeight is negative, image is in top-down order. - // This is not canon but has been observed in the wild. - if(bmpHeight < 0) { - bmpHeight = -bmpHeight; - flip = false; - } - - // Crop area to be loaded - x2 = x + bmpWidth - 1; // Lower-right corner - y2 = y + bmpHeight - 1; - if((x2 >= 0) && (y2 >= 0)) { // On screen? - w = bmpWidth; // Width/height of section to load/display - h = bmpHeight; - bx1 = by1 = 0; // UL coordinate in BMP file - if(x < 0) { // Clip left - bx1 = -x; - x = 0; - w = x2 + 1; - } - if(y < 0) { // Clip top - by1 = -y; - y = 0; - h = y2 + 1; - } - if(x2 >= tft.width()) w = tft.width() - x; // Clip right - if(y2 >= tft.height()) h = tft.height() - y; // Clip bottom - - // Set TFT address window to clipped image bounds - tft.startWrite(); // Requires start/end transaction now - tft.setAddrWindow(x, y, w, h); - - for (row=0; row= sizeof(sdbuffer)) { // Indeed - tft.endWrite(); // End TFT transaction - bmpFile.read(sdbuffer, sizeof(sdbuffer)); - buffidx = 0; // Set index to beginning - tft.startWrite(); // Start new TFT transaction - } - // Convert pixel from BMP to TFT format, push to display - b = sdbuffer[buffidx++]; - g = sdbuffer[buffidx++]; - r = sdbuffer[buffidx++]; - tft.writePixel(tft.color565(r,g,b)); - } // end pixel - } // end scanline - tft.endWrite(); // End last TFT transaction - } // end onscreen - Serial.print(F("Loaded in ")); - Serial.print(millis() - startTime); - Serial.println(" ms"); - } // end goodBmp - } - } - - bmpFile.close(); - if(!goodBmp) Serial.println(F("BMP format not recognized.")); -} - -// These read 16- and 32-bit types from the SD card file. -// BMP data is stored little-endian, Arduino is little-endian too. -// May need to reverse subscript order if porting elsewhere. - -uint16_t read16(File &f) { - uint16_t result; - ((uint8_t *)&result)[0] = f.read(); // LSB - ((uint8_t *)&result)[1] = f.read(); // MSB - return result; -} - -uint32_t read32(File &f) { - uint32_t result; - ((uint8_t *)&result)[0] = f.read(); // LSB - ((uint8_t *)&result)[1] = f.read(); - ((uint8_t *)&result)[2] = f.read(); - ((uint8_t *)&result)[3] = f.read(); // MSB - return result; -} diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/touchpaint/touchpaint.ino b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/touchpaint/touchpaint.ino deleted file mode 100644 index 227abdc84..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/touchpaint/touchpaint.ino +++ /dev/null @@ -1,146 +0,0 @@ -/*************************************************** - This is our touchscreen painting example for the Adafruit ILI9341 Shield - ----> http://www.adafruit.com/products/1651 - - Check out the links above for our tutorials and wiring diagrams - These displays use SPI to communicate, 4 or 5 pins are required to - interface (RST is optional) - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing - products from Adafruit! - - Written by Limor Fried/Ladyada for Adafruit Industries. - MIT license, all text above must be included in any redistribution - ****************************************************/ - - -#include // Core graphics library -#include -#include // this is needed even tho we aren't using it -#include -#include - -// This is calibration data for the raw touch data to the screen coordinates -#define TS_MINX 150 -#define TS_MINY 130 -#define TS_MAXX 3800 -#define TS_MAXY 4000 - -// The STMPE610 uses hardware SPI on the shield, and #8 -#define STMPE_CS 8 -Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS); - -// The display also uses hardware SPI, plus #9 & #10 -#define TFT_CS 10 -#define TFT_DC 9 -Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC); - -// Size of the color selection boxes and the paintbrush size -#define BOXSIZE 40 -#define PENRADIUS 3 -int oldcolor, currentcolor; - -void setup(void) { - // while (!Serial); // used for leonardo debugging - - Serial.begin(9600); - Serial.println(F("Touch Paint!")); - - tft.begin(); - - if (!ts.begin()) { - Serial.println("Couldn't start touchscreen controller"); - while (1); - } - Serial.println("Touchscreen started"); - - tft.fillScreen(ILI9341_BLACK); - - // make the color selection boxes - tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED); - tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW); - tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN); - tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN); - tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE); - tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA); - - // select the current color 'red' - tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - currentcolor = ILI9341_RED; -} - - -void loop() -{ - // See if there's any touch data for us - if (ts.bufferEmpty()) { - return; - } - /* - // You can also wait for a touch - if (! ts.touched()) { - return; - } - */ - - // Retrieve a point - TS_Point p = ts.getPoint(); - - /* - Serial.print("X = "); Serial.print(p.x); - Serial.print("\tY = "); Serial.print(p.y); - Serial.print("\tPressure = "); Serial.println(p.z); - */ - - // Scale from ~0->4000 to tft.width using the calibration #'s - p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width()); - p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height()); - - /* - Serial.print("("); Serial.print(p.x); - Serial.print(", "); Serial.print(p.y); - Serial.println(")"); - */ - - if (p.y < BOXSIZE) { - oldcolor = currentcolor; - - if (p.x < BOXSIZE) { - currentcolor = ILI9341_RED; - tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*2) { - currentcolor = ILI9341_YELLOW; - tft.drawRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*3) { - currentcolor = ILI9341_GREEN; - tft.drawRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*4) { - currentcolor = ILI9341_CYAN; - tft.drawRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*5) { - currentcolor = ILI9341_BLUE; - tft.drawRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*6) { - currentcolor = ILI9341_MAGENTA; - tft.drawRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } - - if (oldcolor != currentcolor) { - if (oldcolor == ILI9341_RED) - tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED); - if (oldcolor == ILI9341_YELLOW) - tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW); - if (oldcolor == ILI9341_GREEN) - tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN); - if (oldcolor == ILI9341_CYAN) - tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN); - if (oldcolor == ILI9341_BLUE) - tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE); - if (oldcolor == ILI9341_MAGENTA) - tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA); - } - } - if (((p.y-PENRADIUS) > BOXSIZE) && ((p.y+PENRADIUS) < tft.height())) { - tft.fillCircle(p.x, p.y, PENRADIUS, currentcolor); - } -} diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/touchpaint_featherwing/.mega2560.test.skip b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/touchpaint_featherwing/.mega2560.test.skip deleted file mode 100644 index e69de29bb..000000000 diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/touchpaint_featherwing/touchpaint_featherwing.ino b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/touchpaint_featherwing/touchpaint_featherwing.ino deleted file mode 100644 index 5d317abcd..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/examples/touchpaint_featherwing/touchpaint_featherwing.ino +++ /dev/null @@ -1,165 +0,0 @@ -/*************************************************** - This is our touchscreen painting example for the Adafruit TFT FeatherWing - ----> http://www.adafruit.com/products/3315 - - Check out the links above for our tutorials and wiring diagrams - - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing - products from Adafruit! - - Written by Limor Fried/Ladyada for Adafruit Industries. - MIT license, all text above must be included in any redistribution - ****************************************************/ - -#include -#include // this is needed even tho we aren't using it - -#include // Core graphics library -#include // Hardware-specific library -#include - -#ifdef ESP8266 - #define STMPE_CS 16 - #define TFT_CS 0 - #define TFT_DC 15 - #define SD_CS 2 -#endif -#ifdef ESP32 - #define STMPE_CS 32 - #define TFT_CS 15 - #define TFT_DC 33 - #define SD_CS 14 -#endif -#ifdef TEENSYDUINO - #define TFT_DC 10 - #define TFT_CS 4 - #define STMPE_CS 3 - #define SD_CS 8 -#endif -#ifdef ARDUINO_STM32_FEATHER - #define TFT_DC PB4 - #define TFT_CS PA15 - #define STMPE_CS PC7 - #define SD_CS PC5 -#endif -#ifdef ARDUINO_NRF52_FEATHER /* BSP 0.6.5 and higher! */ - #define TFT_DC 11 - #define TFT_CS 31 - #define STMPE_CS 30 - #define SD_CS 27 -#endif -#if defined(ARDUINO_MAX32620FTHR) || defined(ARDUINO_MAX32630FTHR) - #define TFT_DC P5_4 - #define TFT_CS P5_3 - #define STMPE_CS P3_3 - #define SD_CS P3_2 -#endif - -// Anything else! -#if defined (__AVR_ATmega32U4__) || defined(ARDUINO_SAMD_FEATHER_M0) || defined (__AVR_ATmega328P__) || defined(ARDUINO_SAMD_ZERO) || defined(__SAMD51__) || defined(__SAM3X8E__) - #define STMPE_CS 6 - #define TFT_CS 9 - #define TFT_DC 10 - #define SD_CS 5 -#endif - - -Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC); -Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS); - - -// This is calibration data for the raw touch data to the screen coordinates -#define TS_MINX 3800 -#define TS_MAXX 100 -#define TS_MINY 100 -#define TS_MAXY 3750 - -// Size of the color selection boxes and the paintbrush size -#define BOXSIZE 40 -#define PENRADIUS 3 -int oldcolor, currentcolor; - -void setup(void) { - Serial.begin(115200); - - delay(10); - Serial.println("FeatherWing TFT"); - if (!ts.begin()) { - Serial.println("Couldn't start touchscreen controller"); - while (1); - } - Serial.println("Touchscreen started"); - - tft.begin(); - tft.fillScreen(ILI9341_BLACK); - - // make the color selection boxes - tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED); - tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW); - tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN); - tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN); - tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE); - tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA); - - // select the current color 'red' - tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - currentcolor = ILI9341_RED; -} - -void loop() { - // Retrieve a point - TS_Point p = ts.getPoint(); - - Serial.print("X = "); Serial.print(p.x); - Serial.print("\tY = "); Serial.print(p.y); - Serial.print("\tPressure = "); Serial.println(p.z); - - - // Scale from ~0->4000 to tft.width using the calibration #'s - p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width()); - p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height()); - - if (p.y < BOXSIZE) { - oldcolor = currentcolor; - - if (p.x < BOXSIZE) { - currentcolor = ILI9341_RED; - tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*2) { - currentcolor = ILI9341_YELLOW; - tft.drawRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*3) { - currentcolor = ILI9341_GREEN; - tft.drawRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*4) { - currentcolor = ILI9341_CYAN; - tft.drawRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*5) { - currentcolor = ILI9341_BLUE; - tft.drawRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } else if (p.x < BOXSIZE*6) { - currentcolor = ILI9341_MAGENTA; - tft.drawRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE); - } - - if (oldcolor != currentcolor) { - if (oldcolor == ILI9341_RED) - tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED); - if (oldcolor == ILI9341_YELLOW) - tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW); - if (oldcolor == ILI9341_GREEN) - tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN); - if (oldcolor == ILI9341_CYAN) - tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN); - if (oldcolor == ILI9341_BLUE) - tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE); - if (oldcolor == ILI9341_MAGENTA) - tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA); - } - } - - if (((p.y-PENRADIUS) > 0) && ((p.y+PENRADIUS) < tft.height())) { - tft.fillCircle(p.x, p.y, PENRADIUS, currentcolor); - } -} diff --git a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/library.properties b/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/library.properties deleted file mode 100644 index 8c93d49ee..000000000 --- a/lib/lib_display/Adafruit_ILI9341-1.2.0-Tasmota-1.0/library.properties +++ /dev/null @@ -1,9 +0,0 @@ -name=Adafruit ILI9341 -version=1.2.0 -author=Adafruit -maintainer=Adafruit -sentence=Library for Adafruit ILI9341 displays -paragraph=Library for Adafruit ILI9341 displays -category=Display -url=https://github.com/adafruit/Adafruit_ILI9341 -architectures=* diff --git a/lib/lib_display/Arduino_ST7789-gemu-1.0/Arduino_ST7789.cpp b/lib/lib_display/Arduino_ST7789-gemu-1.0/Arduino_ST7789.cpp index 9946286b2..7347fa74f 100644 --- a/lib/lib_display/Arduino_ST7789-gemu-1.0/Arduino_ST7789.cpp +++ b/lib/lib_display/Arduino_ST7789-gemu-1.0/Arduino_ST7789.cpp @@ -21,6 +21,8 @@ ST7789_LIGHTGREY,ST7789_DARKGREY,ST7789_ORANGE,ST7789_GREENYELLOW,ST7789_PINK}; #define ST7789_DIMMER #endif + + uint16_t Arduino_ST7789::GetColorFromIndex(uint8_t index) { if (index>=sizeof(ST7789_colors)/2) index=0; return ST7789_colors[index]; @@ -50,7 +52,7 @@ inline uint16_t swapcolor(uint16_t x) { } #if defined (SPI_HAS_TRANSACTION) - static SPISettings mySPISettings; + static SPISettings ST7789_SPISettings; #elif defined (__AVR__) || defined(CORE_TEENSY) static uint8_t SPCRbackup; static uint8_t mySPCR; @@ -58,7 +60,7 @@ inline uint16_t swapcolor(uint16_t x) { #if defined (SPI_HAS_TRANSACTION) -#define SPI_BEGIN_TRANSACTION() if (_hwSPI) SPI.beginTransaction(mySPISettings) +#define SPI_BEGIN_TRANSACTION() if (_hwSPI) SPI.beginTransaction(ST7789_SPISettings) #define SPI_END_TRANSACTION() if (_hwSPI) SPI.endTransaction() #else #define SPI_BEGIN_TRANSACTION() (void) @@ -217,26 +219,28 @@ void Arduino_ST7789::displayInit(const uint8_t *addr) { uint16_t ms; //<----------------------------------------------------------------------------------------- DC_HIGH(); - #if defined(USE_FAST_IO) + if (!_hwSPI) { +#if defined(USE_FAST_IO) *clkport |= clkpinmask; - #else +#else digitalWrite(_sclk, HIGH); - #endif +#endif + } //<----------------------------------------------------------------------------------------- numCommands = pgm_read_byte(addr++); // Number of commands to follow - while(numCommands--) { // For each command... + while (numCommands--) { // For each command... writecommand(pgm_read_byte(addr++)); // Read, issue command numArgs = pgm_read_byte(addr++); // Number of args to follow ms = numArgs & ST_CMD_DELAY; // If hibit set, delay follows args numArgs &= ~ST_CMD_DELAY; // Mask out delay bit - while(numArgs--) { // For each argument... + while (numArgs--) { // For each argument... writedata(pgm_read_byte(addr++)); // Read, issue argument } - if(ms) { + if (ms) { ms = pgm_read_byte(addr++); // Read post-command delay time (ms) - if(ms == 255) ms = 500; // If 255, delay for 500 ms + if (ms == 255) ms = 500; // If 255, delay for 500 ms delay(ms); } } @@ -270,16 +274,16 @@ void Arduino_ST7789::commonInit(const uint8_t *cmdList) { dcport = portOutputRegister(digitalPinToPort(_dc)); dcpinmask = digitalPinToBitMask(_dc); if (_cs>=0) { - csport = portOutputRegister(digitalPinToPort(_cs)); - cspinmask = digitalPinToBitMask(_cs); + csport = portOutputRegister(digitalPinToPort(_cs)); + cspinmask = digitalPinToBitMask(_cs); } - #endif if(_hwSPI) { // Using hardware SPI #if defined (SPI_HAS_TRANSACTION) SPI.begin(); - mySPISettings = SPISettings(24000000, MSBFIRST, SPI_MODE2); + // ST7789_SPISettings = SPISettings(24000000, MSBFIRST, SPI_MODE2); + ST7789_SPISettings = SPISettings(1000000, MSBFIRST, SPI_MODE2); #elif defined (__AVR__) || defined(CORE_TEENSY) SPCRbackup = SPCR; SPI.begin(); @@ -318,7 +322,7 @@ void Arduino_ST7789::commonInit(const uint8_t *cmdList) { delay(50); } - if(cmdList) + if (cmdList) displayInit(cmdList); } @@ -391,7 +395,6 @@ void Arduino_ST7789::setAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16 setAddrWindow_int(x0,y0,x1-1,y1-1); } - void Arduino_ST7789::setAddrWindow_int(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) { uint16_t x_start = x0 + _xstart, x_end = x1 + _xstart; uint16_t y_start = y0 + _ystart, y_end = y1 + _ystart; diff --git a/lib/lib_display/Arduino_ST7789-gemu-1.0/Arduino_ST7789.h b/lib/lib_display/Arduino_ST7789-gemu-1.0/Arduino_ST7789.h index b8cbabeb8..ebd39dc25 100644 --- a/lib/lib_display/Arduino_ST7789-gemu-1.0/Arduino_ST7789.h +++ b/lib/lib_display/Arduino_ST7789-gemu-1.0/Arduino_ST7789.h @@ -15,6 +15,10 @@ #include #include +#ifdef ESP8266 +#define USE_FAST_IO +#endif + #if defined(__AVR__) || defined(CORE_TEENSY) #include #define USE_FAST_IO @@ -177,7 +181,7 @@ class Arduino_ST7789 : public Renderer { int8_t _cs, _dc, _rst, _sid, _sclk, _bp; #if defined(USE_FAST_IO) - volatile RwReg *dataport, *clkport, *csport, *dcport; + volatile uint32_t *dataport, *clkport, *csport, *dcport; #if defined(__AVR__) || defined(CORE_TEENSY) // 8 bit! uint8_t datapinmask, clkpinmask, cspinmask, dcpinmask; diff --git a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp index c05faee13..76d78e077 100644 --- a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp +++ b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp @@ -87,6 +87,14 @@ void Renderer::Updateframe() { } + +void Renderer::setTextSize(uint8_t sf) { + if (sf < 1) sf = 1; + if (sf > 4) sf = 4; + tsize = sf; + Adafruit_GFX::setTextSize(sf); +} + /** * @brief: this draws a charactor on the frame buffer but not refresh */ @@ -96,14 +104,25 @@ void Renderer::DrawCharAt(int16_t x, int16_t y, char ascii_char,int16_t colored) int i, j; unsigned int char_offset = (ascii_char - ' ') * xfont->Height * (xfont->Width / 8 + (xfont->Width % 8 ? 1 : 0)); const unsigned char* ptr = &xfont->table[char_offset]; + uint8_t sf = tsize; for (j = 0; j < xfont->Height; j++) { for (i = 0; i < xfont->Width; i++) { if (pgm_read_byte(ptr) & (0x80 >> (i % 8))) { - writePixel(x + i, y + j, colored); + if (sf == 1) { + writePixel(x + i, y + j, colored); + } else { + writeFillRect(x + i * sf, y + j * sf, sf, sf, colored); + } } else { // fill background - if (!drawmode) writePixel(x + i, y + j, textbgcolor); + if (!drawmode) { + if (sf == 1) { + writePixel(x + i, y + j, textbgcolor); + } else { + writeFillRect(x + i * sf, y + j * sf, sf, sf, textbgcolor); + } + } } if (i % 8 == 7) { ptr++; @@ -146,8 +165,8 @@ void Renderer::DrawStringAt(int16_t x, int16_t y, const char* text, uint16_t col if (flag) { - x=(x-1)*xfont->Width; - y=(y-1)*xfont->Height; + x=(x-1)*xfont->Width*tsize; + y=(y-1)*xfont->Height*tsize; refcolumn = x; } @@ -159,7 +178,7 @@ void Renderer::DrawStringAt(int16_t x, int16_t y, const char* text, uint16_t col /* Display one character on EPD */ DrawCharAt(refcolumn, y, *p_text, colored); /* increment the column position */ - refcolumn += xfont->Width; + refcolumn += xfont->Width*tsize; /* Point on the next character */ p_text++; counter++; @@ -232,6 +251,7 @@ void Renderer::setTextFont(uint8_t f) { #else #ifdef USE_EPD_FONTS switch (font) { + case 1: selected_font = &Font12; break; case 2: @@ -520,13 +540,26 @@ void Renderer::drawPixel(int16_t x, int16_t y, uint16_t color) { } +extern uint16_t index_colors[MAX_INDEXCOLORS]; + +// this is called for every driver void Renderer::setDrawMode(uint8_t mode) { drawmode=mode; + for (uint32_t count = 0; count < MAX_INDEXCOLORS; count++) { + index_colors[count] = GetColorFromIndex(count); + } } void Renderer::invertDisplay(boolean i) { } +void Renderer::setScrollMargins(uint16_t top, uint16_t bottom) { + +} +void Renderer::scrollTo(uint16_t y) { + +} + void VButton::xdrawButton(bool inverted) { wr_redir=1; drawButton(inverted); @@ -626,4 +659,5 @@ uint16_t VButton::UpdateSlider(int16_t x, int16_t y) { + /* END OF FILE */ diff --git a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.h b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.h index b50745686..507267d37 100644 --- a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.h +++ b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.h @@ -9,6 +9,8 @@ #define WHITE 1 #define INVERSE 2 +#define MAX_INDEXCOLORS 32 + // depends on GFX driver // GFX patched // a. in class GFX setCursor,setTextSize => virtual @@ -36,15 +38,19 @@ public: virtual void pushColors(uint16_t *data, uint16_t len, boolean first); virtual void setAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1); virtual void invertDisplay(boolean i); + virtual void setScrollMargins(uint16_t top, uint16_t bottom); + virtual void scrollTo(uint16_t y); void setDrawMode(uint8_t mode); uint8_t drawmode; virtual void FastString(uint16_t x,uint16_t y,uint16_t tcolor, const char* str); + void setTextSize(uint8_t s); private: void DrawCharAt(int16_t x, int16_t y, char ascii_char,int16_t colored); inline void drawFastVLineInternal(int16_t x, int16_t y, int16_t h, uint16_t color) __attribute__((always_inline)); inline void drawFastHLineInternal(int16_t x, int16_t y, int16_t w, uint16_t color) __attribute__((always_inline)); sFONT *selected_font; uint8_t font; + uint8_t tsize = 1; }; typedef union { diff --git a/lib/lib_display/ILI9341-gemu-1.0/ILI9341_2.cpp b/lib/lib_display/ILI9341-gemu-1.0/ILI9341_2.cpp index 428f7cb80..873894c5c 100644 --- a/lib/lib_display/ILI9341-gemu-1.0/ILI9341_2.cpp +++ b/lib/lib_display/ILI9341-gemu-1.0/ILI9341_2.cpp @@ -46,7 +46,7 @@ * */ -#ifdef ESP32 +//#ifdef ESP32 #include "ILI9341_2.h" #include @@ -57,25 +57,26 @@ #define ILI9341_2_DIMMER #undef ESP32_PWM_CHANNEL #define ESP32_PWM_CHANNEL 1 -#define ILI9341_2_HWSPI #endif +#define ILI9341_2_HWSPI + #if defined (ILI9341_2_HWSPI) #define SPI_BEGIN_TRANSACTION() if (_hwspi) spi2->beginTransaction(sspi2) #define SPI_END_TRANSACTION() if (_hwspi) spi2->endTransaction() #else -#define SPI_BEGIN_TRANSACTION() (void) -#define SPI_END_TRANSACTION() (void) +#define SPI_BEGIN_TRANSACTION() +#define SPI_END_TRANSACTION() #endif -const uint16_t ili9341_2_colors[]={ILI9341_2_BLACK,ILI9341_2_WHITE,ILI9341_2_RED,ILI9341_2_GREEN,ILI9341_2_BLUE,ILI9341_2_CYAN,ILI9341_2_MAGENTA,\ - ILI9341_2_YELLOW,ILI9341_2_NAVY,ILI9341_2_DARKGREEN,ILI9341_2_DARKCYAN,ILI9341_2_MAROON,ILI9341_2_PURPLE,ILI9341_2_OLIVE,\ -ILI9341_2_LIGHTGREY,ILI9341_2_DARKGREY,ILI9341_2_ORANGE,ILI9341_2_GREENYELLOW,ILI9341_2_PINK}; +const uint16_t ili9341_2_colors[]={ILI9341_BLACK,ILI9341_WHITE,ILI9341_RED,ILI9341_GREEN,ILI9341_BLUE,ILI9341_CYAN,ILI9341_MAGENTA,\ + ILI9341_YELLOW,ILI9341_NAVY,ILI9341_DARKGREEN,ILI9341_DARKCYAN,ILI9341_MAROON,ILI9341_PURPLE,ILI9341_OLIVE,\ +ILI9341_LIGHTGREY,ILI9341_DARKGREY,ILI9341_ORANGE,ILI9341_GREENYELLOW,ILI9341_PINK}; uint16_t ILI9341_2::GetColorFromIndex(uint8_t index) { - if (index>=sizeof(ili9341_2_colors)/2) index=0; + if (index >= sizeof(ili9341_2_colors) / 2) index = 0; return ili9341_2_colors[index]; } @@ -135,7 +136,7 @@ static const uint8_t PROGMEM ili9342_initcmd[] = { 0x00 // End of list }; -ILI9341_2::ILI9341_2(int8_t cs, int8_t mosi, int8_t miso, int8_t sclk, int8_t res, int8_t dc, int8_t bp) : Renderer(ILI9341_2_TFTWIDTH, ILI9341_2_TFTHEIGHT) { +ILI9341_2::ILI9341_2(int8_t cs, int8_t mosi, int8_t miso, int8_t sclk, int8_t res, int8_t dc, int8_t bp, int8_t spibus) : Renderer(ILI9341_TFTWIDTH, ILI9341_TFTHEIGHT) { _cs = cs; _mosi = mosi; _miso = miso; @@ -143,20 +144,22 @@ ILI9341_2::ILI9341_2(int8_t cs, int8_t mosi, int8_t miso, int8_t sclk, int8_t re _res = res; _dc = dc; _bp = bp; - _hwspi = 1; + _hwspi = 1; // sign ili9341 + _spibus = spibus; } -// special init for ILI9342 -ILI9341_2::ILI9341_2(int8_t cs, int8_t res, int8_t dc, int8_t bp) : Renderer(ILI9341_2_TFTWIDTH, ILI9341_2_TFTHEIGHT) { +// special init for ILI9342 uses SPI1 previously defined with SDCard +ILI9341_2::ILI9341_2(int8_t cs, int8_t res, int8_t dc, int8_t bp) : Renderer(ILI9341_TFTWIDTH, ILI9341_TFTHEIGHT) { _cs = cs; _res = res; _dc = dc; _bp = bp; - _hwspi = 2; + _hwspi = 2; // sign ili9342 + _spibus = 1; } -#define ILI9341_2_CS_LOW digitalWrite( _cs, LOW); -#define ILI9341_2_CS_HIGH digitalWrite( _cs, HIGH); +#define ILI9341_2_CS_LOW if (_cs>=0) digitalWrite( _cs, LOW); +#define ILI9341_2_CS_HIGH if (_cs>=0) digitalWrite( _cs, HIGH); void ILI9341_2::writecmd(uint8_t d) { @@ -172,12 +175,12 @@ void ILI9341_2::writecmd(uint8_t d) { void ILI9341_2::init(uint16_t width, uint16_t height) { //sspi2 = SPISettings(2500000, MSBFIRST, SPI_MODE3); - if (_hwspi==2) { - iwidth=ILI9341_2_TFTWIDTH; - iheight=ILI9341_2_TFTHEIGHT; + if (_hwspi == 2) { + iwidth = ILI9341_TFTWIDTH; + iheight = ILI9341_TFTHEIGHT; } else { - iwidth=ILI9341_2_TFTHEIGHT; - iheight=ILI9341_2_TFTWIDTH; + iwidth = ILI9341_TFTHEIGHT; + iheight = ILI9341_TFTWIDTH; } #ifdef ILI9341_2_HWSPI @@ -187,8 +190,17 @@ void ILI9341_2::init(uint16_t width, uint16_t height) { if (_hwspi==2) { spi2=&SPI; } else { - spi2 = new SPIClass(HSPI); +#ifdef ESP32 + if (_spibus == 2) { + spi2 = new SPIClass(HSPI); + } else { + spi2 = &SPI; + } spi2->begin(_sclk, _miso, _mosi, -1); +#else + SPI.begin(); + spi2 = &SPI; +#endif } #else @@ -205,12 +217,12 @@ void ILI9341_2::init(uint16_t width, uint16_t height) { pinMode(_dc, OUTPUT); digitalWrite(_dc,HIGH); - if (_bp>=0) { + if (_bp >= 0) { pinMode(_bp, OUTPUT); digitalWrite(_bp,HIGH); } - if (_res>=0) { + if (_res >= 0) { pinMode(_res, OUTPUT); digitalWrite(_res, HIGH); delay(100); @@ -227,11 +239,11 @@ void ILI9341_2::init(uint16_t width, uint16_t height) { delay(150); } - if (_bp>=0) { + if (_bp >= 0) { #ifdef ILI9341_2_DIMMER - ledcSetup(ESP32_PWM_CHANNEL,4000,8); - ledcAttachPin(_bp,ESP32_PWM_CHANNEL); - ledcWrite(ESP32_PWM_CHANNEL,128); + ledcSetup(ESP32_PWM_CHANNEL, 4000, 8); + ledcAttachPin(_bp, ESP32_PWM_CHANNEL); + ledcWrite(ESP32_PWM_CHANNEL, 128); #else pinMode(_bp, OUTPUT); #endif @@ -261,11 +273,9 @@ void ILI9341_2::init(uint16_t width, uint16_t height) { #endif ILI9341_2_CS_HIGH - if(x & 0x80) delay(120); + if (x & 0x80) delay(120); } SPI_END_TRANSACTION(); - -// endWrite(); } void ILI9341_2::DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font) { @@ -275,9 +285,9 @@ void ILI9341_2::DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font) { setRotation(rot); setTextFont(font&3); setTextSize(size&7); - setTextColor(ILI9341_2_WHITE,ILI9341_2_BLACK); + setTextColor(ILI9341_WHITE,ILI9341_BLACK); setCursor(0,0); - fillScreen(ILI9341_2_BLACK); + fillScreen(ILI9341_BLACK); } void ILI9341_2::setAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) { @@ -331,21 +341,20 @@ void ILI9341_2::setAddrWindow_int(uint16_t x, uint16_t y, uint16_t w, uint16_t h void ILI9341_2::drawPixel(int16_t x, int16_t y, uint16_t color) { - if((x < 0) ||(x >= _width) || (y < 0) || (y >= _height)) return; - ILI9341_2_CS_LOW - SPI_BEGIN_TRANSACTION(); - setAddrWindow_int(x,y,1,1); + ILI9341_2_CS_LOW + setAddrWindow_int(x,y,1,1); #ifdef ILI9341_2_HWSPI spi2->write16(color); #else spiwrite16(color); #endif + ILI9341_2_CS_HIGH SPI_END_TRANSACTION(); @@ -354,7 +363,7 @@ void ILI9341_2::drawPixel(int16_t x, int16_t y, uint16_t color) { void ILI9341_2::setRotation(uint8_t m) { - if (_hwspi<2) { + if (_hwspi < 2) { rotation = m % 4; // can't be higher than 3 switch (rotation) { case 0: @@ -425,15 +434,14 @@ void ILI9341_2::setRotation(uint8_t m) { void ILI9341_2::drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color) { // Rudimentary clipping - if((x >= _width) || (y >= _height)) return; - if((y+h-1) >= _height) h = _height-y; - - ILI9341_2_CS_LOW + if ((x >= _width) || (y >= _height)) return; + if ((y + h - 1) >= _height) h = _height - y; SPI_BEGIN_TRANSACTION(); - setAddrWindow_int(x, y, 1, h); + ILI9341_2_CS_LOW + setAddrWindow_int(x, y, 1, h); while (h--) { #ifdef ILI9341_2_HWSPI @@ -454,10 +462,11 @@ void ILI9341_2::drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color) { if((x >= _width) || (y >= _height)) return; if((x+w-1) >= _width) w = _width-x; - ILI9341_2_CS_LOW SPI_BEGIN_TRANSACTION(); + ILI9341_2_CS_LOW + setAddrWindow_int(x, y, w, 1); @@ -486,10 +495,11 @@ void ILI9341_2::fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t co if((x + w - 1) >= _width) w = _width - x; if((y + h - 1) >= _height) h = _height - y; - ILI9341_2_CS_LOW SPI_BEGIN_TRANSACTION(); + ILI9341_2_CS_LOW + setAddrWindow_int(x, y, w, h); for (y=h; y>0; y--) { @@ -547,7 +557,7 @@ void ILI9341_2::DisplayOnff(int8_t on) { void ILI9341_2::invertDisplay(boolean i) { ILI9341_2_CS_LOW - writecmd(i ? ILI9341_2_INVOFF : ILI9341_2_INVON); + writecmd(i ? ILI9341_2_INVON : ILI9341_2_INVOFF); ILI9341_2_CS_HIGH } @@ -605,4 +615,25 @@ void ILI9341_2::spiwrite32(uint32_t c) { #endif } -#endif +void ILI9341_2::setScrollMargins(uint16_t top, uint16_t bottom) { + uint16_t height = _height - (top + bottom); + SPI_BEGIN_TRANSACTION(); + ILI9341_2_CS_LOW + writecmd(0x33); + + spiwrite16(top); + spiwrite16(height); + spiwrite16(bottom); + ILI9341_2_CS_HIGH + SPI_END_TRANSACTION(); +} + + +void ILI9341_2::scrollTo(uint16_t y) { + SPI_BEGIN_TRANSACTION(); + ILI9341_2_CS_LOW + writecmd(ILI9341_2_VSCRSADD); + spiwrite16(y); + ILI9341_2_CS_HIGH + SPI_END_TRANSACTION(); +} diff --git a/lib/lib_display/ILI9341-gemu-1.0/ILI9341_2.h b/lib/lib_display/ILI9341-gemu-1.0/ILI9341_2.h index 482df9472..4b39ebf38 100644 --- a/lib/lib_display/ILI9341-gemu-1.0/ILI9341_2.h +++ b/lib/lib_display/ILI9341-gemu-1.0/ILI9341_2.h @@ -22,8 +22,8 @@ #include #include -#define ILI9341_2_TFTWIDTH 320 -#define ILI9341_2_TFTHEIGHT 240 +#define ILI9341_TFTWIDTH 320 +#define ILI9341_TFTHEIGHT 240 #define ILI9341_2_NOP 0x00 ///< No-op register #define ILI9341_2_SWRESET 0x01 ///< Software reset register @@ -81,25 +81,25 @@ // Color definitions -#define ILI9341_2_BLACK 0x0000 /* 0, 0, 0 */ -#define ILI9341_2_NAVY 0x000F /* 0, 0, 128 */ -#define ILI9341_2_DARKGREEN 0x03E0 /* 0, 128, 0 */ -#define ILI9341_2_DARKCYAN 0x03EF /* 0, 128, 128 */ -#define ILI9341_2_MAROON 0x7800 /* 128, 0, 0 */ -#define ILI9341_2_PURPLE 0x780F /* 128, 0, 128 */ -#define ILI9341_2_OLIVE 0x7BE0 /* 128, 128, 0 */ -#define ILI9341_2_LIGHTGREY 0xC618 /* 192, 192, 192 */ -#define ILI9341_2_DARKGREY 0x7BEF /* 128, 128, 128 */ -#define ILI9341_2_BLUE 0x001F /* 0, 0, 255 */ -#define ILI9341_2_GREEN 0x07E0 /* 0, 255, 0 */ -#define ILI9341_2_CYAN 0x07FF /* 0, 255, 255 */ -#define ILI9341_2_RED 0xF800 /* 255, 0, 0 */ -#define ILI9341_2_MAGENTA 0xF81F /* 255, 0, 255 */ -#define ILI9341_2_YELLOW 0xFFE0 /* 255, 255, 0 */ -#define ILI9341_2_WHITE 0xFFFF /* 255, 255, 255 */ -#define ILI9341_2_ORANGE 0xFD20 /* 255, 165, 0 */ -#define ILI9341_2_GREENYELLOW 0xAFE5 /* 173, 255, 47 */ -#define ILI9341_2_PINK 0xF81F +#define ILI9341_BLACK 0x0000 /* 0, 0, 0 */ +#define ILI9341_NAVY 0x000F /* 0, 0, 128 */ +#define ILI9341_DARKGREEN 0x03E0 /* 0, 128, 0 */ +#define ILI9341_DARKCYAN 0x03EF /* 0, 128, 128 */ +#define ILI9341_MAROON 0x7800 /* 128, 0, 0 */ +#define ILI9341_PURPLE 0x780F /* 128, 0, 128 */ +#define ILI9341_OLIVE 0x7BE0 /* 128, 128, 0 */ +#define ILI9341_LIGHTGREY 0xC618 /* 192, 192, 192 */ +#define ILI9341_DARKGREY 0x7BEF /* 128, 128, 128 */ +#define ILI9341_BLUE 0x001F /* 0, 0, 255 */ +#define ILI9341_GREEN 0x07E0 /* 0, 255, 0 */ +#define ILI9341_CYAN 0x07FF /* 0, 255, 255 */ +#define ILI9341_RED 0xF800 /* 255, 0, 0 */ +#define ILI9341_MAGENTA 0xF81F /* 255, 0, 255 */ +#define ILI9341_YELLOW 0xFFE0 /* 255, 255, 0 */ +#define ILI9341_WHITE 0xFFFF /* 255, 255, 255 */ +#define ILI9341_ORANGE 0xFD20 /* 255, 165, 0 */ +#define ILI9341_GREENYELLOW 0xAFE5 /* 173, 255, 47 */ +#define ILI9341_PINK 0xF81F #define MADCTL_2_MY 0x80 ///< Bottom to top @@ -115,7 +115,7 @@ class ILI9341_2 : public Renderer { public: - ILI9341_2(int8_t cs, int8_t mosi, int8_t miso, int8_t sclk, int8_t res, int8_t dc, int8_t bp); + ILI9341_2(int8_t cs, int8_t mosi, int8_t miso, int8_t sclk, int8_t res, int8_t dc, int8_t bp, int8_t spibus); ILI9341_2(int8_t cs, int8_t res, int8_t dc, int8_t bp); void init(uint16_t width, uint16_t height); @@ -141,6 +141,8 @@ class ILI9341_2 : public Renderer { void spiwrite(uint8_t c); void spiwrite16(uint16_t c); void spiwrite32(uint32_t c); + void setScrollMargins(uint16_t top, uint16_t bottom); + void scrollTo(uint16_t y); uint8_t tabcolor; uint8_t dimmer; @@ -151,6 +153,7 @@ class ILI9341_2 : public Renderer { int8_t _res; int8_t _dc; int8_t _bp; + int8_t _spibus; int8_t _hwspi; uint16_t iwidth; uint16_t iheight; diff --git a/platformio.ini b/platformio.ini index 68ebd40a7..37cf9a174 100644 --- a/platformio.ini +++ b/platformio.ini @@ -87,7 +87,8 @@ upload_speed = 115200 upload_resetmethod = nodemcu upload_port = COM5 extra_scripts = ${scripts_defaults.extra_scripts} -lib_ldf_mode = chain+ +lib_ldf_mode = chain +lib_compat_mode = strict shared_libdeps_dir = lib lib_extra_dirs = lib/lib_basic diff --git a/platformio_override_sample.ini b/platformio_override_sample.ini index 37a9b345d..0d77e651d 100644 --- a/platformio_override_sample.ini +++ b/platformio_override_sample.ini @@ -136,7 +136,6 @@ build_flags = ${esp32_defaults.build_flags} ;-DESP32_STAGE=true [library] -lib_ldf_mode = chain+ shared_libdeps_dir = lib ; *** Library disable / enable for variant Tasmota(32). Disable reduces compile time ; *** !!! Disabling needed libs will generate compile errors !!! diff --git a/platformio_tasmota32.ini b/platformio_tasmota32.ini index 61447455c..8bbbe5d0d 100644 --- a/platformio_tasmota32.ini +++ b/platformio_tasmota32.ini @@ -61,7 +61,8 @@ upload_port = ${common.upload_port} upload_resetmethod = ${common.upload_resetmethod} upload_speed = 921600 extra_scripts = ${common.extra_scripts} -lib_ldf_mode = chain+ +lib_ldf_mode = ${common.lib_ldf_mode} +lib_compat_mode = ${common.lib_compat_mode} shared_libdeps_dir = lib lib_extra_dirs = lib/libesp32 diff --git a/platformio_tasmota_env.ini b/platformio_tasmota_env.ini index 97da41979..cd468af55 100644 --- a/platformio_tasmota_env.ini +++ b/platformio_tasmota_env.ini @@ -16,6 +16,8 @@ upload_resetmethod = ${common.upload_resetmethod} upload_speed = ${common.upload_speed} extra_scripts = ${common.extra_scripts} lib_extra_dirs = ${common.lib_extra_dirs} +lib_ldf_mode = ${common.lib_ldf_mode} +lib_compat_mode = ${common.lib_compat_mode} lib_ignore = Servo(esp8266) ESP8266AVRISP diff --git a/platformio_tasmota_env32.ini b/platformio_tasmota_env32.ini index 5a1b1ec93..0452984df 100644 --- a/platformio_tasmota_env32.ini +++ b/platformio_tasmota_env32.ini @@ -16,6 +16,8 @@ extra_scripts = ${common32.extra_scripts} build_unflags = ${common32.build_unflags} build_flags = ${common32.build_flags} lib_extra_dirs = ${common32.lib_extra_dirs} +lib_ldf_mode = ${common32.lib_ldf_mode} +lib_compat_mode = ${common32.lib_compat_mode} lib_ignore = cc1101 ESP32 Azure IoT Arduino diff --git a/tasmota/support.ino b/tasmota/support.ino index 93b78acfb..d58e19f0f 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -1320,8 +1320,8 @@ void DumpConvertTable(void) { */ #endif // ESP8266 -uint32_t ICACHE_RAM_ATTR Pin(uint32_t gpio, uint32_t index = 0); -uint32_t ICACHE_RAM_ATTR Pin(uint32_t gpio, uint32_t index) { +int ICACHE_RAM_ATTR Pin(uint32_t gpio, uint32_t index = 0); +int ICACHE_RAM_ATTR Pin(uint32_t gpio, uint32_t index) { uint16_t real_gpio = gpio << 5; uint16_t mask = 0xFFE0; if (index < GPIO_ANY) { @@ -1333,12 +1333,12 @@ uint32_t ICACHE_RAM_ATTR Pin(uint32_t gpio, uint32_t index) { return i; // Pin number configured for gpio } } - return 99; // No pin used for gpio + return -1; // No pin used for gpio } bool PinUsed(uint32_t gpio, uint32_t index = 0); bool PinUsed(uint32_t gpio, uint32_t index) { - return (Pin(gpio, index) < 99); + return (Pin(gpio, index) > -1); } uint32_t GetPin(uint32_t lpin) { @@ -1569,7 +1569,7 @@ bool ValidSpiPinUsed(uint32_t gpio) { // ESP8266: If SPI pin selected chk if it's not one of the three Hardware SPI pins (12..14) bool result = false; if (PinUsed(gpio)) { - uint32_t pin = Pin(gpio); + int pin = Pin(gpio); result = ((pin < 12) || (pin > 14)); } return result; diff --git a/tasmota/support_tasmota.ino b/tasmota/support_tasmota.ino index 033af4bf6..634405322 100644 --- a/tasmota/support_tasmota.ino +++ b/tasmota/support_tasmota.ino @@ -407,12 +407,12 @@ void SetLedPowerAll(uint32_t state) void SetLedLink(uint32_t state) { - uint32_t led_pin = Pin(GPIO_LEDLNK); + int led_pin = Pin(GPIO_LEDLNK); uint32_t led_inv = TasmotaGlobal.ledlnk_inverted; - if (99 == led_pin) { // Legacy - LED1 is status + if (-1 == led_pin) { // Legacy - LED1 is status SetLedPowerIdx(0, state); } - else if (led_pin < 99) { + else if (led_pin > -1) { if (state) { state = 1; } digitalWrite(led_pin, (led_inv) ? !state : state); } @@ -1655,7 +1655,8 @@ void GpioInit(void) bool valid_cs = (ValidSpiPinUsed(GPIO_SPI_CS) || ValidSpiPinUsed(GPIO_RC522_CS) || (ValidSpiPinUsed(GPIO_NRF24_CS) && ValidSpiPinUsed(GPIO_NRF24_DC)) || - (ValidSpiPinUsed(GPIO_ILI9341_CS) && ValidSpiPinUsed(GPIO_ILI9341_DC)) || + ValidSpiPinUsed(GPIO_ILI9341_CS) || + ValidSpiPinUsed(GPIO_ILI9341_DC) || // there are also boards without cs ValidSpiPinUsed(GPIO_EPAPER29_CS) || ValidSpiPinUsed(GPIO_EPAPER42_CS) || ValidSpiPinUsed(GPIO_ILI9488_CS) || diff --git a/tasmota/xdrv_10_scripter.ino b/tasmota/xdrv_10_scripter.ino index 3022bfb20..330ddc13d 100755 --- a/tasmota/xdrv_10_scripter.ino +++ b/tasmota/xdrv_10_scripter.ino @@ -4326,14 +4326,15 @@ int16_t Run_script_sub(const char *type, int8_t tlen, struct GVARS *gv) { goto next_line; } #ifdef USE_SENDMAIL +/* else if (!strncmp(lp, "sm", 2)) { lp+=3; char tmp[256]; Replace_Cmd_Vars(lp ,1 , tmp, sizeof(tmp)); SendMail(tmp); goto next_line; - } -#endif + }*/ +#endif else if (!strncmp(lp,"=>",2) || !strncmp(lp,"->",2) || !strncmp(lp,"+>",2) || !strncmp(lp,"print",5)) { // execute cmd uint8_t sflag = 0,pflg = 0,svmqtt,swll; diff --git a/tasmota/xdrv_13_display.ino b/tasmota/xdrv_13_display.ino index 817898d56..a69504d78 100755 --- a/tasmota/xdrv_13_display.ino +++ b/tasmota/xdrv_13_display.ino @@ -64,6 +64,7 @@ const uint8_t DISPLAY_LOG_ROWS = 32; // Number of lines in display log #define D_CMND_DISP_WIDTH "Width" #define D_CMND_DISP_HEIGHT "Height" #define D_CMND_DISP_BLINKRATE "Blinkrate" +#define D_CMND_DISP_BATCH "Batch" enum XdspFunctions { FUNC_DISPLAY_INIT_DRIVER, FUNC_DISPLAY_INIT, FUNC_DISPLAY_EVERY_50_MSECOND, FUNC_DISPLAY_EVERY_SECOND, FUNC_DISPLAY_MODEL, FUNC_DISPLAY_MODE, FUNC_DISPLAY_POWER, @@ -72,19 +73,31 @@ enum XdspFunctions { FUNC_DISPLAY_INIT_DRIVER, FUNC_DISPLAY_INIT, FUNC_DISPLAY_E FUNC_DISPLAY_DRAW_CIRCLE, FUNC_DISPLAY_FILL_CIRCLE, FUNC_DISPLAY_DRAW_RECTANGLE, FUNC_DISPLAY_FILL_RECTANGLE, FUNC_DISPLAY_TEXT_SIZE, FUNC_DISPLAY_FONT_SIZE, FUNC_DISPLAY_ROTATION, FUNC_DISPLAY_DRAW_STRING, - FUNC_DISPLAY_DIM, FUNC_DISPLAY_BLINKRATE }; + FUNC_DISPLAY_DIM, FUNC_DISPLAY_BLINKRATE +#ifdef USE_UFILESYS + ,FUNC_DISPLAY_BATCH +#endif + }; enum DisplayInitModes { DISPLAY_INIT_MODE, DISPLAY_INIT_PARTIAL, DISPLAY_INIT_FULL }; const char kDisplayCommands[] PROGMEM = D_PRFX_DISPLAY "|" // Prefix "|" D_CMND_DISP_MODEL "|" D_CMND_DISP_WIDTH "|" D_CMND_DISP_HEIGHT "|" D_CMND_DISP_MODE "|" D_CMND_DISP_REFRESH "|" D_CMND_DISP_DIMMER "|" D_CMND_DISP_COLS "|" D_CMND_DISP_ROWS "|" D_CMND_DISP_SIZE "|" D_CMND_DISP_FONT "|" - D_CMND_DISP_ROTATE "|" D_CMND_DISP_TEXT "|" D_CMND_DISP_ADDRESS "|" D_CMND_DISP_BLINKRATE ; + D_CMND_DISP_ROTATE "|" D_CMND_DISP_TEXT "|" D_CMND_DISP_ADDRESS "|" D_CMND_DISP_BLINKRATE +#ifdef USE_UFILESYS + "|" D_CMND_DISP_BATCH +#endif + ; void (* const DisplayCommand[])(void) PROGMEM = { &CmndDisplay, &CmndDisplayModel, &CmndDisplayWidth, &CmndDisplayHeight, &CmndDisplayMode, &CmndDisplayRefresh, &CmndDisplayDimmer, &CmndDisplayColumns, &CmndDisplayRows, &CmndDisplaySize, &CmndDisplayFont, - &CmndDisplayRotate, &CmndDisplayText, &CmndDisplayAddress, &CmndDisplayBlinkrate }; + &CmndDisplayRotate, &CmndDisplayText, &CmndDisplayAddress, &CmndDisplayBlinkrate +#ifdef USE_UFILESYS + ,&CmndDisplayBatch +#endif +}; char *dsp_str; @@ -107,6 +120,8 @@ uint8_t dsp_font; uint8_t dsp_flag; uint8_t dsp_on; +uint16_t index_colors[MAX_INDEXCOLORS]; + #ifdef USE_DISPLAY_MODES1TO5 char **disp_log_buffer; @@ -363,6 +378,11 @@ uint32_t decode_te(char *line) { #define DISPLAY_BUFFER_COLS 128 // Max number of characters in linebuf +uint16_t GetColorFromIndex(uint32_t index) { + if (index >= MAX_INDEXCOLORS) index = 0; + return index_colors[index]; +} + void DisplayText(void) { uint8_t lpos; @@ -468,7 +488,7 @@ void DisplayText(void) // color index 0-18 cp++; var = atoiv(cp, &temp); - if (renderer) ftemp=renderer->GetColorFromIndex(temp); + if (renderer) ftemp = GetColorFromIndex(temp); } else { // float because it must handle unsigned 16 bit var = fatoiv(cp,&ftemp); @@ -483,7 +503,7 @@ void DisplayText(void) // color index 0-18 cp++; var = atoiv(cp, &temp); - if (renderer) ftemp=renderer->GetColorFromIndex(temp); + if (renderer) ftemp = GetColorFromIndex(temp); } else { var = fatoiv(cp,&ftemp); } @@ -640,6 +660,18 @@ void DisplayText(void) } break; } case 'd': + if (*cp == 'c') { + cp++; + // define index colo + var = atoiv(cp, &temp); + cp += var; + cp++; + var = fatoiv(cp, &ftemp); + cp += var; + if (temp >= MAX_INDEXCOLORS) temp = 0; + index_colors[temp] = ftemp; + break; + } // force draw grafics buffer if (renderer) renderer->Updateframe(); else DisplayDrawFrame(); @@ -658,9 +690,16 @@ void DisplayText(void) break; case 'f': // font sx - if (renderer) renderer->setTextFont(*cp&7); - else DisplaySetFont(*cp&7); - cp += 1; + { uint8_t font = *cp&7; + if (renderer) renderer->setTextFont(font); + else DisplaySetFont(font); + if (font) { + // for backward compatibility set size to 1 on non GFX fonts + if (renderer) renderer->setTextSize(1); + else DisplaySetSize(1); + } + cp += 1; + } break; case 'a': // rotation angle @@ -848,8 +887,8 @@ void DisplayText(void) if (buttons[num]) { if (!sbt) { buttons[num]->vpower.slider = 0; - buttons[num]->initButtonUL(renderer, gxp, gyp, gxs, gys, renderer->GetColorFromIndex(outline),\ - renderer->GetColorFromIndex(fill), renderer->GetColorFromIndex(textcolor), bbuff, textsize); + buttons[num]->initButtonUL(renderer, gxp, gyp, gxs, gys, GetColorFromIndex(outline),\ + GetColorFromIndex(fill), GetColorFromIndex(textcolor), bbuff, textsize); if (!bflags) { // power button if (dflg) buttons[num]->xdrawButton(bitRead(TasmotaGlobal.power, num)); @@ -870,8 +909,8 @@ void DisplayText(void) } else { // slider buttons[num]->vpower.slider = 1; - buttons[num]->SliderInit(renderer, gxp, gyp, gxs, gys, outline, renderer->GetColorFromIndex(fill),\ - renderer->GetColorFromIndex(textcolor), renderer->GetColorFromIndex(textsize)); + buttons[num]->SliderInit(renderer, gxp, gyp, gxs, gys, outline, GetColorFromIndex(fill),\ + GetColorFromIndex(textcolor), GetColorFromIndex(textsize)); } } } @@ -917,6 +956,45 @@ void DisplayText(void) } } +#ifdef USE_UFILESYS +extern FS *ufsp; +void Display_Text_From_File(const char *file) { + File fp; + fp = ufsp->open(file, FS_FILE_READ); + if (fp >= 0) { + char *savptr = XdrvMailbox.data; + char linebuff[128]; + while (fp.available()) { + uint16_t index = 0; + while (fp.available()) { + uint8_t buf[1]; + fp.read(buf,1); + if (buf[0]=='\n' || buf[0]=='\r') { + break; + } else { + linebuff[index] = buf[0]; + index++; + if (index >= sizeof(linebuff) - 1) { + break; + } + } + } + linebuff[index] = 0; + char *cp = linebuff; + while (*cp==' ') cp++; + if (*cp == ';') continue; + //AddLog(LOG_LEVEL_INFO, PSTR("displaytext %s"), cp); + // execute display text here + XdrvMailbox.data = cp; + XdrvMailbox.data_len = 0; + DisplayText(); + } + XdrvMailbox.data = savptr; + fp.close(); + } +} +#endif + /*********************************************************************************************/ #ifdef USE_DISPLAY_MODES1TO5 @@ -1301,6 +1379,7 @@ void DisplayLocalSensor(void) #endif // USE_DISPLAY_MODES1TO5 + /*********************************************************************************************\ * Public \*********************************************************************************************/ @@ -1316,6 +1395,9 @@ void DisplayInitDriver(void) renderer->setDrawMode(0); } +#ifdef USE_UFILESYS + Display_Text_From_File("/display.ini"); +#endif // AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "Display model %d"), Settings.display_model); @@ -1460,6 +1542,17 @@ void CmndDisplayBlinkrate(void) ResponseCmndNumber(XdrvMailbox.payload); } +#ifdef USE_UFILESYS +void CmndDisplayBatch(void) { + if (XdrvMailbox.data_len > 0) { + if (!Settings.display_mode) { + Display_Text_From_File(XdrvMailbox.data); + } + ResponseCmndChar(XdrvMailbox.data); + } +} +#endif + void CmndDisplaySize(void) { if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload <= 4)) { @@ -2031,7 +2124,7 @@ void RedrawGraph(uint8_t num, uint8_t flags) { uint16_t linecol=fg_color; if (color_type==COLOR_COLOR) { - linecol=renderer->GetColorFromIndex(gp->color_index); + linecol = GetColorFromIndex(gp->color_index); } if (!gp->flags.overlay) { @@ -2053,7 +2146,7 @@ void AddGraph(uint8_t num,uint8_t val) { uint16_t linecol=fg_color; if (color_type==COLOR_COLOR) { - linecol=renderer->GetColorFromIndex(gp->color_index); + linecol = GetColorFromIndex(gp->color_index); } gp->xcnt++; if (gp->xcnt>gp->xs) { diff --git a/tasmota/xdrv_23_zigbee_A_impl.ino b/tasmota/xdrv_23_zigbee_A_impl.ino index 925a35cd1..560745b2d 100644 --- a/tasmota/xdrv_23_zigbee_A_impl.ino +++ b/tasmota/xdrv_23_zigbee_A_impl.ino @@ -1334,7 +1334,7 @@ void CmndZbScan(void) { buf.add32(0x07FFF800); // standard channels 11-26 buf.add8(0x04); // duration 2 ^ 4 ZigbeeEZSPSendCmd(buf.getBuffer(), buf.len()); - + #endif // USE_ZIGBEE_EZSP ResponseCmndDone(); } @@ -1516,8 +1516,8 @@ void ZigbeeGlowPermitJoinLight(void) { } // change the led state - uint32_t led_pin = Pin(GPIO_LEDLNK); - if (led_pin < 99) { + int led_pin = Pin(GPIO_LEDLNK); + if (led_pin > -1) { analogWrite(led_pin, TasmotaGlobal.ledlnk_inverted ? 1023 - led_power : led_power); } } diff --git a/tasmota/xdrv_36_keeloq.ino b/tasmota/xdrv_36_keeloq.ino index 0703190ca..d34d5971c 100644 --- a/tasmota/xdrv_36_keeloq.ino +++ b/tasmota/xdrv_36_keeloq.ino @@ -54,8 +54,8 @@ struct JAROLIFT_DEVICE { uint64_t pack = 0; // Contains data to send. int count = 0; uint32_t serial = 0x0; - uint8_t port_tx; - uint8_t port_rx; + int8_t port_tx; + int8_t port_rx; } jaroliftDevice; void CmdSet(void) diff --git a/tasmota/xdrv_81_esp32_webcam.ino b/tasmota/xdrv_81_esp32_webcam.ino index f7a5a5713..8f653efc9 100644 --- a/tasmota/xdrv_81_esp32_webcam.ino +++ b/tasmota/xdrv_81_esp32_webcam.ino @@ -204,8 +204,8 @@ uint32_t WcSetup(int32_t fsiz) { config.pin_href = Pin(GPIO_WEBCAM_HREF); // HREF_GPIO_NUM; config.pin_sscb_sda = Pin(GPIO_WEBCAM_SIOD); // SIOD_GPIO_NUM; config.pin_sscb_scl = Pin(GPIO_WEBCAM_SIOC); // SIOC_GPIO_NUM; - config.pin_pwdn = (PinUsed(GPIO_WEBCAM_PWDN)) ? Pin(GPIO_WEBCAM_PWDN) : -1; // PWDN_GPIO_NUM; - config.pin_reset = (PinUsed(GPIO_WEBCAM_RESET)) ? Pin(GPIO_WEBCAM_RESET) : -1; // RESET_GPIO_NUM; + config.pin_pwdn = Pin(GPIO_WEBCAM_PWDN); // PWDN_GPIO_NUM; + config.pin_reset = Pin(GPIO_WEBCAM_RESET); // RESET_GPIO_NUM; AddLog(LOG_LEVEL_DEBUG, PSTR("CAM: User template")); } else { diff --git a/tasmota/xdrv_82_esp32_ethernet.ino b/tasmota/xdrv_82_esp32_ethernet.ino index 4872f194c..9e4b0261e 100644 --- a/tasmota/xdrv_82_esp32_ethernet.ino +++ b/tasmota/xdrv_82_esp32_ethernet.ino @@ -133,7 +133,7 @@ void EthernetInit(void) { WiFi.onEvent(EthernetEvent); - int eth_power = (PinUsed(GPIO_ETH_PHY_POWER)) ? Pin(GPIO_ETH_PHY_POWER) : -1; + int eth_power = Pin(GPIO_ETH_PHY_POWER); int eth_mdc = Pin(GPIO_ETH_PHY_MDC); int eth_mdio = Pin(GPIO_ETH_PHY_MDIO); if (!ETH.begin(Settings.eth_address, eth_power, eth_mdc, eth_mdio, (eth_phy_type_t)Settings.eth_type, (eth_clock_mode_t)Settings.eth_clk_mode)) { diff --git a/tasmota/xdsp_02_ssd1306.ino b/tasmota/xdsp_02_ssd1306.ino index a3e9bb8f5..1698f00f6 100644 --- a/tasmota/xdsp_02_ssd1306.ino +++ b/tasmota/xdsp_02_ssd1306.ino @@ -70,11 +70,6 @@ void SSD1306InitDriver(void) Settings.display_height = 64; } - uint8_t reset_pin = -1; - if (PinUsed(GPIO_OLED_RESET)) { - reset_pin = Pin(GPIO_OLED_RESET); - } - // allocate screen buffer if (buffer) { free(buffer); } buffer = (unsigned char*)calloc((Settings.display_width * Settings.display_height) / 8,1); @@ -82,8 +77,8 @@ void SSD1306InitDriver(void) // init renderer // oled1306 = new Adafruit_SSD1306(SSD1306_LCDWIDTH,SSD1306_LCDHEIGHT); - oled1306 = new Adafruit_SSD1306(Settings.display_width, Settings.display_height, &Wire, reset_pin); - oled1306->begin(SSD1306_SWITCHCAPVCC, Settings.display_address[0], reset_pin >= 0); + oled1306 = new Adafruit_SSD1306(Settings.display_width, Settings.display_height, &Wire, Pin(GPIO_OLED_RESET)); + oled1306->begin(SSD1306_SWITCHCAPVCC, Settings.display_address[0], Pin(GPIO_OLED_RESET) >= 0); renderer = oled1306; renderer->DisplayInit(DISPLAY_INIT_MODE, Settings.display_size, Settings.display_rotate, Settings.display_font); renderer->setTextColor(1,0); diff --git a/tasmota/xdsp_04_ili9341.ino b/tasmota/xdsp_04_ili9341.ino index e6b38ca7d..c5087c290 100644 --- a/tasmota/xdsp_04_ili9341.ino +++ b/tasmota/xdsp_04_ili9341.ino @@ -1,7 +1,7 @@ /* - xdsp_04_ili9341.ino - Display Tft Ili9341 support for Tasmota + xdsp_04_ILI9341.ino - Display ILI9341/2 support for Tasmota - Copyright (C) 2021 Theo Arends and Adafruit + Copyright (C) 2021 Gerhard Mutz and Theo Arends This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,28 +19,194 @@ #ifdef USE_SPI #ifdef USE_DISPLAY -#ifdef USE_DISPLAY_ILI9341 +#if (defined(USE_DISPLAY_ILI9341) || defined(USE_DISPLAY_ILI9342)) #define XDSP_04 4 +#include + +extern uint8_t *buffer; +extern uint8_t color_type; +ILI9341_2 *ili9341_2; + +#ifdef USE_FT5206 +#include +uint8_t ili9342_ctouch_counter = 0; +#endif // USE_FT5206 + +bool tft_init_done = false; + +/*********************************************************************************************/ + +void ILI9341_InitDriver() +{ + +#ifdef USE_M5STACK_CORE2 + if (TasmotaGlobal.spi_enabled) { +#else + if (PinUsed(GPIO_ILI9341_CS) || PinUsed(GPIO_ILI9341_DC) && + (TasmotaGlobal.spi_enabled || TasmotaGlobal.soft_spi_enabled)) { +#endif + + Settings.display_model = XDSP_04; + + if (Settings.display_width != ILI9341_TFTWIDTH) { + Settings.display_width = ILI9341_TFTWIDTH; + } + if (Settings.display_height != ILI9341_TFTHEIGHT) { + Settings.display_height = ILI9341_TFTHEIGHT; + } + + // disable screen buffer + buffer = NULL; + + // default colors + fg_color = ILI9341_WHITE; + bg_color = ILI9341_BLACK; + +#ifdef USE_M5STACK_CORE2 + // fixed pins on m5stack core2 + ili9341_2 = new ILI9341_2(5, -2, 15, -2); +#else + + // There are displays without CS + + // check for special case with 2 SPI busses (ESP32 bitcoin) + if (TasmotaGlobal.soft_spi_enabled) { + // Init renderer, may use hardware spi, however we use SSPI defintion because SD card uses SPI definition (2 spi busses) + if (PinUsed(GPIO_SSPI_MOSI) && PinUsed(GPIO_SSPI_MISO) && PinUsed(GPIO_SSPI_SCLK)) { + ili9341_2 = new ILI9341_2(Pin(GPIO_ILI9341_CS), Pin(GPIO_SSPI_MOSI), Pin(GPIO_SSPI_MISO), Pin(GPIO_SSPI_SCLK), Pin(GPIO_OLED_RESET), Pin(GPIO_ILI9341_DC), Pin(GPIO_BACKLIGHT), 2); + } + } else if (TasmotaGlobal.spi_enabled) { + if (PinUsed(GPIO_ILI9341_DC)) { + ili9341_2 = new ILI9341_2(Pin(GPIO_ILI9341_CS), Pin(GPIO_SPI_MOSI), Pin(GPIO_SPI_MISO), Pin(GPIO_SPI_CLK), Pin(GPIO_OLED_RESET), Pin(GPIO_ILI9341_DC), Pin(GPIO_BACKLIGHT), 1); + } + } +#endif // USE_M5STACK_CORE2 + + if (ili9341_2 == nullptr) { + AddLog(LOG_LEVEL_INFO, PSTR("DSP: ILI934x invalid GPIOs")); + return; + } + + ili9341_2->init(Settings.display_width, Settings.display_height); + renderer = ili9341_2; + renderer->DisplayInit(DISPLAY_INIT_MODE, Settings.display_size, Settings.display_rotate, Settings.display_font); + renderer->dim(Settings.display_dimmer); + +#ifdef SHOW_SPLASH + // Welcome text + renderer->setTextFont(2); + renderer->setTextSize(1); + renderer->setTextColor(ILI9341_WHITE, ILI9341_BLACK); +#ifdef USE_DISPLAY_ILI9341 + renderer->DrawStringAt(50, (Settings.display_height/2)-12, "ILI9341 TFT!", ILI9341_WHITE, 0); +#else + renderer->DrawStringAt(50, (Settings.display_height/2)-12, "ILI9342 TFT!", ILI9341_WHITE, 0); +#endif + delay(1000); +#endif // SHOW_SPLASH + + color_type = COLOR_COLOR; + +#ifdef USE_DISPLAY_MODES1TO5 + if (Settings.display_rotate) { + DisplayAllocScreenBuffer(); + } + Ili9341InitMode(); +#endif // USE_DISPLAY_MODES1TO5 + +#ifdef ESP32 +#ifdef USE_FT5206 + // start digitizer with fixed adress and pins for esp32 + #undef SDA_2 + #define SDA_2 21 + #undef SCL_2 + #define SCL_2 22 + Wire1.begin(SDA_2, SCL_2, 400000); + Touch_Init(Wire1); +#endif // USE_FT5206 +#endif // ESP32 + + tft_init_done = true; +#ifdef USE_DISPLAY_ILI9341 + AddLog(LOG_LEVEL_INFO, PSTR("DSP: ILI9341")); +#else + AddLog(LOG_LEVEL_INFO, PSTR("DSP: ILI9342")); +#endif + } +} + +void core2_disp_pwr(uint8_t on); +void core2_disp_dim(uint8_t dim); + +void ili9342_bpwr(uint8_t on) { +#ifdef USE_M5STACK_CORE2 + core2_disp_pwr(on); +#endif +} + +void ili9342_dimm(uint8_t dim) { +#ifdef USE_M5STACK_CORE2 + core2_disp_dim(dim); +#endif +} + +#ifdef ESP32 +#ifdef USE_FT5206 +#ifdef USE_TOUCH_BUTTONS + +void ili9342_RotConvert(int16_t *x, int16_t *y) { + +int16_t temp; + if (renderer) { + uint8_t rot = renderer->getRotation(); + switch (rot) { + case 0: + break; + case 1: + temp = *y; + *y = renderer->height() - *x; + *x = temp; + break; + case 2: + *x = renderer->width() - *x; + *y = renderer->height() - *y; + break; + case 3: + temp = *y; + *y = *x; + *x = renderer->width() - temp; + break; + } + } +} + +// check digitizer hit +void ili9342_CheckTouch() { +ili9342_ctouch_counter++; + if (2 == ili9342_ctouch_counter) { + // every 100 ms should be enough + ili9342_ctouch_counter = 0; + Touch_Check(ili9342_RotConvert); + } +} +#endif // USE_TOUCH_BUTTONS +#endif // USE_FT5206 +#endif // ESP32 + + +#ifdef USE_DISPLAY_MODES1TO5 + #define TFT_TOP 16 #define TFT_BOTTOM 16 #define TFT_FONT_WIDTH 6 #define TFT_FONT_HEIGTH 8 // Adafruit minimal font heigth pixels -#include -#include -#include // TFT 320x240 and 480x320 - -Adafruit_ILI9341 *tft; - uint16_t tft_top = TFT_TOP; uint16_t tft_bottom = TFT_BOTTOM; uint16_t tft_scroll = TFT_TOP; uint16_t tft_cols = 0; -bool tft_init_done = false; - -/*********************************************************************************************/ bool Ili9341Header(void) { if (Settings.display_cols[0] != tft_cols) { @@ -53,107 +219,32 @@ bool Ili9341Header(void) { tft_bottom = 0; } tft_scroll = tft_top; - tft->setScrollMargins(tft_top, tft_bottom); + renderer->setScrollMargins(tft_top, tft_bottom); } return (tft_cols > 17); } void Ili9341InitMode(void) { - tft->setRotation(Settings.display_rotate); // 0 - tft->invertDisplay(0); - tft->fillScreen(ILI9341_BLACK); - tft->setTextWrap(false); // Allow text to run off edges - tft->cp437(true); +// renderer->setRotation(Settings.display_rotate); // 0 +#ifdef USE_DISPLAY_ILI9341 + renderer->invertDisplay(0); +#endif + renderer->fillScreen(ILI9341_BLACK); + renderer->setTextWrap(false); // Allow text to run off edges + renderer->cp437(true); if (!Settings.display_mode) { - tft->setCursor(0, 0); - tft->setTextColor(ILI9341_WHITE, ILI9341_BLACK); - tft->setTextSize(1); + renderer->setCursor(0, 0); + renderer->setTextColor(ILI9341_WHITE, ILI9341_BLACK); + renderer->setTextSize(1); } else { Ili9341Header(); - tft->setCursor(0, 0); - tft->setTextColor(ILI9341_YELLOW, ILI9341_BLACK); - tft->setTextSize(2); + renderer->setCursor(0, 0); + renderer->setTextColor(ILI9341_YELLOW, ILI9341_BLACK); + renderer->setTextSize(2); // tft->println("HEADER"); - } } -void Ili9341Init(uint8_t mode) { - switch(mode) { - case DISPLAY_INIT_MODE: - Ili9341InitMode(); -#ifdef USE_DISPLAY_MODES1TO5 - if (Settings.display_rotate) { - DisplayClearScreenBuffer(); - } -#endif // USE_DISPLAY_MODES1TO5 - break; - case DISPLAY_INIT_PARTIAL: - case DISPLAY_INIT_FULL: - break; - } -} - -void Ili9341InitDriver(void) { - if (PinUsed(GPIO_ILI9341_CS) && PinUsed(GPIO_ILI9341_DC) && TasmotaGlobal.spi_enabled) { - - Settings.display_model = XDSP_04; - - if (Settings.display_width != ILI9341_TFTWIDTH) { - Settings.display_width = ILI9341_TFTWIDTH; - } - if (Settings.display_height != ILI9341_TFTHEIGHT) { - Settings.display_height = ILI9341_TFTHEIGHT; - } - - tft = new Adafruit_ILI9341(Pin(GPIO_ILI9341_CS), Pin(GPIO_ILI9341_DC)); - tft->begin(); - -#ifdef USE_DISPLAY_MODES1TO5 - if (Settings.display_rotate) { - DisplayAllocScreenBuffer(); - } -#endif // USE_DISPLAY_MODES1TO5 - - Ili9341InitMode(); - - tft_init_done = true; - AddLog(LOG_LEVEL_INFO, PSTR("DSP: ILI9341")); - } -} - -void Ili9341Clear(void) { - tft->fillScreen(ILI9341_BLACK); - tft->setCursor(0, 0); -} - -void Ili9341DrawStringAt(uint16_t x, uint16_t y, char *str, uint16_t color, uint8_t flag) { - uint16_t active_color = ILI9341_WHITE; - - tft->setTextSize(Settings.display_size); - if (!flag) { - tft->setCursor(x, y); - } else { - tft->setCursor((x-1) * TFT_FONT_WIDTH * Settings.display_size, (y-1) * TFT_FONT_HEIGTH * Settings.display_size); - } - if (color) { active_color = color; } - tft->setTextColor(active_color, ILI9341_BLACK); - tft->println(str); -} - -void Ili9341DisplayOnOff() { -// tft->showDisplay(disp_power); -// tft->invertDisplay(disp_power); - if (PinUsed(GPIO_BACKLIGHT)) { - pinMode(Pin(GPIO_BACKLIGHT), OUTPUT); - digitalWrite(Pin(GPIO_BACKLIGHT), disp_power); - } -} - -/*********************************************************************************************/ - -#ifdef USE_DISPLAY_MODES1TO5 - void Ili9341PrintLog(void) { disp_refresh--; if (!disp_refresh) { @@ -167,40 +258,40 @@ void Ili9341PrintLog(void) { uint8_t size = Settings.display_size; uint16_t theight = size * TFT_FONT_HEIGTH; - tft->setTextSize(size); - tft->setTextColor(ILI9341_CYAN, ILI9341_BLACK); // Add background color to solve flicker + renderer->setTextSize(size); + renderer->setTextColor(ILI9341_CYAN, ILI9341_BLACK); // Add background color to solve flicker if (!Settings.display_rotate) { // Use hardware scroll - tft->setCursor(0, tft_scroll); - tft->fillRect(0, tft_scroll, tft->width(), theight, ILI9341_BLACK); // Erase line - tft->print(txt); + renderer->setCursor(0, tft_scroll); + renderer->fillRect(0, tft_scroll, renderer->width(), theight, ILI9341_BLACK); // Erase line + renderer->print(txt); tft_scroll += theight; - if (tft_scroll >= (tft->height() - tft_bottom)) { + if (tft_scroll >= (renderer->height() - tft_bottom)) { tft_scroll = tft_top; } - tft->scrollTo(tft_scroll); + renderer->scrollTo(tft_scroll); } else { uint8_t last_row = Settings.display_rows -1; tft_scroll = (tft_top) ? theight : 0; // Start below header - tft->setCursor(0, tft_scroll); + renderer->setCursor(0, tft_scroll); for (uint32_t i = 0; i < last_row; i++) { strlcpy(disp_screen_buffer[i], disp_screen_buffer[i +1], disp_screen_buffer_cols); // tft->fillRect(0, tft_scroll, tft->width(), theight, ILI9341_BLACK); // Erase line - tft->print(disp_screen_buffer[i]); + renderer->print(disp_screen_buffer[i]); tft_scroll += theight; - tft->setCursor(0, tft_scroll); + renderer->setCursor(0, tft_scroll); delay(1); // Fix background runs heap usage due to long runtime of this loop (up to 1 second) } strlcpy(disp_screen_buffer[last_row], txt, disp_screen_buffer_cols); DisplayFillScreen(last_row); - tft->print(disp_screen_buffer[last_row]); + renderer->print(disp_screen_buffer[last_row]); } AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_APPLICATION "[%s]"), txt); } } } -void Ili9341Refresh(void) { // Every second +void ILI9341_Refresh(void) { // Every second if (Settings.display_mode) { // Mode 0 is User text // 24-04-2017 13:45:43 = 19 + 1 ('\0') = 20 // 24-04-2017 13:45 = 16 + 1 ('\0') = 17 @@ -212,9 +303,9 @@ void Ili9341Refresh(void) { // Every second char spaces[Settings.display_cols[0] - (8 + time_size)]; char time[time_size]; // 13:45:43 - tft->setTextSize(Settings.display_size); - tft->setTextColor(ILI9341_YELLOW, ILI9341_RED); // Add background color to solve flicker - tft->setCursor(0, 0); + renderer->setTextSize(Settings.display_size); + renderer->setTextColor(ILI9341_YELLOW, ILI9341_RED); // Add background color to solve flicker + renderer->setCursor(0, 0); snprintf_P(date4, sizeof(date4), PSTR("%02d" D_MONTH_DAY_SEPARATOR "%02d" D_YEAR_MONTH_SEPARATOR "%04d"), RtcTime.day_of_month, RtcTime.month, RtcTime.year); memset(spaces, 0x20, sizeof(spaces)); @@ -222,9 +313,9 @@ void Ili9341Refresh(void) { // Every second snprintf_P(time, sizeof(time), PSTR("%02d" D_HOUR_MINUTE_SEPARATOR "%02d" D_MINUTE_SECOND_SEPARATOR "%02d"), RtcTime.hour, RtcTime.minute, RtcTime.second); snprintf_P(tftdt, sizeof(tftdt), PSTR("%s%s%s"), date4, spaces, time); - tft->print(tftdt); + renderer->print(tftdt); } else { - tft->setCursor(0, 0); + renderer->setCursor(0, 0); } switch (Settings.display_mode) { @@ -238,77 +329,44 @@ void Ili9341Refresh(void) { // Every second } } } - #endif // USE_DISPLAY_MODES1TO5 +/*********************************************************************************************/ /*********************************************************************************************\ * Interface \*********************************************************************************************/ - -bool Xdsp04(uint8_t function) { +bool Xdsp04(uint8_t function) +{ bool result = false; if (FUNC_DISPLAY_INIT_DRIVER == function) { - Ili9341InitDriver(); + ILI9341_InitDriver(); } else if (tft_init_done && (XDSP_04 == Settings.display_model)) { - - if (!dsp_color) { dsp_color = ILI9341_WHITE; } - - switch (function) { - case FUNC_DISPLAY_MODEL: - result = true; - break; - case FUNC_DISPLAY_INIT: - Ili9341Init(dsp_init); - break; - case FUNC_DISPLAY_POWER: - Ili9341DisplayOnOff(); - break; - case FUNC_DISPLAY_CLEAR: - Ili9341Clear(); - break; - case FUNC_DISPLAY_DRAW_HLINE: - tft->writeFastHLine(dsp_x, dsp_y, dsp_len, dsp_color); - break; - case FUNC_DISPLAY_DRAW_VLINE: - tft->writeFastVLine(dsp_x, dsp_y, dsp_len, dsp_color); - break; - case FUNC_DISPLAY_DRAW_LINE: - tft->writeLine(dsp_x, dsp_y, dsp_x2, dsp_y2, dsp_color); - break; - case FUNC_DISPLAY_DRAW_CIRCLE: - tft->drawCircle(dsp_x, dsp_y, dsp_rad, dsp_color); - break; - case FUNC_DISPLAY_FILL_CIRCLE: - tft->fillCircle(dsp_x, dsp_y, dsp_rad, dsp_color); - break; - case FUNC_DISPLAY_DRAW_RECTANGLE: - tft->drawRect(dsp_x, dsp_y, dsp_x2, dsp_y2, dsp_color); - break; - case FUNC_DISPLAY_FILL_RECTANGLE: - tft->fillRect(dsp_x, dsp_y, dsp_x2, dsp_y2, dsp_color); - break; -// case FUNC_DISPLAY_DRAW_FRAME: -// oled->display(); -// break; - case FUNC_DISPLAY_TEXT_SIZE: - tft->setTextSize(Settings.display_size); - break; - case FUNC_DISPLAY_FONT_SIZE: -// tft->setTextSize(Settings.display_font); - break; - case FUNC_DISPLAY_DRAW_STRING: - Ili9341DrawStringAt(dsp_x, dsp_y, dsp_str, dsp_color, dsp_flag); - break; - case FUNC_DISPLAY_ROTATION: - tft->setRotation(Settings.display_rotate); - break; + switch (function) { + case FUNC_DISPLAY_MODEL: + result = true; + break; + case FUNC_DISPLAY_TEXT_SIZE: + case FUNC_DISPLAY_FONT_SIZE: + case DISPLAY_INIT_MODE: + renderer->clearDisplay(); + break; +#ifdef USE_FT5206 +#ifdef USE_TOUCH_BUTTONS + case FUNC_DISPLAY_EVERY_50_MSECOND: + if (FT5206_found) { + ili9342_CheckTouch(); + } + break; +#endif // USE_TOUCH_BUTTONS +#endif // USE_FT5206 #ifdef USE_DISPLAY_MODES1TO5 - case FUNC_DISPLAY_EVERY_SECOND: - Ili9341Refresh(); - break; + case FUNC_DISPLAY_EVERY_SECOND: + ILI9341_Refresh(); + break; #endif // USE_DISPLAY_MODES1TO5 + } } return result; diff --git a/tasmota/xdsp_08_ILI9488.ino b/tasmota/xdsp_08_ILI9488.ino index bb423097c..05235bae6 100644 --- a/tasmota/xdsp_08_ILI9488.ino +++ b/tasmota/xdsp_08_ILI9488.ino @@ -65,7 +65,7 @@ void ILI9488_InitDriver(void) { fg_color = ILI9488_WHITE; bg_color = ILI9488_BLACK; - uint8_t bppin = BACKPLANE_PIN; + int8_t bppin = BACKPLANE_PIN; if (PinUsed(GPIO_BACKLIGHT)) { bppin = Pin(GPIO_BACKLIGHT); } diff --git a/tasmota/xdsp_12_ST7789.ino b/tasmota/xdsp_12_ST7789.ino index 9b285418f..c4541641f 100644 --- a/tasmota/xdsp_12_ST7789.ino +++ b/tasmota/xdsp_12_ST7789.ino @@ -86,22 +86,12 @@ void ST7789_InitDriver(void) { bppin = Pin(GPIO_BACKLIGHT); } - int8_t reset = -1; - if (PinUsed(GPIO_OLED_RESET)) { - reset = Pin(GPIO_OLED_RESET); - } - - int8_t cs = -1; - if (PinUsed(GPIO_ST7789_CS)) { - cs = Pin(GPIO_ST7789_CS); - } - // init renderer, may use hardware spi if (TasmotaGlobal.soft_spi_enabled) { - st7789 = new Arduino_ST7789(Pin(GPIO_ST7789_DC), reset, Pin(GPIO_SSPI_MOSI), Pin(GPIO_SSPI_SCLK), cs, bppin); + st7789 = new Arduino_ST7789(Pin(GPIO_ST7789_DC), Pin(GPIO_OLED_RESET), Pin(GPIO_SSPI_MOSI), Pin(GPIO_SSPI_SCLK), Pin(GPIO_ST7789_CS), bppin); } else if (TasmotaGlobal.spi_enabled) { - st7789 = new Arduino_ST7789(Pin(GPIO_ST7789_DC), reset, cs, bppin); + st7789 = new Arduino_ST7789(Pin(GPIO_ST7789_DC), Pin(GPIO_OLED_RESET), Pin(GPIO_ST7789_CS), bppin); } st7789->init(Settings.display_width,Settings.display_height); diff --git a/tasmota/xdsp_13_ILI9341-2.ino b/tasmota/xdsp_13_ILI9341-2.ino deleted file mode 100644 index 785dfc51f..000000000 --- a/tasmota/xdsp_13_ILI9341-2.ino +++ /dev/null @@ -1,290 +0,0 @@ -/* - xdsp_13_ILI9341-TTGO-TS.ino - Display ILI9341 support for Tasmota - - Copyright (C) 2021 Gerhard Mutz and Theo Arends - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -//#ifdef USE_SPI -#ifdef USE_SPI -#ifdef USE_DISPLAY -#if (defined(USE_DISPLAY_ILI9341_2) || defined(USE_DISPLAY_ILI9342)) - -#define XDSP_13 13 - -#undef COLORED -#define COLORED 1 -#undef UNCOLORED -#define UNCOLORED 0 - - -// using font 8 is opional (num=3) -// very badly readable, but may be useful for graphs -#undef USE_TINY_FONT -#define USE_TINY_FONT - - -#include - -extern uint8_t *buffer; -extern uint8_t color_type; -ILI9341_2 *ili9341_2; - -#ifdef USE_FT5206 -#include -#undef FT6336_address -#define FT6336_address 0x38 -uint8_t ili9342_ctouch_counter = 0; -#endif // USE_FT5206 - - -/*********************************************************************************************/ - -void ILI9341_2_InitDriver() -{ - if (!Settings.display_model) { - Settings.display_model = XDSP_13; - } - - - if (XDSP_13 == Settings.display_model) { - - if (Settings.display_width != ILI9341_2_TFTWIDTH) { - Settings.display_width = ILI9341_2_TFTWIDTH; - } - if (Settings.display_height != ILI9341_2_TFTHEIGHT) { - Settings.display_height = ILI9341_2_TFTHEIGHT; - } - - // disable screen buffer - buffer=NULL; - - // default colors - fg_color = ILI9341_2_WHITE; - bg_color = ILI9341_2_BLACK; - -#ifdef USE_M5STACK_CORE2 - ili9341_2 = new ILI9341_2(5, -2, 15, -2); -#else - // init renderer, may use hardware spi, however we use SSPI defintion because SD card uses SPI definition (2 spi busses) - if (PinUsed(GPIO_SSPI_CS) && PinUsed(GPIO_OLED_RESET) && PinUsed(GPIO_BACKLIGHT) && PinUsed(GPIO_SSPI_MOSI) && PinUsed(GPIO_SSPI_MISO) && PinUsed(GPIO_SSPI_SCLK) && PinUsed(GPIO_SSPI_DC)) { - ili9341_2 = new ILI9341_2(Pin(GPIO_SSPI_CS), Pin(GPIO_SSPI_MOSI), Pin(GPIO_SSPI_MISO), Pin(GPIO_SSPI_SCLK), Pin(GPIO_OLED_RESET), Pin(GPIO_SSPI_DC), Pin(GPIO_BACKLIGHT)); - } else { - return; - } -#endif - - ili9341_2->init(Settings.display_width,Settings.display_height); - renderer = ili9341_2; - renderer->DisplayInit(DISPLAY_INIT_MODE,Settings.display_size,Settings.display_rotate,Settings.display_font); - renderer->dim(Settings.display_dimmer); - -#ifdef SHOW_SPLASH - // Welcome text - renderer->setTextFont(2); - renderer->setTextColor(ILI9341_2_WHITE, ILI9341_2_BLACK); - renderer->DrawStringAt(30, (Settings.display_height/2)-12, "ILI9341 TFT!", ILI9341_2_WHITE, 0); - delay(1000); -#endif - - color_type = COLOR_COLOR; - -#ifdef ESP32 -#ifdef USE_FT5206 - // start digitizer with fixed adress and pins for esp32 - #define SDA_2 21 - #define SCL_2 22 - Wire1.begin(SDA_2, SCL_2, 400000); - Touch_Init(Wire1); -#endif // USE_FT5206 -#endif // ESP32 - - - } -} - -void core2_disp_pwr(uint8_t on); -void core2_disp_dim(uint8_t dim); - -void ili9342_bpwr(uint8_t on) { -#ifdef USE_M5STACK_CORE2 - core2_disp_pwr(on); -#endif -} - -void ili9342_dimm(uint8_t dim) { -#ifdef USE_M5STACK_CORE2 - core2_disp_dim(dim); -#endif -} - -#ifdef ESP32 -#ifdef USE_FT5206 -#ifdef USE_TOUCH_BUTTONS - -void ili9342_RotConvert(int16_t *x, int16_t *y) { - -int16_t temp; - if (renderer) { - uint8_t rot=renderer->getRotation(); - switch (rot) { - case 0: - break; - case 1: - temp=*y; - *y=renderer->height()-*x; - *x=temp; - break; - case 2: - *x=renderer->width()-*x; - *y=renderer->height()-*y; - break; - case 3: - temp=*y; - *y=*x; - *x=renderer->width()-temp; - break; - } - } -} - -// check digitizer hit -void ili9342_CheckTouch() { -ili9342_ctouch_counter++; - if (2 == ili9342_ctouch_counter) { - // every 100 ms should be enough - ili9342_ctouch_counter = 0; - Touch_Check(ili9342_RotConvert); - } -} -#endif // USE_TOUCH_BUTTONS -#endif // USE_FT5206 -#endif // ESP32 - - -#ifdef USE_DISPLAY_MODES1TO5 - -void ILI9341_2_PrintLog(bool withDateTime) { - disp_refresh--; - if (!disp_refresh) { - disp_refresh = Settings.display_refresh; - if (!disp_screen_buffer_cols) { DisplayAllocScreenBuffer(); } - - char* txt = DisplayLogBuffer('\370'); - if (txt != NULL) { - uint8_t last_row = Settings.display_rows -1; - - renderer->clearDisplay(); /** TODO: Would be smoother without clear, like ILI9341_2_Time() does. **/ - renderer->setCursor(0,0); - - if (withDateTime) { - char line[21]; - snprintf_P(line, sizeof(line), PSTR("%02d" D_HOUR_MINUTE_SEPARATOR "%02d" D_MINUTE_SECOND_SEPARATOR "%02d %02d" D_MONTH_DAY_SEPARATOR "%02d" D_YEAR_MONTH_SEPARATOR "%04d"), RtcTime.hour, RtcTime.minute, RtcTime.second, RtcTime.day_of_month, RtcTime.month, RtcTime.year); // [12:34:56 31-12-2021] - renderer->setTextColor(ILI9341_2_BLUE); - renderer->println(line); - renderer->setTextColor(fg_color); - last_row--; - } - - for (byte i = 0; i < last_row; i++) { - strlcpy(disp_screen_buffer[i], disp_screen_buffer[i +1], disp_screen_buffer_cols); - renderer->println(disp_screen_buffer[i]); - } - strlcpy(disp_screen_buffer[last_row], txt, disp_screen_buffer_cols); - DisplayFillScreen(last_row); - - AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "[%s]"), disp_screen_buffer[last_row]); - - renderer->println(disp_screen_buffer[last_row]); - renderer->Updateframe(); - } - } -} - -void ILI9341_2_Time(void) { - char line[12]; - /** TODO: DisplaySize is working, but renderer->println() does not respect DisplayFont **/ - snprintf_P(line, sizeof(line), PSTR(" %02d" D_HOUR_MINUTE_SEPARATOR "%02d" D_MINUTE_SECOND_SEPARATOR "%02d"), RtcTime.hour, RtcTime.minute, RtcTime.second); // [ 12:34:56 ] - renderer->setCursor(60, 140); - renderer->println(line); - snprintf_P(line, sizeof(line), PSTR("%02d" D_MONTH_DAY_SEPARATOR "%02d" D_YEAR_MONTH_SEPARATOR "%04d"), RtcTime.day_of_month, RtcTime.month, RtcTime.year); // [01-02-2018] - renderer->setCursor(60, 160); - renderer->println(line); - renderer->Updateframe(); -} - -void ILI9341_2_Refresh(void) { // Every second - if (Settings.display_mode) { // Mode 0 is User text - switch (Settings.display_mode) { - case 1: // Time - ILI9341_2_Time(); - break; - case 2: // Local - case 4: // Mqtt - ILI9341_2_PrintLog(false); - break; - case 3: // Local + Time - case 5: // Mqtt + Time - ILI9341_2_PrintLog(true); - break; - } - } -} - -#endif // USE_DISPLAY_MODES1TO5 - -/*********************************************************************************************/ -/*********************************************************************************************\ - * Interface -\*********************************************************************************************/ -bool Xdsp13(uint8_t function) -{ - bool result = false; - - if (FUNC_DISPLAY_INIT_DRIVER == function) { - ILI9341_2_InitDriver(); - } - else if (XDSP_13 == Settings.display_model) { - switch (function) { - case FUNC_DISPLAY_MODEL: - result = true; - break; - case FUNC_DISPLAY_TEXT_SIZE: - case FUNC_DISPLAY_FONT_SIZE: - case DISPLAY_INIT_MODE: - renderer->clearDisplay(); - break; -#ifdef USE_FT5206 -#ifdef USE_TOUCH_BUTTONS - case FUNC_DISPLAY_EVERY_50_MSECOND: - if (FT5206_found) { - ili9342_CheckTouch(); - } - break; -#endif // USE_TOUCH_BUTTONS -#endif // USE_FT5206 -#ifdef USE_DISPLAY_MODES1TO5 - case FUNC_DISPLAY_EVERY_SECOND: - ILI9341_2_Refresh(); - break; -#endif // USE_DISPLAY_MODES1TO5 - } - } - return result; -} - -#endif // USE_DISPLAY_ILI9341_2 -#endif // USE_DISPLAY -#endif // USE_SPI diff --git a/tasmota/xdsp_14_SSD1331.ino b/tasmota/xdsp_14_SSD1331.ino index 4d297cab8..3cfa436c9 100644 --- a/tasmota/xdsp_14_SSD1331.ino +++ b/tasmota/xdsp_14_SSD1331.ino @@ -61,17 +61,12 @@ void SSD1331_InitDriver() { fg_color = SSD1331_WHITE; bg_color = SSD1331_BLACK; - int8_t reset = -1; - if (PinUsed(GPIO_OLED_RESET)) { - reset = Pin(GPIO_OLED_RESET); - } - // init renderer if (TasmotaGlobal.soft_spi_enabled) { - ssd1331 = new Adafruit_SSD1331(Pin(GPIO_SSD1331_CS), Pin(GPIO_SSD1331_DC), Pin(GPIO_SSPI_MOSI), Pin(GPIO_SSPI_SCLK), reset); + ssd1331 = new Adafruit_SSD1331(Pin(GPIO_SSD1331_CS), Pin(GPIO_SSD1331_DC), Pin(GPIO_SSPI_MOSI), Pin(GPIO_SSPI_SCLK), Pin(GPIO_OLED_RESET)); } else if (TasmotaGlobal.spi_enabled) { - ssd1331 = new Adafruit_SSD1331(&SPI, Pin(GPIO_SSD1331_CS), Pin(GPIO_SSD1331_DC), reset); + ssd1331 = new Adafruit_SSD1331(&SPI, Pin(GPIO_SSD1331_CS), Pin(GPIO_SSD1331_DC), Pin(GPIO_OLED_RESET)); } delay(100); diff --git a/tasmota/xlgt_02_my92x1.ino b/tasmota/xlgt_02_my92x1.ino index fe8ca1270..2c851a9b1 100644 --- a/tasmota/xlgt_02_my92x1.ino +++ b/tasmota/xlgt_02_my92x1.ino @@ -26,8 +26,8 @@ #define XLGT_02 2 struct MY92X1 { - uint8_t pdi_pin = 0; - uint8_t pdcki_pin = 0; + int8_t pdi_pin = 0; + int8_t pdcki_pin = 0; uint8_t model = 0; } My92x1; diff --git a/tasmota/xlgt_03_sm16716.ino b/tasmota/xlgt_03_sm16716.ino index 66c714075..540b6d392 100644 --- a/tasmota/xlgt_03_sm16716.ino +++ b/tasmota/xlgt_03_sm16716.ino @@ -31,9 +31,9 @@ #define D_LOG_SM16716 "SM16716: " struct SM16716 { - uint8_t pin_clk = 0; - uint8_t pin_dat = 0; - uint8_t pin_sel = 0; + int8_t pin_clk = 0; + int8_t pin_dat = 0; + int8_t pin_sel = 0; bool enabled = false; } Sm16716; @@ -62,7 +62,7 @@ void SM16716_SendByte(uint8_t v) void SM16716_Update(uint8_t duty_r, uint8_t duty_g, uint8_t duty_b) { - if (Sm16716.pin_sel < 99) { + if (Sm16716.pin_sel > -1) { bool should_enable = (duty_r | duty_g | duty_b); if (!Sm16716.enabled && should_enable) { DEBUG_DRIVER_LOG(PSTR(D_LOG_SM16716 "turning color on")); @@ -104,7 +104,7 @@ bool SM16716_ModuleSelected(void) Sm16716.pin_dat = Pin(GPIO_SM16716_DAT); Sm16716.pin_sel = Pin(GPIO_SM16716_SEL); DEBUG_DRIVER_LOG(PSTR(D_LOG_SM16716 "ModuleSelected; clk_pin=%d, dat_pin=%d)"), Sm16716.pin_clk, Sm16716.pin_dat); - return (Sm16716.pin_clk < 99) && (Sm16716.pin_dat < 99); + return (Sm16716.pin_clk > -1) && (Sm16716.pin_dat > -1); } */ @@ -165,7 +165,7 @@ void Sm16716ModuleSelected(void) pinMode(Sm16716.pin_dat, OUTPUT); digitalWrite(Sm16716.pin_dat, LOW); - if (Sm16716.pin_sel < 99) { + if (Sm16716.pin_sel > -1) { pinMode(Sm16716.pin_sel, OUTPUT); digitalWrite(Sm16716.pin_sel, LOW); // no need to call SM16716_Init here, it will be called after sel goes HIGH diff --git a/tasmota/xnrg_15_teleinfo.ino b/tasmota/xnrg_15_teleinfo.ino index ed1aebb45..29e502cec 100755 --- a/tasmota/xnrg_15_teleinfo.ino +++ b/tasmota/xnrg_15_teleinfo.ino @@ -456,12 +456,12 @@ void TInfoInit(void) } if (PinUsed(GPIO_TELEINFO_RX)) { - uint8_t rx_pin = Pin(GPIO_TELEINFO_RX); + int8_t rx_pin = Pin(GPIO_TELEINFO_RX); AddLog(LOG_LEVEL_INFO, PSTR("TIC: RX on GPIO%d, baudrate %d"), rx_pin, baudrate); // Enable Teleinfo pin used, control it if (PinUsed(GPIO_TELEINFO_ENABLE)) { - uint8_t en_pin = Pin(GPIO_TELEINFO_ENABLE); + int8_t en_pin = Pin(GPIO_TELEINFO_ENABLE); pinMode(en_pin, OUTPUT); digitalWrite(en_pin, HIGH); AddLog(LOG_LEVEL_INFO, PSTR("TIC: Enable with GPIO%d"), en_pin); @@ -484,7 +484,7 @@ void TInfoInit(void) // this is not working, need to call SetSerialConfig after if (TInfoSerial->begin(baudrate)) { - + #ifdef ESP8266 if (TInfoSerial->hardwareSerial() ) { ClaimSerial(); diff --git a/tasmota/xsns_05_ds18x20.ino b/tasmota/xsns_05_ds18x20.ino index f5cd6a3f9..b95523cd9 100644 --- a/tasmota/xsns_05_ds18x20.ino +++ b/tasmota/xsns_05_ds18x20.ino @@ -54,8 +54,8 @@ struct DS18X20STRUCT { float temperature; } ds18x20_sensor[DS18X20_MAX_SENSORS]; uint8_t ds18x20_sensors = 0; -uint8_t ds18x20_pin = 0; // Shelly GPIO3 input only -uint8_t ds18x20_pin_out = 0; // Shelly GPIO00 output only +int8_t ds18x20_pin = 0; // Shelly GPIO3 input only +int8_t ds18x20_pin_out = 0; // Shelly GPIO00 output only bool ds18x20_dual_mode = false; // Single pin mode char ds18x20_types[17]; #ifdef W1_PARASITE_POWER diff --git a/tasmota/xsns_06_dht.ino b/tasmota/xsns_06_dht.ino index c9eec0955..9a7e9e048 100644 --- a/tasmota/xsns_06_dht.ino +++ b/tasmota/xsns_06_dht.ino @@ -39,7 +39,7 @@ bool dht_active = true; // DHT configured bool dht_dual_mode = false; // Single pin mode struct DHTSTRUCT { - uint8_t pin; + int8_t pin; uint8_t type; uint8_t lastresult; char stype[12]; @@ -157,14 +157,33 @@ bool DhtRead(uint32_t sensor) float temperature = NAN; float humidity = NAN; switch (Dht[sensor].type) { - case GPIO_DHT11: + case GPIO_DHT11: // DHT11 humidity = dht_data[0]; +/* + // DHT11 no negative temp: temperature = dht_data[2] + ((float)dht_data[3] * 0.1f); // Issue #3164 +*/ + // DHT11 (Adafruit): + temperature = dht_data[2]; + if (dht_data[3] & 0x80) { + temperature = -1 - temperature; + } + temperature += (dht_data[3] & 0x0f) * 0.1f; +/* + // DHT12 (Adafruit): + temperature = dht_data[2]; + temperature += (dht_data[3] & 0x0f) * 0.1f; + if (dht_data[2] & 0x80) { + temperature *= -1; + } +*/ break; - case GPIO_DHT22: - case GPIO_SI7021: + case GPIO_DHT22: // DHT21, DHT22, AM2301, AM2302, AM2321 + case GPIO_SI7021: // iTead SI7021 humidity = ((dht_data[0] << 8) | dht_data[1]) * 0.1; - temperature = (((dht_data[2] & 0x7F) << 8 ) | dht_data[3]) * 0.1; + // DHT21/22 (Adafruit): + temperature = ((int16_t)(dht_data[2] & 0x7F) << 8 ) | dht_data[3]; + temperature *= 0.1f; if (dht_data[2] & 0x80) { temperature *= -1; } diff --git a/tasmota/xsns_07_sht1x.ino b/tasmota/xsns_07_sht1x.ino index 7d3bc06e7..6fe5c51db 100644 --- a/tasmota/xsns_07_sht1x.ino +++ b/tasmota/xsns_07_sht1x.ino @@ -37,8 +37,8 @@ enum { SHT1X_CMD_SOFT_RESET = B00011110 }; -uint8_t sht_sda_pin; -uint8_t sht_scl_pin; +int8_t sht_sda_pin; +int8_t sht_scl_pin; uint8_t sht_type = 0; char sht_types[] = "SHT1X"; uint8_t sht_valid = 0; diff --git a/tasmota/xsns_28_tm1638.ino b/tasmota/xsns_28_tm1638.ino index 2579a1703..44da51dde 100644 --- a/tasmota/xsns_28_tm1638.ino +++ b/tasmota/xsns_28_tm1638.ino @@ -33,9 +33,9 @@ #define TM1638_CLOCK_DELAY 1 // uSec uint8_t tm1638_type = 1; -uint8_t tm1638_clock_pin = 0; -uint8_t tm1638_data_pin = 0; -uint8_t tm1638_strobe_pin = 0; +int8_t tm1638_clock_pin = 0; +int8_t tm1638_data_pin = 0; +int8_t tm1638_strobe_pin = 0; uint8_t tm1638_displays = 8; uint8_t tm1638_active_display = 1; uint8_t tm1638_intensity = 0; diff --git a/tasmota/xsns_34_hx711.ino b/tasmota/xsns_34_hx711.ino index db89f432e..9a22ad0e8 100644 --- a/tasmota/xsns_34_hx711.ino +++ b/tasmota/xsns_34_hx711.ino @@ -78,8 +78,8 @@ struct HX { uint8_t calibrate_step = HX_CAL_END; uint8_t calibrate_timer = 0; uint8_t calibrate_msg = 0; - uint8_t pin_sck; - uint8_t pin_dout; + int8_t pin_sck; + int8_t pin_dout; bool tare_flg = false; bool weight_changed = false; uint16_t weight_delta = 4; diff --git a/tasmota/xsns_36_mgc3130.ino b/tasmota/xsns_36_mgc3130.ino index 584b214d2..1c50b412f 100644 --- a/tasmota/xsns_36_mgc3130.ino +++ b/tasmota/xsns_36_mgc3130.ino @@ -39,8 +39,8 @@ #define MGC3130_I2C_ADDR 0x42 -uint8_t MGC3130_xfer = 0; -uint8_t MGC3130_reset = 0; +int8_t MGC3130_xfer = 0; +int8_t MGC3130_reset = 0; bool MGC3130_type = false; char MGC3130stype[] = "MGC3130";