* Remove Peripheral/PeripheralRef
* Make ADC unit and channel structs more readable by avoiding const generics
* Remove unused parameter
* fix forgotten reference to the old ADCU syntax
* Mention that we have removed the prelude module
* try_into methods for changing the pin type
* feat: add `DB_12` adc attenuation and deprecate `DB_11` for ESP-IDF V5.0+
* fix: allow usages of deprecated `DB_11` in adc.rs
* fix: in adc example, use DB_11 for ESP-IDF v4 and DB_12 for ESP-IDF v5
---------
Co-authored-by: ivmarkov <ivan.markov@gmail.com>
* Bugfix: drop calibration handle on driver drop; more control on the raw-to-mv conversion
* Fix variable name
* Rename raw_to_cal to raw_to_mv to have less confusion as to what is going on
* Fix inline example
* Fix CI for the legacy driver
* Fix CI for the oneshot driver
* Fix examples in CI
* Fix wrong fn name
This replaces the Operation enum which was previously re-exported from
embedded_hal.
As of this commit, the enum is identical to the embedded_hal Operation,
except that there is no Word type parameter, as esp-idf-hal only uses u8
for SPI. Additionally, the `#[non_exhaustive]` attribute has been added
to allow for future expansion.
* Add first version of temp sensor driver
Code is very rudimentary and still suspect to change.
Notably, error handling is not implemented yet.
* Change cfg attribute to not any
* Rename TemperatureSensor to TemperatureSensorDriver
* Switch to `core::ptr`
* Add error handling
* Build the internal temperature sensor only on supported targets
* Fix the derives in TemperatureSensorConfig, TemperatureSensorClockSource
* Implement From<TemperatureSensorConfig> for temperature_sensor_config_t
* Use right clocks for temperature sensor depending on target
* Rename config and move it into own module
* Provide const new constructor for temperature sensor config
* Change config argument to be a reference
* Rename TemperatureSensor to TempSensor
* Avoid cloning config in temp driver constructor
* Add back derived Copy trait for TempSensorClockSource
* Add non_exhaustive option to TempSensorConfig
* Add temp sensor peripheral
* Cause panic if uninstalling the temp driver fails
* Implement Send for TempSensorDriver
* Make use of esp_idf_soc_temp_sensor_supported
* Add an example for temperature_sensor
---------
Co-authored-by: Luca Barbato <lu_zero@gentoo.org>
* 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