* commit test 1
test commit 2
next device
asd
* try example, haven't built yet
* Add feature flags for legacy RMT examples
Remove references to the ds18b20 specific device.
Add a feature flag `rmt-legacy` that, when enabled, will build the
original rmt modules from v4 of the esp-idf. When disabled, the v5
rmt interface can be used for one wire applications.
Implement the Iterator trait for a device search and use the Iterator
in the example.
* Add more feature guards to examples compile
* Add alternative main functions for examples
* Use std threading
* Add std to thread sleep
* use std duration
* correct use for legacy rmt component
* Remove local bindings and use the esp-idf-sys master
* fix a typo
* Remove esp-idf component inclusion
* Update gitignore
* Fix examples
* mut-ex out the example compilation
* add implementation for temperature readings
* Conditional compile
* esp4.4 compile
* Changes to cargo and config
* Remove OWDevice and simplify API
* Remove phantomdata that is not required
* adjust lifetimes for single search at a time
* Keep RMT peripheral and add channel to onewire
Moves the RMT driver into a private `driver` module, which will only be compiled in rmt-legacy mode.
Also reduce the number of cfg feature flags in examples by wrapping the implementation in a module.
* modularise examples
* Fix for CI
* update example name to make it pop
---------
Co-authored-by: Dane Slattery <dane@polarmonitoring.com>
Co-authored-by: DaneSlattery <dane_s@umantec.net>
* Fixes#443: Add new ResetReason enum items
* Fix examples/reset_reason.rs comments
* Add forgotten 5.1.3 version to conditions
* Add forgotten 5.1.3 version to more conditions
* rmt: wrap rmt_item32_t in a newtype
This makes it much easier to use `TxRmtDriver::start_iter` and
`TxRmtDriver::start_iter_blocking` (#113).
* examples/rmt_musical_buzzer: fix for ESP32
Possibly broken by #97, possibly never worked. The ESP-IDF repo
specifically excludes the ESP32 from the RMT musical buzzer demo
because its RMT unit lacks hardware looping. Before this change, the
demo would simply hang when trying to play the second note possibly
because the ESP32 RMT unit does not support asynchronous stopping.
As an added bonus, this example is now much easier to modify to
experiment with 1-bit chiptune synthesis by making every symbol
(cycle) accessible in the ISR iterator.
* rmt: remove Pulse::into_rmt_item in favor of Symbol::new
Also, factor Pulse pairs into function arguments for ease of use.
* Support for all async executors
* Make all Notifiucation primitives a public API
* Address a small typo
* Address a small typo
* Fix CI
* Tighten the notify APIs by not taking 0s
* Fix CI
* Fix changelog
* Fix changelog
* Fix the examples
* edge-executor support moved to edge-executor
* wake-from-isr feature for edge-executor
* Fix CI
* Bugfixing
* Clippy
* Upgrade to e-hal 1.0-rc1
* e-hal is no longer alpha
* Fix for ESP IDF < 5
* Unite all delay impls in a single module
* Model delays between transactions
* SPI: Make queueing it a bit more readable
* SPI: Plug delays
* Shorten the threshold for the Delay provider
* Clippy
* Fix the examples
* SPI: Detect last transaction in the presence of delays
* SPI: Introduce CsPin
* SPI: Introduce CsPin
* SPI: Mark delays with TODO
* Clippy
* SPI: Rename CsPin to CsCtl
* Transfer_transaction not necessary
* Hacky async TWAI driver
* Async TWAI: Custom priority and pin to core
* Async TWAI: Proper configuration of alerts
* Do not refer to esp-idf-sys as it is not an explicit dependency anymore
* Continuous mode ADC
* GPIO: Switch to the common notification; remove alloc req for async
* (WIP) async SPI
* Notification callbacks in async SPI
* SPI: Lower the code repetition
* Fix the build
* I2S pre-async simplification
* Async methods for I2S
* SPI: Wait for the transaction to complete on drop
* More flexibility in PinDriver::wait_for
* Remove the gargantuan mutex for now
* Arrays supported as ADC channels
* Fix timeouts
* ADC: measurement shape
* Fix the dependencies
* Fix CI
* ADC: cont config
* ADC: better atten API; fix delays
* ADC: Raw handle access
* I2S: Make config more symmetric with the other drivers
* I2S: Remove unnecessary generics
* Improve the semantics of read/write vrt partial r/w
* Review feedback
* Clippy
* Shorten static array initializers
* Do not glob-import all of esp-idf-sys
* SPI: make notifications non-static
* SPI: Remove the async fetch() hack; extend async support
* Fix the CI
* SPI: Restore WriteIter impl
* Bugfix: tx/rx handles mismatch
* I2S: Utility methods to write the whole buffer
* I2S Bugfix: wrong translation to native format
* More ergonomic API for TickType
* unsubscribe during reset will fail if ISR service is not enabled yet
* Typo
* Same defaults
* No need for unsafe here
Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
* Assert that ESP_ERR_TIMEOUT should never happen
* Safe variant of completion
* ADC: wrong timeout conversion
* Proof of posession of i2s0/spi3 for esp32/esp32s2
* write_async only available on ESP IDF 5+
* Option to transmute the adc buffer to pcm
* ADC: only expose PCM conversion where it is possible (esp32/esp32s2)
* ADC: Fix channel chaining
* ADC: fix the CI
* ADC: Nullify everything
* ADC: as_pcm32 for riscv and esp32s3
* ADC: as_pcm32 for riscv and esp32s3
* ADC: read_raw
* I2S: Proper driver shutdown
* ADC: Fix clippy and compile errors on ESP-IDF 4
* Compat with ESP-IDF master
---------
Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
* Refactor Rgb struct
Moves hsv convertion into
an associated function and further
implements From<Rgb> for u32.
* Update rmt_neopixel.rs
* Replace if-else with pattern matching
* embedded-hal::delay no longer returns Error
* embedded_hal::digital add generic GpioError
* spi: init work: from closure to Operation pattern
* first full implementation
* i2c: remove iter fn droped by e-hal master
* make ci work by temp. refere to e-hal master
* more ci fix
* make clippy happy
* more ci fighting
* gpio: cursed repair of ulp_processor
* fmt
* spi: repair example + get rid of generic's
* dep: change to new e-hal release
* fix e-hal 0.2 comp & fix bus
* fmt
* clippy
* remove debug artifacts
* test ci with e-hal-nb-alpha.1
* e-hal-nb to alpha.2
* modified comments
* impl e-hal delay to general purpose provider
* use embedded_hal_error macro for riscv-ulp-hal
* typo
* impl pwm alpha10
* fixed wrong return error on async gpio
* duplicated impl error macro for ulp
* WIP - PCNT implementation for idf v4
* use from core not std
pass pins as PeripheralRef
store PinDriver in PcntPin
* try a allocate/deallocate stratagy for PCNT UNITS (like esp-idf v5)
* update pcnt example
* WIP - PCNT implementation for idf v4
* use from core not std
pass pins as PeripheralRef
store PinDriver in PcntPin
* try a allocate/deallocate stratagy for PCNT UNITS (like esp-idf v5)
* update pcnt example
* use Arc/Mutex for PcntPin so Pnct can be Send
* update pcnt encoder example
* add partial esp-idf 5 pulse_cnt support (no watches/events)
requires update in esp-idf-sys to choose implementation
uses pcnt on esp-idf 4
uses pulse_cnt by default on esp-idf 5
* fix pcnt compilation on esp-idf 4
* implement interrupt service
* added some documentation
* fix subscribe - trampoline did not work with captured values.
update example to support either
* no need to initialize logging in example
* use esp_idf_sys::*
* Implement From not Into
* switch from bitflags to enumset
* typo
* switch #[doc] to /// style
* gate uses of Box with alloc feature and use alloc::boxed::Box
* rename to PcntDriver and make Pcnt Peripherals
* use `impl Peripheral<P = impl InputPin>` instead of `AnyInputPin`
* small cleanup
* rename config() -> channel_config()
implement defaults on PcntChannelConfig
* some cleanup on idf v5 pulse_ctr
* no need for PcntChanConfig, just use flags
* use comment style documentation not `#[doc=""]`
* small tweak to pnct example
* review fixes (the easy ones)
* added deps for the pcnt example (dev-dependencies)
* cargo fmt
* pub const fn new for PcntChanFlags
* pub const fn new for PcntUnitFlags
* fix compilation for esp-idf 4
* pass in all pins in PcntDriver::new
use PinIndex to specify pins to a channel
* remove unused lifetime
* use a simple macro to convert Option<> pin to a pin number
* cargo fmt
* remove V5 for now
fix #cfg's for when/where pcnt is available
* fix #cfg's for when/where pcnt is available
* fix #cfg's for when/where pcnt is available
* gate access to ISR_HANDLERS in drop with `alloc`
no need for `not(feature = "riscv-ulp-hal")` as pcnt is not included for `riscv-ulp-hal`
* cargo fmt / clippy
* stub out the pcnt example on an unsuported device
* - drop esp-idf-svc from dev-deps (compile error on esp-idf 5)
- use println!() instead of log::info!() in pcnt example
* fix ocnt example compile for riscv32imc-esp-espidf
---------
Co-authored-by: Chris Liebman <chris.l@taboola.com>
* Correct endianness of RMT signal
Bits were sent reversed, which worked for 0xff but not at smaller values to dim the LED. Also added rainbow example using a hsv function.
* cargo fmt
* Removed logger and fixed delays
* fix: #180 Remove redundant info in LedcDriver::new
This is an implementation of one of the possible solutions to the issue.
Signed-off-by: Raphael Höser <raphael@hoeser.info>
* Remove speed_mode method from LedcTimerDriver as it's not needed.
* Fix rustfmt issues
Signed-off-by: Raphael Höser <raphael@hoeser.info>
* overhaul UART to support single wire trasimitters/receivers
* add missing methods for uart transmitter/receiver
* fix `uart_config_t`'s `source_clk` being part of a union in `esp-idf v4.x`
* add `esp32c2`'s `PLL F40M` `APB` clock
* revert `uart_wait_tx_done` to timeout of 0
* fix incorrect order in `uart_driver_install`, `rx_buffer` shou always exceed `UART_FIFO_SIZE`
* Refactor `Owner` enum
* Fix double drop on `into_split`
* Add missing `count` methods for the UART drivers, change their return to be able to fit the maximum allowed value, don't run `drop` on temporary internal borrows, update example