Scott Mabin
c717f04d4d
Remove EspWifiInitFor
& more granular init/deinit per driver ( #2301 )
...
* More granular init and deinit per driver
- Rework EspWifiInit
- No longer require EspWifiInitFor
- Add Drop impls for each driver, and add Drop for EspWifiController to
fully deinit the stack
* unwrap! more stuff
* fixup examples and esp-now
* unwrap less stuff
* review feedback
* seal wifi traits, allow rng or trng to init esp-wifi
* changelog and migration guide
* return wifi error in esp now constructor instead of panic
2024-11-04 08:08:19 +00:00
Dominic Fischer
f9ba299f2e
Mark DmaDescriptor
s as Send ( #2456 )
...
Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-11-04 07:50:44 +00:00
Dominic Fischer
05f2ee5a72
Allow users to create DMA Preparation
s ( #2455 )
...
Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-11-04 07:38:46 +00:00
Dominic Fischer
b953f178b8
Add check owner support to DMA buffers ( #2337 )
...
* Add check owner support to DMA buffers
* More docs
* Explicit check owner bit setting
---------
Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-11-02 16:07:40 +00:00
Dániel Buga
111ae93cc5
Fix, clean up and type-erase parallel i2s ( #2436 )
...
* Fix, clean up and type-erase parallel i2s
* Fix capitalization
* Add link to esp-idf code that offsets by 8
2024-11-01 10:50:39 +00:00
Jesse Braham
fc4eaa1ebf
Make our nightly CI checks pass ( #2356 )
...
* Fix nightly lint errors for ESP32-C2
* Fix nightly lint errors for ESP32-C3
* Fix nightly lint errors for ESP32-C6
* Fix remaining nightly lint errors
2024-11-01 10:31:56 +00:00
Dániel Buga
a5c4aa1cea
Tweak interrupt API ( #2442 )
...
* Tweak interrupt API
* Constrain SPI interrupt handling to Blocking mode
2024-10-31 16:18:44 +00:00
Dániel Buga
7d717c6acf
Fix UART erratum on ESP32 ( #2441 )
2024-10-31 15:00:36 +00:00
Dániel Buga
f9c7d06a6e
Disable i2s test ( #2439 )
2024-10-31 14:16:39 +00:00
Björn Quentin
e5b923b678
Esp wifi/more dynamic allocations ( #2396 )
...
* Dynamic allocation of timers
* Replace statically allocated NPL events
* Remove NPL CALLOUTS
* Remove NPL EventQueue
* Use `Vec` instead of `heapless::spsc::Queue` internally in NPL
* Use `alloc` since we have it in NPL
* Refactor
* Fix
* More `Vec`
* Fix
* Fix nightly-warnings
* Limit RX_STA queue
* Revert unintentional change
* esp-now: Make data private
* CHANGELOG.md
* Clippy
* MSRV
* Move locking into RawQueue
* Remove unused import
* Simplify `queue_recv`
* Address TODO
* Clippy
* Review I
* Review II
* Clarify
* Review III
* Review IV
* Review V
* Fix
* `steal` RNG and RADIO_CLOCKS
* `drop_in_place`
* De-duplicate
* Use `VecDeque`
* Revert unintentional changes
* Fix
* Update esp-wifi/MIGRATING-0.10.md
Co-authored-by: Dániel Buga <bugadani@gmail.com>
* assert
* Fix
* Expect `*mut ConcurrentQueue` where applicable
* Comment why stealing is fine
* Fix
---------
Co-authored-by: Dániel Buga <bugadani@gmail.com>
2024-10-31 12:26:10 +00:00
Jesse Braham
6fa2823e10
Use latest PAC which aligns TWAI field names ( #2438 )
2024-10-31 12:22:37 +00:00
Dominic Fischer
25d8390d68
Fix typo in migration guide ( #2435 )
2024-10-31 06:43:11 +00:00
liebman
448ed9a001
implement a parallel interface for esp32 using the i2s peripheral ( #2348 )
...
* i2s_parallel for esp32 - partially working
* i2s_parallel for esp32 - works sync 16bit (still WIP)
* i2s_parallel - add 8-bit
* i2s_parallel - naive async implementation
* i2s_parallel - clippy
* add examples (mainly for testing now and we can reduce these before merge)
* set tx_wrx2 in 8 bit mode or it updates on half clocks!
* adjust clock config (still really a hack)
* better clock calculation/configuration
* no need to reset dma or interrupts in start, the DMA DmaTxBuf handles that
* seems to need a short delay during tx_reset
* use 20 clocks instead of 1us
* 1us delay between dma start and tx_start (like idf)
* changelog & documentation
* remove debugging functions
* no need for option in example
* make async example actually use async & remove Option
* implement Drop for I2sParallelTransfer
* fix signal offset comment for I2S0
* small cleanup in i2s_parallel examples
* added a note re I2S0 not supporting true 8bit
* update doc & fmt
* instace functions take &self
* fmt
* if run at 240MHz (CPU) delay needs to be bigger
* wait for fifo on start and fixes for 240MHz
* update for esp-hal-changes
* fmt
---------
Co-authored-by: Dániel Buga <bugadani@gmail.com>
2024-10-30 18:55:47 +00:00
Tu Nguyen
9d4b8fdbc6
[TWAI] bus-off error is never reached when using transmit_async
( #2421 )
...
* cancel pending tx request when error is from tx
* fix format error
* update CHANGELOG.md
2024-10-30 16:59:11 +00:00
Björn Quentin
05a1ebead3
Use esp-wifi-sys from Git ( #2426 )
...
* Use esp-wifi-sys from Git
* Update esp-wifi-sys rev
2024-10-30 16:38:16 +00:00
Björn Quentin
416c1481ae
Circular dma improvements ( #2409 )
...
* Check for error when pushing into a circular dma transaction too late
* Adapt tests
* Adapt example
* Don't block forever if trxing to pop from a circular DMA transfer too late
* Have a dedicated error for circular-DMA reading/writing too late
* Stop I2S RX before resetting it
* Migration guide
* Address review comment, make CI pass
* Adopt ideas from review
* Fix
* Update esp-hal/MIGRATING-0.21.md
Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
* assert
---------
Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
2024-10-30 16:25:29 +00:00
Dániel Buga
4546f861c8
Reduce UART Instance trait to the bare minimum ( #2410 )
...
* Merge signal fns
* Remove logic from UART Instance, remove uart_number
* Use the unwrap macro
* Place peripheral info into static structs
* Clean up
* Clean up
* Update todo
* Rename
* Separate out state
2024-10-30 15:51:33 +00:00
Dániel Buga
a8fedf0130
Move some implementation details out of GPIO ( #2429 )
...
* Move macros out of gpio
* Align S2 impl
2024-10-30 15:11:48 +00:00
Kirill Mikhailov
3e42b76993
Add an option to configure WDT
action ( #2330 )
...
* WIP
* revert example
revert config
* changelog entry
* Make `RWDT` API work correctly, make `RWDT` and `MWDT`APIs same
* update documentation code
oops
* rev
* Polishing
* Document bootloader limitation
+ typo fix
* Address reviews
* fix documentation examples
2024-10-30 09:46:34 +00:00
Dániel Buga
f07e25c970
Add option to disable waiti ( #2329 )
2024-10-30 08:12:15 +00:00
Björn Quentin
b7224ef4c9
RISC-V: Fix interrupt stack alignment ( #2425 )
2024-10-29 11:45:30 +00:00
Dániel Buga
8a23dbe1b6
Modernize UART interrupts ( #2406 )
...
* Modernize UART interrupts
* Also derive Debug and Format for interrupt enums
* Fix changelog
* Touch up API-GUIDELINES
2024-10-28 09:07:15 +00:00
Dániel Buga
4e257f74aa
Merge/remove some GPIO-related macros ( #2404 )
...
* Remove redundant macros
* Deduplicate rtcio dispatch macros
* Clean up unnecessary import
* Remove manual bank assignment
2024-10-28 07:08:53 +00:00
Dániel Buga
f3c5286028
Add Cpu::COUNT
and clean up in esp-hal-embassy
( #2411 )
...
* Add Cpu::COUNT and simplify
* Avoid a bounds check during pending
2024-10-26 13:36:10 +00:00
Dániel Buga
6bf03f63a9
Small SPI slave cleanup ( #2405 )
2024-10-25 15:07:43 +02:00
Dániel Buga
681f4ef0aa
Implement UART type erasure ( #2381 )
...
* Simplify test
* Remove unnecessary refs
* Improve readability
* Require Instance: PeripheralMarker
* Take &self
* Avoid unsafe code on non-s2
* SImplify drain_fifo
* Simplify read_bytes
* Avoid a register read on ESP32
* Deduplicate is_idle functions
* Add missing inlines
* Move code out of trait
* Erase UART instances
* Disable LTO
2024-10-25 08:03:20 +00:00
Dániel Buga
561b582a80
Overhaul peripheral signal system, first run ( #2388 )
...
* Remove redundant bound
* Remove redundant Dummy variant
* Make PeripheralOutput extend PeripehralInput
* Rename AnyInputSignal to InputConnection
* Add OutputConnection
* Convert into type-erased interconnect conections
* Clean up LCD/CAM
* Document changes
* Review changes
Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
* Clean up
---------
Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
2024-10-25 07:01:45 +00:00
Dániel Buga
19b08efc1d
Rework how pin capabilities are declared ( #2400 )
2024-10-24 11:55:46 +00:00
Björn Quentin
a7d8b2009d
Use panic
instead of process::exit
( #2402 )
2024-10-24 11:06:05 +00:00
Dániel Buga
2ac47868f7
Remove FullDuplexMode and HalfDuplexMode type params ( #2373 )
...
* Remove duplex type param
* Rename dma_ functions
2024-10-24 07:22:21 +00:00
Dániel Buga
f03527f6fc
Change example to set max clocks ( #2399 )
...
* Change example to set max clocks
* Update esp-hal/src/lib.rs
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
---------
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2024-10-24 07:18:29 +00:00
Dániel Buga
c163b0586a
Erase TWAI ( #2359 )
...
* Swap order of generics
* Don't refer to Instance in irq handler
* Deduplicate a bit
* Take &self
* Reduce nesting
* Erase TWAI instance
2024-10-24 06:47:02 +00:00
Easyoakland
1de2483609
fix wifi async fn disconnect hanging if not connected when called ( #2392 )
...
* fix wifi async fn disconnect hanging if not connected when called
* update changelog
* clarify comment
* add pr number to changelog
2024-10-23 21:29:00 +00:00
Dániel Buga
5f6ca8d252
Fix embassy migration guide ( #2393 )
2024-10-23 13:49:20 +00:00
Dániel Buga
4c1c6131df
Wait more before re-enabling USB power ( #2397 )
2024-10-23 12:56:59 +00:00
Dániel Buga
71c4fc5a24
Add note to start_app_core ( #2395 )
2024-10-23 08:54:53 +00:00
Dániel Buga
5486cdb5e3
Clean up i2c add_cmd ( #2394 )
2024-10-23 08:44:30 +00:00
Dániel Buga
e367c83bde
Erase i2c peripheral instances ( #2361 )
...
* Clean up
* Erase I2C instance type
* Clean up
* Implement Peripheral
* Changelog
* Remove with_timeout constructors
2024-10-23 06:31:08 +00:00
Dániel Buga
1afc9eef89
Remove unnecessary generic from ChannelHW ( #2387 )
...
* Remove unnecessary generic from ChannelHW
* Changelog
2024-10-22 15:41:42 +00:00
Björn Quentin
54d4407042
Better align atoi
to what the C-library does ( #2380 )
...
* Better align `atoi` to what the C-library does
* Address review comments
* Clippy
* More clippy
* Prefer `read` over `read_volatile`
2024-10-22 14:55:24 +00:00
Dániel Buga
632bbc6461
Fix interrupt executors waking up thread-mode executors on the first core ( #2377 )
...
* Clean up
* Add failing multi-core test
* Reset interrupts before main
* Changelog
* Add test case
2024-10-22 14:45:06 +00:00
Dániel Buga
aec83bdd31
GPIO cleanup ( #2384 )
...
* Return alternate function maps as slices
* Prefer steal() over ptr deref
* Clean up rtc_io
2024-10-22 12:56:45 +00:00
Jesse Braham
56cd5a288f
Update PACs to latest git revision ( #2383 )
...
* Update to latest git revision of all PACs
* Update RSA module to reflect changes in PACs
* Update TWAI module to reflect changes in PACs
* Further simplification
2024-10-22 12:33:36 +00:00
Björn Quentin
c574834ae3
Include ROM API symbols ( #2374 )
...
* Include ROM API symbols
* Fixes and CHANGELOG.md
* Fix
* Move migration steps to the right crate's migration guide
* Remove `-Trom_functions.x` where necessary
2024-10-22 10:02:49 +00:00
dimpolo
62ee60d43f
Fix conflict between RtcClock::get_xtal_freq
and Rtc::disable_rom_message_printing
( #2360 )
...
* deduplicate some code in rtc_cntl
* mask out the RTC_DISABLE_ROM_LOG bit when reading RTC_XTAL_FREQ
2024-10-22 08:35:46 +00:00
Dániel Buga
a4bc0536a3
PAC update ( #2378 )
...
* PAC update
* Inline steals into reg expressions
2024-10-22 06:41:33 +00:00
Dániel Buga
d914a0301f
Erase i2s ( #2367 )
...
* Implement I2S type erasure
* Clean up
2024-10-22 06:33:27 +00:00
Dániel Buga
a754e411b1
SPI type erasure ( #2334 )
...
* Move SPI peripheral type to the last position
* Implement AnySpi
* Convert peripheral types
* Add new_typed constructors
* Implement PDMA
* Fix conditional
* Clean up constructors
* Fix test
* Move stuff to utils
* Extract any macros
* Merge PeripheralMarker defs into peripherals macro
* Changelogs
* Implement fn degrade
* Changelog num
* Fix typo
* Rename type-erased dma channel
* Remove degrade fn
* Remove utils
* Explain peripherals macro
2024-10-21 14:03:14 +00:00
Dániel Buga
f2aa3f9863
Update embedded-test ( #2375 )
2024-10-21 09:35:15 +00:00
Dániel Buga
d32a7336bb
Simplify traits and erratum 36 workaround, add Pins::steal
( #2335 )
...
* Simplify erratum 36
* Add Pins::steal
* Fix typo
* Move pin operations into Flex
* Cleanup braces
* Avoid panicking when handling erratum
* Add disable_usb_pad to other devices
* Touch up changelog
* Fix changelog
2024-10-18 14:17:43 +00:00