9 Commits

Author SHA1 Message Date
ivmarkov
ad305a909c Clippy 2025-03-24 09:28:01 +00:00
ivmarkov
d08f558588 Clippy for all examples 2025-03-24 08:30:55 +00:00
ivmarkov
17790a01db Fix ADC build issues on earlier released ESP-IDF 5.X; fix unexpected cfgs warnings in examples 2025-03-24 08:11:27 +00:00
Jagoda Estera Ślązak
6c3cc56df6
feat: add DB_12 adc attenuation and deprecate DB_11 for ESP-IDF V5.0+ (#520)
* 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>
2025-03-13 20:27:58 +02:00
ivmarkov
f20b9f71a5 Replace with 2024-06-16 07:50:15 +00:00
ivmarkov
16823abd7d Protect the legacy example; do not make the oneshot_legacy mod an API (yet) 2024-06-16 07:35:35 +00:00
ivmarkov
bb92e2a47e Async examples 2023-10-14 07:36:30 +00:00
ivmarkov
9fc2e8c61e
Async drivers (#279)
* 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>
2023-08-22 15:39:02 +03:00
monacoprinsen
8cd8c8c207
spi/adc_st7789_example (#125)
* spi_st7789_example

* added adc example

* added ADC example

* spi and adc examples

* updated adc_st7789 example

* removed st7789 adc example

* adc up to date

* clippy and fmt

* added dependencies

* adjusted path to assets

* changed adc pin

* added compile flags

* path
2022-11-08 18:27:37 +02:00