794 Commits

Author SHA1 Message Date
Frederick Vollbrecht
91b6c3a504 fix missing EnumSet import 2024-06-01 14:12:06 +02:00
Frederick Vollbrecht
5a741ae248
Merge pull request #424 from esp-rs/high-speed-ledc
(ESP32 only) Support for the high-speed channels
2024-05-26 17:17:12 +02:00
ivmarkov
127a903a53 Add high speed indicator 2024-05-24 07:51:21 +00:00
ivmarkov
fefb4cfa6a (ESP32 only) Support for the high-speed channels 2024-05-23 19:19:35 +00:00
ivmarkov
2ae14905c6 Clippy 2024-05-23 18:55:49 +00:00
Frederick Vollbrecht
51afc5ee72
🗑️ remove deprecated 4.3 api (#420) 2024-05-23 10:44:41 +03:00
Frederick Vollbrecht
f060df2b59
fix esp-idf >= 5.3 (#419)
* fix esp-idf >= 5.3

* gate the newly introduces field correctly

* cammel_case clippy
2024-05-23 10:42:30 +03:00
ivmarkov
329ff909ef Clippy 2024-05-23 06:40:03 +00:00
empirephoenix
c3842f1a7d
Fix for #412 (#415)
* add initial i2c timeout rework for newer esps

* rewrite with direct approach

* fix formatting

* clippy :1

* use integer calculation as suggested

* cleanup code and variable names

---------

Co-authored-by: Empire Phoenix <empirephoenix@yahoo.de>
2024-05-22 15:04:52 +03:00
Frederick Vollbrecht
594512228b
Merge pull request #399 from Kezii/ledcpin
add config_with_pin method to LedcDriver
2024-05-09 22:19:25 +02:00
ivmarkov
140865a34f Fix CI 2024-05-06 18:37:06 +00:00
Frederick Vollbrecht
07e2a9e000
Merge pull request #414 from diajowe/add_delayMs_u8
Added DelayUs and DelayMs U8 impls for Delay
2024-05-06 19:20:44 +02:00
jowe
b7d2a8745e Added DelayUs and DelayMs U8 impls for Delay 2024-05-06 17:37:15 +02:00
vpochapuis
a3371b38d8
feature: expose C api cs_pre_trans_delay in SpiDriver (#266)
* feature: expose C api `cs_pre_trans_delay` in `SpiDriver`

* docs: add explanation on Duplex specifities for cs pre-transaction delays

* fix(spi): add missing pre transaction parameters for C config struct

---------

Co-authored-by: vchapuis <vincent@chapuis.ovh>
2024-05-06 08:27:55 +03:00
elotom
26b5db8286
Add CAN Frame flags (#411) 2024-04-30 07:21:39 +03:00
empirephoenix
a2bb85c6e7
Enable pcnt for esp32c6 (#407)
* Enable pcnt for esp32c6 as well https://docs.espressif.com/projects/esp-idf/en/stable/esp32c6/api-reference/peripherals/pcnt.html

* Also enable pcnt peripherals for esp32c6

* also initialize the pcnt peripherals

---------

Co-authored-by: Empire <empirephoenix@yahoo.de>
2024-04-21 22:53:51 +03:00
Owen Walpole
66152dbaa5
clippy: nightly lints (#406) 2024-04-17 21:21:58 +03:00
Frederick Vollbrecht
e30d7ab708
Merge pull request #402 from portasynthinca3/master
Fix FixedLengthSignal::set
2024-04-08 17:05:29 +02:00
Anna Antonenko
97b80e52fc
fix: FixedLengthSignal::set 2024-04-06 17:47:29 +03:00
Kezi
fcac1312ae only add config_with_pin method 2024-04-03 17:29:51 +02:00
Kezi
65e1921b65 no pub for apply_config 2024-04-02 21:29:34 +02:00
Frederick Vollbrecht
7db642c37b
Fix CI - New Clippy Lints (#400)
* remove redundant outer cfg attr

* more clippy

* cfg fix
2024-04-02 12:16:10 +01:00
Kezi
738726e188 add set_pin method to LedcDriver 2024-04-02 02:17:56 +02:00
Scott Mabin
603cef87cc
Update docs url (#391) 2024-03-08 19:35:53 +02:00
Frederick Vollbrecht
143db47568
add missing hysteresis filter option for esp32h2 in gpio (#387)
* add missing hysteresis filter option for esp32h2 in gpio

* fix clippy
2024-03-06 16:59:17 +02:00
hutchisr
8aa31318f4
Add GPIO20 for esp32-pico-mini-02 (#370) 2024-03-06 15:19:15 +02:00
David Ventura
e3d3205b86
Make Symbol Clone & Copy (#386) 2024-03-06 15:18:15 +02:00
Jonas Grawe
9e364d5420
feat(reset): Added restart return type (#383)
* feat(reset): Added restart return type

* chore: fmt
2024-02-26 08:56:41 +02:00
ivmarkov
04ad4299a8 New release v0.43.1 2024-02-21 21:02:20 +00:00
ivmarkov
f728cf6863 Always use the core prelude 2024-02-21 10:26:43 +00:00
ivmarkov
201ef13ab6 Always use the core prelude 2024-02-21 10:05:52 +00:00
adam-53-r
0360fc8d0a
Fixed one character typo. (#381) 2024-02-20 14:18:13 +00:00
Kezi
51e761ab51
Remove 4096 limit for SPI dma transfer size (#379) 2024-02-18 13:25:21 +02:00
Michael Büsch
81675ccbf5
Delay: Some cleanups and documentation (#376)
* TickType: Make all functions const

* delay: Inline small functions

* Unexport the raw ets_delay_us()

The raw unsafe ets delay function is not useful in user programs.
Programs should use Ets::delay_us() instead.

* delay: Add some documentation comments

* delay: Implement Default for Delay
2024-02-08 14:29:14 +00:00
Michael Büsch
e6091c027a
Improve delay/timer errors and rounding calculations (#374)
* delay: Remove unnecessary warning suppressions

* Improve system tick division and rounding

TICK_PERIOD_MS might include an error, if 1000 ms is not divisible by the configured tick rate.
Do not use it internally for converting between ms and ticks.

Also, always round up when dividing.

* Round delay times up

It's typically desired to round delay times up instead of down,
because a delay usually waits for a thing (e.g. hardware) to finish.
If we would round down, it is more likely to cause ill effects than
rounding up. The user code usually expects delaying a bit more.

In case of the coarse timer the "waiting a bit more" may be fairly
large. But if the user code uses a coarse timer for small delays
it's a problem in the user code.

This change also converts a couple of 'as' conversions to 'into()' calls.

* Export tick rate in Hz instead of tick period

because the division may introduce a rounding error on certain configurations.

* Make TickType::new_millis() pub

as counterpart to the existing as_millis()

* Ceil round Duration when converting to ms

We carefully saturate, even though it's unlikely that big durations
that overflow an u64 ms are supplied.

* delay: Replace constants with names

* Implement DelayNs::delay_ms()

The default implementation from embedded_hal is not ideal for
us, because it calls delay_ns() which we don't really support.
It causes unnecessary computation and rounding.
2024-02-07 17:52:05 +02:00
Frederick Vollbrecht
ab4f3c8597
make cargo espflash work by adding a partition.csv (#375)
* make cargo espflash work by adding a partition.csv

* add p4 as an option
2024-02-05 09:16:17 +02:00
ivmarkov
8d2b9a574e Update changelog for the RMT driver changes 2024-01-31 13:43:57 +00:00
David Sheets
5657073293
RMT symbols and musical buzzer example bugfix for ESP32 (#354)
* 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.
2024-01-31 15:39:29 +02:00
ivmarkov
e8370811f6 Minor changelog fix 2024-01-31 13:37:38 +00:00
Frederick Vollbrecht
307bd3b258
don't touch pullups on reset while init PinDriver (#344)
* don't touch pullups on reset while init PinDriver

ivan i am a sinner

clippy + fmt

clippy

more sinning in RTC

* fix missing unsafe

* cleanup

* extend the usage of reset_without_pull on drop + added changelog

* replace mem_froget with drop
2024-01-31 15:36:03 +02:00
ivmarkov
1bbda81705 New release v0.43.0 2024-01-26 13:30:01 +00:00
ivmarkov
5733efa31b Make TickType_t a public api of the delay module (to be used in esp-idf-svc too) 2024-01-26 09:55:16 +00:00
ivmarkov
64172599b9 Update changelog 2024-01-26 09:39:49 +00:00
ivmarkov
2b4b72069e Fix #365 2024-01-26 09:38:22 +00:00
ivmarkov
8756ef684d Fix #362 2024-01-26 09:37:22 +00:00
ivmarkov
f27b80513e Fix #362 2024-01-26 09:36:48 +00:00
ivmarkov
5ed5d8aa7b Fix #362 2024-01-26 09:28:15 +00:00
ivmarkov
16a10d077c Unify cargo config accrss the esp-idf crates 2024-01-25 17:56:01 +00:00
ivmarkov
c187ed38c1 Clarify the comment, as suggested 2024-01-24 22:47:13 +00:00
Iván Sánchez Ortega
e7f6ac8f1f
Use restore-state-none feature in optional dependency critical-section (#371)
This should provide a slightly user-friendlier error message in the case that a user enables a different `restore-state` in `critical-section`.

Right now it's possible to e.g. enable the `std` feature on `critical-section`; `cargo` will not complain but `rustc` will complain about the return types of the `CriticalSection::enter` implementation.
2024-01-25 00:45:22 +02:00