828 Commits

Author SHA1 Message Date
Roman Krüger
6cb3ea5b9e
- Added GPIO pins 21-27 to esp32h2 (#501)
- fixed GPIO handler array size for esp32c2
2024-12-16 15:16:39 +02:00
ivmarkov
506dc9bb5e Switch to just-released cmake-rs 2024-11-26 08:30:26 +00:00
ivmarkov
280ae0099a Fix the CI 2024-11-22 13:45:21 +00:00
ivmarkov
67be0e6f3f fix for #518 2024-11-22 13:39:16 +00:00
ivmarkov
97c01ef814 Fix CI 2024-11-08 05:43:30 +00:00
ivmarkov
fb886fa743 Fix CI 2024-11-08 05:29:47 +00:00
ivmarkov
57cc53dae7 Clippy 2024-11-05 10:21:54 +00:00
ivmarkov
cdc1eeecec Need the latest esp-idf-sys 2024-11-05 10:00:21 +00:00
ivmarkov
8733e04835 Clippy 2024-11-05 09:35:12 +00:00
ivmarkov
6bbb284859 Fix CI bu disabling cc-rs target based flags generation 2024-11-05 08:01:14 +00:00
ivmarkov
3c06f4dc59 Compat with ESP IDF master 2024-10-29 17:45:31 +00:00
ivmarkov
ac8aff796b Workaround for a problem where pushing to the queue might fail 2024-10-29 17:45:15 +00:00
ivmarkov
a2b95b85f2 Popping from the queue is not guaranteed to succeed if we were woken up spuriously 2024-10-29 16:14:36 +00:00
ivmarkov
30d4874def Fix a crash when dropping SpiDriver 2024-10-29 16:04:37 +00:00
g
7d5e233ac9
Fix ReadScratch command buffer size (#494) 2024-10-21 22:42:22 +03:00
Jimmer
ff343b67f3
Update spi.rs for correct label in gpio_cs capture (#492) 2024-10-11 16:43:48 +02:00
Small Brain
4d59fbe758
Typo fix in task docs (#489)
- small typo fix "fo" -> "for" in task docs
2024-10-10 23:11:44 +03:00
vpetryaev
59228d32e6
Fix drop for AdcDriver in deregister event callbacks (#487) 2024-10-06 14:07:05 +02:00
ivmarkov
03571ac905 Clippy 2024-10-04 08:23:07 +00:00
ivmarkov
aabc000d5e Clippy 2024-10-04 07:51:51 +00:00
ivmarkov
b01224cdfb Fix the build for ESP IDF 4.4.X 2024-10-01 07:14:28 +00:00
ivmarkov
013f2e4b9f Fix the build for ESP IDF 4.4.X 2024-10-01 06:57:23 +00:00
ivmarkov
6c06991062 Fix the build for ESP IDF 4.4.X 2024-10-01 06:46:23 +00:00
ivmarkov
b532ea6a78 Clippy 2024-10-01 06:42:56 +00:00
ivmarkov
d12abc976a Fix the build for ESP IDF 4.4.X 2024-10-01 06:36:31 +00:00
ivmarkov
b9d0ffd502 Fix CI by temporarily not using v5.1 2024-10-01 06:13:16 +00:00
ivmarkov
64adce1381 Fix CI by temporarily not using v5.1 2024-10-01 06:05:02 +00:00
Eli Lipsitz
bba51cdfc9 spi: Add SpiBusDriver::operation and operation_async
This allows the use of the Operation enum with SpiBusDriver, enabling
support for multi-line transfers.
2024-09-29 19:39:47 +02:00
Eli Lipsitz
f21a58818f spi: Add Operation::ReadWithWidth and Operation::WriteWithWidth
This adds support for multi-line half-duplex SPI operations.
2024-09-29 19:39:47 +02:00
Eli Lipsitz
edf7527e34 spi: Fix half-duplex read transactions
Half-duplex read transactions should not use a write buffer. Previously,
only 3-wire half-duplex transactions followed this, but the esp-idf
error-checking logic applies to all half-duplex transactions.
2024-09-29 19:39:47 +02:00
Eli Lipsitz
a0bae3035a spi: Add custom spi::Operation enum
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.
2024-09-29 19:39:47 +02:00
Eli Lipsitz
3ebdcb5c08 spi: Add LineWidth enum 2024-09-29 19:39:47 +02:00
Eli Lipsitz
b0aa07d828 spi: Add SpiDriver new_dual and new_quad constructors 2024-09-29 19:39:47 +02:00
Eli Lipsitz
3dbf3fe332
Fix esp_reset_reason_t constant names (#483)
The esp_reset_reason_t ESP_RST_PG and ESP_RST_CPU constant names don't
seem to exist. Instead, the actual names (added in esp-idf 5.2.2) are
ESP_RST_PWR_GLITCH and ESP_RST_CPU_LOCKUP.

The incorrect names caused the second-to-last match arm to be
interpreted as a binding name (that is, a catch-all), causing incorrect
behavior and build warnings when using esp-idf 5.2.2 and up.
2024-09-26 10:19:21 +03:00
Eli Lipsitz
d3247c29c8
Clippy (#484) 2024-09-26 10:17:25 +03:00
ivmarkov
4f4478718e Apply latest cargo fmt 2024-09-23 06:07:23 +00:00
ivmarkov
030a721445 Allow modem splits even when only HW coex is used 2024-09-21 15:00:25 +00:00
ivmarkov
9b8ff7b96b Allow modem splits even when only HW coex is used 2024-09-21 14:57:57 +00:00
ivmarkov
01f0518d92 Re-use the SPI config struct of the SPI driver 2024-09-19 06:12:13 +00:00
ivmarkov
eb791c9cca Make the UART config to ESP-IDF C config reusable outside the UART driver 2024-09-19 05:48:31 +00:00
ivmarkov
09dc34aa6b Support the thread modem peripheral on the c6 MCU 2024-09-17 10:49:53 +00:00
GamerBene19
a619f13871
Add support for ESP internal temperature sensor (#337)
* 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>
2024-09-09 19:46:26 +03:00
hyx0329
e20ef5c92f
Add an example of using interrupt directly without async (#474) 2024-09-09 18:16:26 +03:00
ivmarkov
b9baeedfd9 Clippy 2024-08-26 08:30:09 +00:00
ivmarkov
580a5f8c9b Clippy 2024-08-26 08:14:00 +00:00
ivmarkov
1ef5f8de66 Replace 0 with delay::NON_BLOCK 2024-08-22 11:22:07 +00:00
ivmarkov
a2e2888855 Fix for #475 2024-08-22 11:05:29 +00:00
DaneSlattery
aa0e257ffe
RMT Onewire Peripheral (#454)
* 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>
2024-08-10 16:11:38 +03:00
Frederick Vollbrecht
098e2dfb19 bump enumset to at least use 1.1.4 such that EnumSete::empty() is const 2024-08-09 17:27:20 +02:00
ivmarkov
72f6448c64 Fix no_std build 2024-08-05 21:46:52 +00:00