1. 08 Aug, 2024 1 commit
  2. 31 Jul, 2024 1 commit
  3. 27 Apr, 2024 1 commit
    • Philip Gladstone's avatar
      Port of the rotary module to ESP32 (#3625) · 92f37dea
      Philip Gladstone authored
      * Ported rotary driver. Compiles but not tested.
      
      * Added the rotary switch driver to the esp32 version
      
      * Review comments. Also ensure that we have GPIO if we have ROTARY.
      
      * Allow use of GPIO 0
      
      * Another bad piece of documentation
      
      * Fix docs and also free the timer
      
      * Now adds a self reference to prevent GC until after close has been called and
      any queued messages have been flushed.
      
      * Simplified the code a bit
      92f37dea
  4. 26 Apr, 2024 1 commit
    • Jade Mattsson's avatar
      Initial support for ESP32-C6 and ESP32-H2, plus assorted fixes & improvements (#3646) · 4cdebe71
      Jade Mattsson authored
      
      
      * Proof-of-concept multi-type console support via stdio
      
      * Address crashes on linput's use of printf.
      
      On an empty line input, a C3 with UART console would panic while attempting
      to output the new Lua prompt. The backtrace shows a xQueueSemaphoreTake
      with uxItemSize==0 as the panic cause, deep inside the uart driver, invoked
      via vfs_uart and vfs_console layers, from printf.
      Similarly, the printf for outputting a backspace/erase sequence would also
      trigger a panic.
      
      This workaround (of not mixing fflush() with printf) is likely merely hiding
      a deeper issue, but it appears to be consistent. Plus, printf with no args
      and a user-supplied format string is a no-no and should be fixed anyway.
      
      * Work around IDF inconsistency with stdout buffering.
      
      * Increase console task stack size.
      
      Seems on Xtensa it ended up not being enough.
      
      * Switch to single-byte console reads.
      
      * Stop cheating and feed Lua from the right context.
      
      * Work around IDF buffering stdout even when told not to, on ACM consoles.
      
      * Initial build support for esp32c6.
      
      Plus fixup of module selection for a variety of targets.
      
      * Update github actions to node 20 versions.
      
      * Update github build to deal with Lua 5.3 being default.
      
      * Address fatal compiler warning.
      
      Newer IDF toolchain is stricter, and we'd apparently failed to build test
      the Lua-5.1 path for some time.
      
      * Initial build support for esp32h2.
      
      * Upgrade IDF to v5.1.3
      
      * Fix left-over incorrect type in uzlib.
      
      * Avoid null pointer crashes when debugging startup.
      
      * Workaround for using wifi module on S2 with USB-CDC console.
      
      ---------
      Co-authored-by: default avatarJade Mattsson <github@frozenlogic.org>
      4cdebe71
  5. 27 Mar, 2024 1 commit
  6. 30 Jan, 2024 1 commit
    • Johny Mattsson's avatar
      Initial migration to IDFv5.0 · f126b6fe
      Johny Mattsson authored
      Plenty of dependency adjustments, printf format specificier updates,
      FreeRTOS type and macro name modernisation, not to mention API changes.
      
      Still plenty of legacy/deprecated drivers in use which will need updating.
      
      The following features have been removed due to no longer being available
      from the IDF:
        - ADC hall effect sensor reading
        - Configuration of SD SPI host via sdmmc module (now must be done first
          via the spimaster module)
        - FAT partition selection on external SD cards; only the first FAT
          partition is supported by the IDF now
      
      On the other hand, the eth module now supports the following new chipsets:
        - KSZ8001
        - KSZ8021
        - KSZ8031
        - KSZ8051
        - KSZ8061
        - KSZ8091
        - Possibly additional models in the LAN87xx series (the IDF docs aren't
          clear on precisely which models are handled)
      
      Further, the sdmmc module is now available on the ESP32-S3 as well.
      f126b6fe
  7. 05 Oct, 2022 4 commits
  8. 30 Sep, 2022 1 commit
  9. 05 Mar, 2022 2 commits
    • Philip Gladstone's avatar
      First attempt at adding support for the RMT device. (#3493) · ceb62993
      Philip Gladstone authored
      * Adding the first version of the rmt documentation.
      
      * Stub RMT module compiles.
      
      * This version seems to work in (at least) simple cases.
      
      * CLean up the docs
      
      * Minor fixes
      
      * Give the SPI module a chance of working...
      
      * Update to the released version of idf4.4
      
      * Try to get the CI Build to work in all cases
      
      * Try to get the CI Build to work in all cases
      
      * FIx a ringbuffer return issue
      
      * Remove bogus comment
      
      * Review comments
      
      * Better example of transmission
      
      * Review comments
      
      * Add table send example
      
      * Improved documentation
      
      * Documentation comments
      
      * Install the driver correctly.
      
      * A couple of doc updates
      
      * Fix typo
      ceb62993
    • Johny Mattsson's avatar
      IDF web server module (#3502) · cb434811
      Johny Mattsson authored
      * Added httpd module.
      
      Lua-interface to the standard esp_http_server component.
      
      * Added eromfs module.
      cb434811
  10. 20 Oct, 2021 1 commit
    • Johny Mattsson's avatar
      Switch to IDF-provided VFS and standard `io` module. · a2ba49e3
      Johny Mattsson authored
      The IDF-provided VFS resolves several issues:
      
       - The IDF components having a different view of the (virtual) file system
         compared to the Lua environment.
      
       - RTOS task/thread safety. Our legacy VFS was only ever safe to use
         from the LVM thread, which limited its usability. Upgrading it
         would have effectively required a reimplementation of the IDF VFS,
         which would have been a bigger task with larger on-going maintenance
         issues.
      
       - We're no longer needing to maintain our own SPIFFS component.
      
       - We're no longer needing to maintain our own FATFS component.
      
       - The legacy of the 8266's lack of standard C interface to the file system
         is no longer holding us back, meaning that we can use the standard
         Lua `io` module rather than the cobbled-together swiss army knife
         also known as the file module.
      
      Of course, the downside is that we'll either have to declare a backwards
      breakage in regard to the file module, or provide a Lua shim for the old
      functions, where applicable.
      
      Also included is some necessary integer type fixups in unrelated code,
      which apparently had depended on some non-standard types in either the
      SPIFFS or FATFS headers.
      
      A memory leak issue in the sdmmc module was also found and fixed while
      said module got switched over to the Espressif VFS.
      
      Module documentation has been updated to match the new reality (and I
      discovered in some places it wasn't even matching the old reality).
      a2ba49e3
  11. 16 Sep, 2021 1 commit
  12. 22 Aug, 2021 1 commit
  13. 11 Aug, 2021 1 commit
    • Johny Mattsson's avatar
      Add ESP32C3 support/coexistence. · f123d462
      Johny Mattsson authored
      The uzlib and parts of Lua had to be switched over to use the
      C standard int types, as their custom typedefs conflicted with
      RISC-V toolchain provided typedefs.
      
      UART console driver updated to do less direct register meddling
      and use the IDF uart driver interface for setup. Still using our
      own ISR rather than the default driver ISR. Down the line we
      might want to investigate whether the IDF ISR would be a better
      fit.
      
      Lua C modules have been split into common and ESP32/ESP32-S
      specific ones. In the future there might also be ESP32-C3
      specific modules, which would go into components/modules-esp32c3
      at that point.
      
      Our old automatic fixup of flash size has been discarded as it
      interferes with the checksumming done by the ROM loader and
      results in unbootable systems. The IDF has already taken on
      this work via the ESPTOOL_FLASHSIZE_DETECT option, which handles
      this situation properly.
      f123d462
  14. 15 Jul, 2021 1 commit