Dániel Buga
6aa17819a5
DMA test: Avoid starving out thread-mode executor ( #3064 )
...
* Avoid looping without delay
* Avoid starving out thread-mode executor
* Clean up a bit
2025-01-30 17:14:54 +00:00
Dániel Buga
f7be6a3f6c
Allow specifying env vars for examples/HIL tests ( #3028 )
...
* Remove unused CHIP-FEATURES
* Refactor metadata collection
s
* Allow specifying esp-config options
* Document xtask
* Try to explain multiple configurations a bit better
2025-01-27 10:41:31 +00:00
Dániel Buga
04ba779f2d
Async: !Send
(#2980 )
...
* Actually add inherent set_interrupt_handler fns
* Mark Async drivers !Send
2025-01-20 18:31:02 +00:00
Dániel Buga
571760884b
Update our time driver for upcoming embassy changes ( #2701 )
...
* Add a timer-driven task
* Spawn another timer
* Log
* foo
* Do not access current time on each schedule
* Update generic queue
* Minimize alarm priorities
* Point to github with patches
* Fix build without any queue impl selected
* Remove explicit generic-queue features
* Define cfgs, fix calling something uninitialized
* Clean up RefCell+generic queue
* Fix arg order
* Feature
* Fix single integrated-timer queue
* Fix next expiration when arming
* Add note
* Adjust impl to latest changes
* Local patch
* Refactor the refactor refactor
* Track the timer item's owner
* Clear owner on dequeue
* Clean up
* Point at the right branch
* Fix panic message
* Hide private function
* Remove integrated-timer references
* Point at upstream embassy
* Configure via esp-config
* Document, clean up, fix
* Hack
* Remove patches
* Update config separator, test the complex variant
* Undo esp-config hack
* Remove trouble example, update edge-net
* Update test deps
* Document
* Update bt-hci.
* Fix generic queue
* Fix panic message
* Fix UB
* Fix rebase
* Resolve UB
* Avoid mutable reference in interrupt executor
---------
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2025-01-14 16:17:58 +00:00
Dániel Buga
848029b152
Test all feature sets ( #2901 )
...
* Mark interconnect as unstable
* Explicitly set unstable feature in HIL tests
* WIP append feature set name to artifact
* Add name to feature sets, build all combinations
* Fix tests
* Provide a looping executor for stable async tests
* Fix usb serial jtag
* Hide interconnect types
2025-01-09 13:58:14 +00:00
Jesse Braham
bb406cec6b
Fix naming violations for spi::Mode
enum variants ( #2902 )
...
* Fix naming violations for `spi::Mode`
* Update migration guide
* Update `CHANGELOG.md`
2025-01-07 15:55:19 +00:00
Dániel Buga
7f8af8a651
Remove prelude ( #2845 )
...
* Remove prelude
* Changelog
2024-12-20 10:24:57 +00:00
Sergio Gasquez Arcos
d4386adfc7
Rename Spi enums ( #2828 )
...
* feat: Rename Spi enums
* docs: Update changelog
* feat: Rename crate::Mode to crate::DriverMode
* docs: Udpate changelog
* feat: Rename DM type parameter to Dm for ECC
* style: rustfmt
* feat: Rename crate::Mode to crate::DriverMode
2024-12-19 08:41:59 +00:00
Juraj Sadel
d54f8440a5
HIL(QOL): Use global timeout instead of timeout macros ( #2489 )
...
* HIL(QOL): Add missing timeouts to various tests
* Increase timeouts for ECC
* Use global timeout in hil tests
* sha: increase test_digest_of_size_1_to_200 timeout from 10 to 15 seconds
2024-12-04 12:03:39 +00:00
Dániel Buga
92910bf1cb
Constructor consistency update ( #2610 )
...
* UART: only implement constructors with config, define ConfigError
* UART: only implement interrupt functions for Blocking
* I2C: fallible constructors
* Lcd/Cam
* SPI
* Update tests and examples
* Changelog
* Add note about ConfigError
* Fmt
2024-11-28 09:28:50 +00:00
Jesse Braham
1a2bee6f1f
Add derive macro for BuilderLite
, add #[non_exhaustive]
to some enums and structs ( #2614 )
...
* Add a derive procmacro to implement the Builder Lite pattern for a struct
* Add `#[non_exhaustive]` and derive `BuilderLite` where necessary in I2C module
* Add `#[non_exhaustive]` and derive `BuilderLite` where necessary in UART module
* Add `#[non_exhaustive]` and derive `BuilderLite` where necessary in SPI module
* Update `CHANGELOG.md`
* Fix build errors in HIL tests
* Fix generated doc comments
* Return a `ParseError` rather than panicking
* Add a method to set the value to `None` for `Option` types
2024-11-27 15:54:43 +00:00
Dániel Buga
ef98e2b24f
[DMA 7/8]: Remove Dma
, move channels to Peripherals
( #2545 )
...
* Move DMA channels into Peripherals
* Initialize DMA in the critical section needed for clock management
* Update esp-hal/MIGRATING-0.22.md
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
---------
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2024-11-25 09:31:18 +00:00
Scott Mabin
60a2c76005
[1/4] Timer refactor: system timer ( #2576 )
...
* system timer simplfication
* Removes _all_ type params on Alarm
* Systimer no longer implements peripheral ref, the peripheral ref
pattern is instead intended to be used on the higher level timer
drivers
* Removed `Unit` as a type, in favour of an enum
* Alarms are back in the main `SystemTimer` "driver"
* Made all `Unit` modification methods unsafe, it's not possible to
modify the `Unit`'s safely whilst timers and or the `time::now` API is
in use
* fix examples and tests (by removing them :D)
* changelog and migration
* /unit_count/unit_value/g
* etm doctest
* Review feedback
2024-11-22 11:24:06 +00:00
Dániel Buga
3a4a7632b1
[DMA 4/8]: Apply Peripheral pattern ( #2526 )
...
* Create DMA Channels inside peripherals
* Add PARL_IO into_async functions
* Update tests and examples
* Restore configurable priority via DmaChannel
* Add mode param to DPI driver
* Fix test by raising SPI frequency
* Fix split
* Changelog
* Update esp-hal/CHANGELOG.md
Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
---------
Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
2024-11-22 09:05:22 +00:00
Dániel Buga
973671c3cb
[DMA 3/8] Remove ChannelCreator types, temporarily disable burst mode ( #2403 )
...
* Remove ChannelCreator types and burst mode
* Fix up I2sParallel
* Always enable burst transfering descriptors
* Configure burst transfer with a non-bool for future chip support
* Reuse buffer preparation code
* Update LoopBuf as well
* Update lcd_cam tests
* Rename config, fix changelog
2024-11-21 15:01:29 +00:00
Dániel Buga
fbc57542a8
Remove pins from Io
( #2508 )
...
* Split pins off of Io
* Remove the GPIO peripheral
* p.GPIO
2024-11-12 10:36:25 +00:00
Björn Quentin
3c4b7f0f66
Test more embassy interrupt spi dma ( #2490 )
...
* Add C3,C6 and H2 for `embassy_interrupt_spi_dma`
* Test more
* Don't require physically connected pins
2024-11-08 13:43:34 +00:00
Dániel Buga
8860aba9b2
Spi master: remove public hidden APIs, add Config/apply_config ( #2448 )
...
* Remove hidden public SPI API
* Fix in_progress flags not being set
* Remove redundant checks, fix full-duplex flag
* Remove now-redundant Send impl
* apply_config
* SetConfig
* Return ConfigError
* Unwrap config result in ctor
2024-11-06 09:03:43 +00:00
Dániel Buga
1e6820d1a7
Systimer improvements ( #2451 )
...
* Do not read to set update bit
* Deduplicate
* Try to bind interrupts to the correct core
* Inline poll_count into read_count
* Clean up
* Make sure only a single update is done at a time
* Changelog
* Fix docs
* Correct the channel count
* Assign enough timers for HIL test
* Use a lock to prevent re-update
* Remove locking, use esp-idf implementation
* Document timer count requirement
2024-11-04 11:36:34 +00:00
Dániel Buga
40c0a6944e
into_async
(#2430 )
...
* Remove configure_for_async
* Add into_async and into_blocking to I2c
* Add into_async and into_blocking to UsbSerialJtag
* Rework LCD_CAM
* Rmt
* RSA
* TWAI
* Uart
* Documentation
* Disable interrupts set on other core
* Move configure into RegisterAccess
* Disable interrupts on the other core
* Use EnumSet in RMT
2024-11-04 09:32:12 +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
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
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
7ca1b4376f
Erase DMA type params ( #2261 )
...
* Split PdmaChannel into two
* Take &self in PDMA traits
* Implement type-erased PDMA channels
* Remove Degraded assoc type
* Move degrade fns to base trait
* Use PeripheralDmaChannel on constructors only
* Remove WithDmaAes use
* Erase DMA type params
* Clean up examples/tests
* Remove redundant trait bounds
* Remove peripheral-specific DMA traits
* Document i2s change
* Clean up parl_io
* Deduplicate InterruptAccess
* Fix cfg
* Implement runtime compatibility check
* Clean up a bit
* Document changes
* Swap Channel type params, erase dma channel
* Unsplit traits
* Remove redundant cfg
* Fix docs
* Simplify DmaEligible
* Remove unsafe code
* Revert "Swap Channel type params, erase dma channel"
This reverts commit 415e45e44b297fd3cb55b4261c9ce151cca4b9c9.
* Allow different degraded DMA types
* Allow converting into peripheral-specific DMA channel, use it for compat check
* Erase PDMA types without AnyPdmaChannel
* Hide degrade fns for now, remove from MG
* Clean up SPI slave
* Fix QSPI test
* Fix mem2mem, fix S3 peripherals
* Fix S2
* Remove AnyPdmaChannel
* Remove PeripheralDmaChannel
* Remove unnecessary degrade call
2024-10-08 14:09:27 +00:00
Dániel Buga
e7dab298f5
Rename and wrap ErasedTimer ( #2144 )
...
* Rename and wrap ErasedTimer
* Also rename conversion trait
2024-09-11 20:29:21 +00:00
Sergio Gasquez Arcos
b5f0246129
Reordered RX-TX pairs to be consistent ( #2074 )
...
* feat: Update rx-tx order in i2s
* feat: Update rx-tx order in dma macros
* feat: Update rx-tx order in spi
* feat: Update rx-tx order in aes
* feat: Update rx-tx order in mem2mem
* feat: Update rx-tx order in twai and split methods
* feat: Update rx-tx order in twai
* feat: Update rx-tx order in twai and uart docs
* docs: Add sentence about order
* docs: Update changelog
* feat: Update rx-tx order in embassy_interrupt_spi_dma tests
* style: Rustfmt
* docs: Migrating guide
* fix: Typo
Co-authored-by: Dániel Buga <bugadani@gmail.com>
* fix: Diff
Co-authored-by: Dániel Buga <bugadani@gmail.com>
* fix: Tests rx-tx order
* fix: Update new_with_default_pins order
* feat: Update rx/tx order in hil_test::common_test_pins!
* feat: Update dma_extmem2mem example
* fix: Revert deleted input arg
* style: rustfmt
* feat: Disable test_asymmetric_dma_transfer for S2
---------
Co-authored-by: Dániel Buga <bugadani@gmail.com>
2024-09-06 09:56:10 +00:00
Dániel Buga
99bf346898
Remove the need to manually pass clocks around ( #1999 )
...
* Clean up passing clocks to drivers
* Update changelog
* Initialise Clocks in a critical section
* Fix calling now() before init
* Fix doc
* Fix esp-wifi migration guide
* Add safety comment
* Update tests
2024-09-04 14:13:51 +00:00
Dániel Buga
9465244e0d
Fix various SPI/DMA issues ( #2065 )
...
* Add failing test
* Fix enabled interrupt
* Fix using the correct waker
* Changelog
* Enable test on more devices that have SPI3
2024-09-03 10:02:21 +00:00