chemicstry
34b5175d2c
Add more options to DMA
2022-03-16 18:52:06 +02:00
Dario Nieuwenhuis
77841a4676
stm32/dma: panic on DMA error.
2022-03-09 03:19:05 +01:00
Grant Miller
8c45c98e41
stm32: Refactor DMA interrupts
...
Previously, every dma interrupt handler called the same `on_irq`
function which had to check the state of every dma channel.
Now, each dma interrupt handler only calls an `on_irq` method for its
corresponding channel or channels.
2022-03-08 14:18:31 -06:00
Dario Nieuwenhuis
53d9a0b516
stm32: exclude spammy files from docs by prefixing with _
.
...
These files end up containing chip-specific info, so they deduplicate
really badly when building docs for all 1200 chips.
The doc generator removes files starting with `_`.
2022-03-04 18:03:41 +01:00
Dario Nieuwenhuis
dd828a7a92
stm32: move macrotables to embassy-stm32 build.rs
2022-02-26 03:23:09 +01:00
Dario Nieuwenhuis
ea5cd19c30
stm32: fix build for h7ab
2022-02-24 06:28:29 +01:00
Dario Nieuwenhuis
b99ab3d5d9
stm32: Add standard crate-wide macros for pin/dma traits, switch all drivers to use them.
2022-02-10 21:38:03 +01:00
Dario Nieuwenhuis
8160af6af9
stm32: replace peripheral_rcc!
macrotable with build.rs
2022-02-09 00:58:17 +01:00
Dario Nieuwenhuis
fbaa7e59d5
stm32/dma: fix interrupt codegen for new stm32-data
2022-02-05 03:03:32 +01:00
Sam Lakerveld
3fc54236ea
stm32/i2c: allow empty transfers with async api
2022-01-25 16:28:49 +01:00
Dario Nieuwenhuis
3d27a0e7cb
stm32/dma: make lowlevel api take ptrs instead of slices.
2022-01-19 17:59:55 +01:00
Dario Nieuwenhuis
022c4cb739
stm32/dma: simplify impls a bit.
2021-12-08 03:30:07 +01:00
Dario Nieuwenhuis
b316d2620c
stm32/dma: improve trait docs, seal Word.
2021-12-08 03:18:15 +01:00
Dario Nieuwenhuis
6179da6b9c
stm32/dma: eagerly start transfers when calling the functions.
...
`async fn`s do nothing until polled, but we want the DMA transfer to
immediately start in this case. Drivers rely on it. Some require special
orders, such as "start DMA, start SPI, then wait for DMA" which is awkward
to do without eager start.
Also use a manually-impl'd future, this allows getting rid of the "double"
Unborrow channel clone.
2021-12-08 03:04:39 +01:00
Dario Nieuwenhuis
4e349d0f5d
stm32/dma: use the right waker slot number for DMA2 (must add 8)
2021-12-08 01:54:31 +01:00
Dario Nieuwenhuis
fd2fe62b5f
stm32/dma: rename is_stopped to is_running.
...
Note that this does NOT invert the result of `en()` because it was
wrong before.
2021-12-08 01:51:39 +01:00
Matous Hybl
b2910558d3
Refactor DMA traits.
2021-12-07 21:43:47 +01:00
Joshua Salzedo
e2719aba10
Further extend the dma channel trait
2021-12-07 21:43:47 +01:00
Joshua Salzedo
93e047ede2
cargo fmt
2021-12-07 21:43:47 +01:00
Joshua Salzedo
3411039cb9
Implement extended Channel trait to bdma.rs
2021-12-07 21:43:47 +01:00
Joshua Salzedo
2d2c6d0e01
Implement extended Channel trait to dma.rs
2021-12-07 21:43:47 +01:00
Joshua Salzedo
3272987d92
Expand channel trait
2021-12-07 21:43:47 +01:00
Dario Nieuwenhuis
b0fabfab5d
Update stm32-data: rcc regs info comes from yamls now.
2021-11-29 02:28:02 +01:00
Bob McWhirter
bbff98ed0d
Move the use
inside the macro call, inside another set of braces in case it percolates up twice.
2021-10-26 14:34:03 -04:00
Bob McWhirter
a72816492a
Only attempt to enable the dmamux peri clock if it has an enable bit.
2021-10-26 14:19:03 -04:00
Bob McWhirter
959aecf6ac
Enable the DMAMUX clocks.
2021-10-26 14:01:39 -04:00
Dario Nieuwenhuis
ead987245d
embassy: Refactor module structure to remove kitchen-sink util
.
2021-09-11 02:35:35 +02:00
Thales Fragoso
c7ae2d2a3a
stm32: Add fences to DMA code
2021-08-10 20:45:41 -03:00
Dario Nieuwenhuis
9bd34429f3
stm32: add missing + 'a
bounds on trait GATs
2021-08-04 19:39:54 +02:00
Bob McWhirter
8759213fcc
Use new interrupt! table format to /enable/ the IRQs also.
2021-07-27 13:23:33 -04:00
Bob McWhirter
b910551c9a
Generate more rows in the interrupts! table.
...
Adjust DMA/BDMA to use the new style.
2021-07-27 12:52:01 -04:00
Dario Nieuwenhuis
3c7375c6cd
stm32/bdma: do not clear IF on IRQ handler
2021-07-24 10:01:11 +02:00
Timo Kröger
43c4f24207
STM32 BDMA: Use interrupt flags instead of atomics
2021-07-24 09:26:07 +02:00
Timo Kröger
5a4a5ce334
STM32 DMA: Use interrupt flags instead of atomics
2021-07-24 09:26:07 +02:00
Bob McWhirter
b07325b476
Enable DMA for SPIv1 on F4's etc.
2021-07-23 13:22:39 -04:00
Bob McWhirter
a1dac21bdf
Make SPIv3 work with DMA.
...
Add both DMA and non-DMA example to H7.
2021-07-23 13:22:39 -04:00
Bob McWhirter
0d2051243e
SPIv2 + DMA.
2021-07-23 13:22:39 -04:00
Bob McWhirter
4c5a234a3a
Add a non-minc write() to DMA which takes a count.
...
Use it from "read-only" SPI.
2021-07-23 13:22:39 -04:00
Bob McWhirter
2d3137afc7
The async move
portion of @thalesfragoso's i2c PR.
2021-07-20 11:38:16 -04:00
Thales Fragoso
aae0431d31
stm32: Clear possible set flags after disabling DMA
2021-07-17 16:59:35 -03:00
Dario Nieuwenhuis
36be877ba3
stm32/dma: only set TRBUFF in DMAv1 (H7)
2021-07-17 08:01:20 +02:00
Dario Nieuwenhuis
3655048e0f
stm32/dma: add MuxChannel trait to distinguish DMAMUX1 and DMAMUX2 channels.
2021-07-17 07:54:16 +02:00
Dario Nieuwenhuis
54b5012c56
stm32/dma: update codegen+macrotables for new stm32-data
2021-07-17 07:35:59 +02:00
Bob McWhirter
0119ea809d
Get DMA on H7 working, add usart_dma example for H7.
2021-07-16 14:41:20 -04:00
Dario Nieuwenhuis
ae948415a7
stm32/dma: disable after finishing
2021-07-16 14:41:20 -04:00
Dario Nieuwenhuis
63a0e188ea
stm32/dma: fix h7 impls
2021-07-16 14:41:20 -04:00
Dario Nieuwenhuis
3d1391ef2d
stm32/dma: impl all variants
2021-07-16 14:41:20 -04:00
Bob McWhirter
6552af8f0b
Fix warning for unused import.
2021-07-13 10:09:35 -04:00
Bob McWhirter
811ed18922
Add a missing 'use' for dma_v2.
2021-07-13 10:09:35 -04:00
Bob McWhirter
f01ddd5f5c
Mix dmamux into bdma_v1.
2021-07-13 10:09:35 -04:00