diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-05-25 01:05:32 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-25 01:05:32 +0000 |
| commit | 5f10eadb8d13f59bceed0958ef7aac8f1545f30d (patch) | |
| tree | 36660e2883c2c5e4699738fab9dbb0ef679583c9 /embassy-embedded-hal/src | |
| parent | 224faccd4ce41f226b15fd2bd09943ed2067a70d (diff) | |
| parent | 187551f914aba22c001eb11a48e5fd15ea439b13 (diff) | |
| parent | 87acf5f50f2a976cae7546f691fb14ba7b81c714 (diff) | |
| parent | e785e1bc22fde8f203048d143ceafdd45ec4d4b6 (diff) | |
Merge #1475 #1478 #1482
1475: Add YieldingAsync adapter r=Dirbaio a=rmja
This PR calls `yield_now()` for long blocking `NorFlash` read and erase operations.
The motivation for this change is to allow for other tasks on the same executor to get something done between these long running operations, for example a task that feeds a watchdog. This will allow the watchdog to have a timer relative to e.g. one sector erase, instead of all sector erase.
1478: stm32: Minor fixes in flash regions for F4 dual bank layout r=Dirbaio a=rmja
This PR has the following fixes:
* Ensure that `FlashRegion` instances can only be created within the embassy-stm32 crate.
* Remove `Drop` trait for `AltFlashLayout`, as it is hard to use, as one cannot take the individual regions out from the struct. Instead of going back to single bank mode on `Drop`, we instead transition to single bank mode when calling `Flash::into_regions()`.
* Add missing `otp_region` to the dual bank layout and implement `NorFlash` for the alternate regions.
1482: Add ConcatFlash utility r=Dirbaio a=rmja
This PR adds a `ConcatFlash` utility that can be used to concatenate two `NorFlash` flashes. This is especially useful when concatenating multiple flash regions with unequal erase size.
Co-authored-by: Rasmus Melchior Jacobsen <[email protected]>
