* Allow splitting off of gpio drivers
* Extract and correct low level connection bits
* Add Input/OutputSignal::connect_to
* Remove unnecessary public API
* Fix typos
* Remove unused private methods
* Add separate Direct signals that do bypass the GPIO matrix
* Do not disable stage input
* Clean up spi_slave test
* Constrain to static Flex
* Improve docs
* Separate input_enable and open_drain parameters
* Link to the chapter
* Changelog
* Clarify
* Remove hidden public SPI API
* Fix in_progress flags not being set
* Remove redundant checks, fix full-duplex flag
* Remove now-redundant Send impl
* apply_config
* SetConfig
* Return ConfigError
* Unwrap config result in ctor
* Do not read to set update bit
* Deduplicate
* Try to bind interrupts to the correct core
* Inline poll_count into read_count
* Clean up
* Make sure only a single update is done at a time
* Changelog
* Fix docs
* Correct the channel count
* Assign enough timers for HIL test
* Use a lock to prevent re-update
* Remove locking, use esp-idf implementation
* Document timer count requirement
* Remove configure_for_async
* Add into_async and into_blocking to I2c
* Add into_async and into_blocking to UsbSerialJtag
* Rework LCD_CAM
* Rmt
* RSA
* TWAI
* Uart
* Documentation
* Disable interrupts set on other core
* Move configure into RegisterAccess
* Disable interrupts on the other core
* Use EnumSet in RMT
* More granular init and deinit per driver
- Rework EspWifiInit
- No longer require EspWifiInitFor
- Add Drop impls for each driver, and add Drop for EspWifiController to
fully deinit the stack
* unwrap! more stuff
* fixup examples and esp-now
* unwrap less stuff
* review feedback
* seal wifi traits, allow rng or trng to init esp-wifi
* changelog and migration guide
* return wifi error in esp now constructor instead of panic
* i2s_parallel for esp32 - partially working
* i2s_parallel for esp32 - works sync 16bit (still WIP)
* i2s_parallel - add 8-bit
* i2s_parallel - naive async implementation
* i2s_parallel - clippy
* add examples (mainly for testing now and we can reduce these before merge)
* set tx_wrx2 in 8 bit mode or it updates on half clocks!
* adjust clock config (still really a hack)
* better clock calculation/configuration
* no need to reset dma or interrupts in start, the DMA DmaTxBuf handles that
* seems to need a short delay during tx_reset
* use 20 clocks instead of 1us
* 1us delay between dma start and tx_start (like idf)
* changelog & documentation
* remove debugging functions
* no need for option in example
* make async example actually use async & remove Option
* implement Drop for I2sParallelTransfer
* fix signal offset comment for I2S0
* small cleanup in i2s_parallel examples
* added a note re I2S0 not supporting true 8bit
* update doc & fmt
* instace functions take &self
* fmt
* if run at 240MHz (CPU) delay needs to be bigger
* wait for fifo on start and fixes for 240MHz
* update for esp-hal-changes
* fmt
---------
Co-authored-by: Dániel Buga <bugadani@gmail.com>
* Check for error when pushing into a circular dma transaction too late
* Adapt tests
* Adapt example
* Don't block forever if trxing to pop from a circular DMA transfer too late
* Have a dedicated error for circular-DMA reading/writing too late
* Stop I2S RX before resetting it
* Migration guide
* Address review comment, make CI pass
* Adopt ideas from review
* Fix
* Update esp-hal/MIGRATING-0.21.md
Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
* assert
---------
Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
* Merge signal fns
* Remove logic from UART Instance, remove uart_number
* Use the unwrap macro
* Place peripheral info into static structs
* Clean up
* Clean up
* Update todo
* Rename
* Separate out state
* Change example to set max clocks
* Update esp-hal/src/lib.rs
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
---------
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
* Update to latest git revision of all PACs
* Update RSA module to reflect changes in PACs
* Update TWAI module to reflect changes in PACs
* Further simplification
* Include ROM API symbols
* Fixes and CHANGELOG.md
* Fix
* Move migration steps to the right crate's migration guide
* Remove `-Trom_functions.x` where necessary
* Add option to place more `.rodata` in RAM for performance
* Make CI green, again
* Removed unnecessaries
* Split option into two
* Make `place-switch-tables-in-ram` default
* Xtensa
---------
Co-authored-by: Scott Mabin <scott@mabez.dev>
* Drop State from DMA
* Simplify Error paths
* Cancel dropped transfers, fix and test
* Fix C6
* Avoid cancelling a completed transaction
* Do not implement DmaTxRxBuf for references
* Remove unnecessary import
* Merge BufferRef structs
* Move wait impl to the peripheral
* Allow the current byte to complete
* Restore SpiDmaTransfer::is_done
* Explain cancel code
* Fix test formatting
* Changelog
* Simplify implementation
* Make sure everything gets dropped
* Remove unnecessary PhantomData
* Remove OptionalFuture
* Adjust test to a more realistic clock frequency
* Migrate Camera to a move based API
* update
* update
* ManuallyDrop
* Add default channel to transfer struct
---------
Co-authored-by: Dominic Fischer <git@dominicfischer.me>
* Fix QSPI mode on non-ESP32
* Update tests to count pulses on pins separately
* Fix ESP32 addressing phase issue
* Use defmt's assert
* Set fastrd bit
* Apply pulldowns to define signal level when not driven
* Transfer address bits in data phase on ESP32
* Changelog
* Use a separate buffer for the address, make the workaround configurable
* Remove now-unnecessary additions
* Force SpiDma to remain Send
* Clarify wording, remove prefix
* Clean up manual register manipulation
* Fix byte order
* support psram in DmaTxBuf
* add example that sometimes works :-(
* fmt
* cleanups
* allow chunk_size upto (including) 4095
* this test is passing for me now
* remove chunk_size and compute based on block_size
* return error in `prepare_transfer` if psram is found on non-esp32s3
add `dma_tx_buffer` macro
* missing parens
* changelog
* default 4092 for esp32 & fmt
* no errors anymode
* use block_size is_some to flag invalid psram in prepare_transfer
* drop block_size from macro, the buffer allocation was not being aligned - its not needed for dram anyway.
* missed macro example
* use defmt::Format that decodes owner like Debug
* fix typo
* DmaTxBuf: its an error if buffer is in psram and block_size is none
* DmaTxBuf: its an error if buffer is in psram and block_size is none
* update for PSRAM feature changes
* address alignment comments
add simple test
* fmt
* better alignment test
* revert alignment test
---------
Co-authored-by: Juraj Sadel <juraj.sadel@espressif.com>
* Update `hil-test` package dependencies, add simple test for async delay with `SYSTIMER`
* Implement `embedded_hal_async::delay::DelayNs` for the `TIMGx` timers
* Improve tests slightly
* Update `CHANGELOG.md`
* Enable `delay` and `delay_async` tests for the ESP32-H2
* Fix error in `delay_async` test after rebasing
* ESP32 does not have `SYSTIMER`, so don't try to test it :)
* Protect int_ena modifications with INT_ENA_LOCK, clear int_clr in ISRs, move interrupt binds from Future constructor into new_async constructor
* Fix wrong imports
* Address reviews: Remove duplicated/useless code and add HIL test for delay_us and delay_ms
* Implement DelayNs on Target instead of Periodic
* clean dead code
* fix after rebase
* fix build errors
* More accurate nanos to ticks calculation
* Fix wrong handler passed to set_interrupt_handler()
* Update esp-hal/src/timer/timg.rs
Co-authored-by: Dániel Buga <bugadani@gmail.com>
* cleanup left over
---------
Co-authored-by: Juraj Sadel <juraj.sadel@espressif.com>
Co-authored-by: Juraj Sadel <jurajsadel@gmail.com>
Co-authored-by: Dániel Buga <bugadani@gmail.com>
* Some more gpio cleanup
* Allow TWAI loopback using the same pin, enable ESP32
* Impl Format for ErrorKind
* Generic frame constructors
* More TWAI cleanups
* Fix signals
* Set self-reception bit
* Teach users to use const blocks
* Fix resetting TWAI
* Set opmode when starting
* Apply errata workaround
* Fix ESP32 baudrate
* Clean up read_frame a bit
* Changelog
* Clean up clippy
* Fix compile errors
---------
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
* per TRM the TX clock should only be re-enabled after tx_start
* CHANGELOG
* added tests to check the for the correct number of clocks during valid
* parl_io: fix test for esp32h2
* tests: parl_io: h2 PCNT does not like 20MHz
* [1/x] Use enumset for DMA interrupts instead of countless functions
* [2/x] Remove the countless functions from RegisterAccess
* Use Into
* [3/3] Use enums everywhere in the DMA module
* Remove redundant enum_set!
* Remove `available_` prefix
* Use `pending_` prefix
---------
Co-authored-by: Dominic Fischer <git@dominicfischer.me>
* Clean up qspi test cfgs, enable on ESP32
* Correct comments
* Clean up init_spi_data_mode
* Fix qspi_write on ESP32
* Further cleanup in SPI driver
* Clean up qspi_read
* Fix qspi_write_read test on ESP32
* Merge QSPI tests
* Clean up test
* Attempt to fix test GPIO assingment
* Update esp-hal/src/spi/master.rs
Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
* Update esp-hal/src/spi/master.rs
* Make sure pins have no internal pullups
---------
Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
* Make most of PSRAM features into run-time configs
* Make CI green again
* Make CI green again
* Update esp-hal/MIGRATING-0.20.md
Co-authored-by: Scott Mabin <scott@mabez.dev>
* Use Range
* CI
* Rebase fixes
* Update esp-hal/src/lock.rs
Co-authored-by: Scott Mabin <scott@mabez.dev>
---------
Co-authored-by: Scott Mabin <scott@mabez.dev>
* Cfg features, not devices
* Remove InterruptBinder
* Clean up allow(declare_interior_mutable_const)
* Small embassy cleanup
* Enable dma-macros for 32 and S2
* Use MEM2MEM1 on C2
* Remove esp32-specific code from test
* feat: Allow configuring the watchdogs in the init config
* docs: Update changelog
* refactor: Remove unnecesary unsafe
* feat: Add a config module
* test: Add some init tests
* style: Rename all ocurrences to esp_hal::config::Config::default()
* style: Fix format
* fix: Doc errors
* revert: Move Config struct to lib.rs
* tests: Add default config test
* test: Add a test with CpuClock::max()
* test: Add timg1 test
* feat: Move Config struct to config module and reexport it in lib.rs
* fix: Fix init compilation for C2
* revert: Move Config struct to config module and reexport it in lib.rs
* fix: Use proper timergroup
* Move lock impls out of lib.rs
* Reimplement Lock using ReentrantMutex
* Reimplement Lock using ReentrantMutex
* Refactor away some duplicate lock logic
* Return owner from try_lock
* Rework critical section to avoid spinning in irq-free context
* Fail compilation on unknown architectures
* Explain what RESERVED_MASK is
* Create one lock per timer group
* Re-enable tests
* Clean up
* Pass two lengths to configure_datalen
* Add Dominic's test changes
* Ensure DMA buffers are properly aligned
* Impl Format on DmaDescriptor
* Fix waiting for transaction to complete
* Fix DMA transfers
* Changelog
* Avoid explicit panic in test case
* Remove redundant test case
* Reintroduce wait for ESP32
* Move binary logging to sys crate
* make ieee take radio clks by value
* rename wifi-logs to binary-logs and fix compilation
* update sys to use correct size types
* move rtc_clk_xtal_freq_get to esp-hal
* changelogs and migration guide
* s/wifi-logs/sys-logs/g
* activate log features for esp-wifi-sys
* ble log fix c2
* fix logs using latest sys rev
* fix warning
* Initial esp-config poc, replacing the place-spi-driver-in-ram feature
* Allow documentation generation for configuration options
* add `Value::Number` and a macro to parse
* Add Value::String and replace esp-wifi's config
* repo maint
* make bool parsing stricter and number parsing more flexible
* use hand rolled const str to int
* Collect unknown config options
* friendly errors
* also batch invalid values
* dump msrv to 1.79
* Mention perf boost from disabling logging
* review suggestions
* output selected config
* changelogs and migration guides
* review feedback
* avoid multiple case conversions where possible
* refactor generate, fix bug, add full test
* run host tests in CI
* add more esp-config tests
* review comments
* add cargo env workaround
* feat(buzzer): Add `esp-hal-buzzer` to drive a piezo-electric buzzer.
Provides a driver for a piezo-electric buzzer by abstracting LEDC and offering a user-friendly API for a buzzer
* Move songs into example and refactor songs module.
* Move `esp-hal-buzzer` to https://github.com/esp-rs/esp-hal-community/
* Update `CHANGELOG.md`
---------
Co-authored-by: Jesse Braham <jesse@beta7.io>
* Refactor test_send_receive_different_baud_rates_and_clock_sources
* Don't rely on external connections for UART test
* Enable (failing) RcFast for C2/C3
* Make sure fast clock is enabled
* Recover from I2C errors (the hard way)
* Adjust test to cover the problematic case
* Replace macro-usage
* CHANGELOG.md entry
* Appease Clippy
* TIL: `Result::inspect_err` exists
* Turn public `recover` into private `internal_recover`
* Allow accessing signal list via ErasedPin
* Replace AnyPin with more flexible signal config
* Update tests and examples
* Fix enable_from_gpio value
* Access signals from pin drivers
* DummyPin is not a pin
* Remove redundant public fns
* Various fixes, rename ErasedPin
* Changelog
* rustfmt
* Update i8080
* Typos and endless recursion
* Drop Pin suffix from traits
* Extract AF conversion
* Touch up changelog
* Clean up spi tests
* Refactor pull resistor handling
* Don't disable configured output functionality
* Clean up TODO
* Tweak docs
* Clean up examples
* Set DEFMT_LOG in CI
* Set DEFMT_LOG in CI
* Set DEFMT_LOG in CI
* Fix BLE vs DEFMT issue
* Fix ESP32 defmt problems in psram.rs
* Use `defmt` feature on `bt-hci`