Dario Nieuwenhuis
97ca0e77bf
stm32: avoid creating many tiny critical sections in init.
...
Saves 292 bytes on stm32f0 bilnky with max optimizations (from 3132 to 2840).
2023-10-12 16:20:34 +02:00
Dario Nieuwenhuis
036e6ae30c
Rename embassy-hal-common to embassy-hal-internal, document it's for internal use only. ( #1700 )
2023-07-28 13:23:22 +02:00
Dario Nieuwenhuis
98c821ac39
Remove embassy-cortex-m crate, move stuff to embassy-hal-common.
2023-06-09 16:44:20 +02:00
Rasmus Melchior Jacobsen
49455792cb
Ring-buffered uart rx with one-period overrun detection
2023-05-01 22:42:36 +02:00
Dario Nieuwenhuis
2080d8bb6d
stm32/spi: add support for all word sizes.
...
Co-Authored-By: anton smeenk <asmeenk@planet.nl>
2023-04-18 20:56:23 +02:00
Dario Nieuwenhuis
173c65b543
stm32/dma: refactor.
2023-04-18 16:37:35 +02:00
Grant Miller
7be4337de9
Add #[must_use]
to all futures
2023-02-24 13:01:41 -06:00
chemicstry
a53f525f51
stm32/sdmmc: Fix SDIOv1 writes
2023-02-18 01:37:06 +02:00
Rasmus Melchior Jacobsen
47a0769fc2
Let repeated clock byte be singular pointer and not array pointer
2022-12-23 15:49:22 +01:00
Rasmus Melchior Jacobsen
e9a2c4a9e3
Let start_write_repeated accept pointer instead of slice
2022-12-23 15:40:09 +01:00
Rasmus Melchior Jacobsen
da9ee83756
fix(stm32): Fix write buffer lifetime for repeated writes
2022-12-23 09:32:18 +01:00
Matous Hybl
4cc0463123
stm32: Add basic support for DMA priority settings
2022-11-28 21:22:39 +01:00
Dario Nieuwenhuis
4901c34d9c
Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral
2022-07-23 14:00:19 +02:00
Dario Nieuwenhuis
8a9d2f59af
Update embassy-stm32
2022-07-23 02:40:13 +02:00
Dario Nieuwenhuis
be6408e202
Rename unsafe_impl_unborrow to impl_unborrow
2022-07-23 01:33:22 +02:00
Dario Nieuwenhuis
a8703b7598
Run rustfmt.
2022-06-12 22:22:31 +02:00
Dario Nieuwenhuis
5085100df2
Add embassy-cortex-m crate.
...
- Move Interrupt and InterruptExecutor from `embassy` to `embassy-cortex-m`.
- Move Unborrow from `embassy` to `embassy-hal-common` (nothing in `embassy` requires it anymore)
- Move PeripheralMutex from `embassy-hal-common` to `embassy-cortex-m`.
2022-06-12 21:45:38 +02:00
Dario Nieuwenhuis
009bb8e4e1
stm32: add stm32u5 GPDMA, SPIv4 support, add HIL tests.
2022-04-27 01:16:14 +02:00
Matous Hybl
945fa0871f
Implement giant (chunked) DMA transfers for DCMI.
2022-04-25 14:30:43 +02:00
chemicstry
48fc48ea7d
Fix BDMA
2022-03-16 19:41:34 +02:00
chemicstry
34b5175d2c
Add more options to DMA
2022-03-16 18:52:06 +02: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
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
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
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
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
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
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
Dario Nieuwenhuis
3655048e0f
stm32/dma: add MuxChannel trait to distinguish DMAMUX1 and DMAMUX2 channels.
2021-07-17 07:54:16 +02:00
Dario Nieuwenhuis
3d1391ef2d
stm32/dma: impl all variants
2021-07-16 14:41:20 -04:00
Bob McWhirter
f01ddd5f5c
Mix dmamux into bdma_v1.
2021-07-13 10:09:35 -04:00
Bob McWhirter
54ada5bae1
Stub in the DMA bits that aren't yet there.
2021-07-01 11:30:54 -04:00
Bob McWhirter
c53ab325c1
Wire up DMA with USART v1.
2021-06-29 11:01:57 -04:00
Bob McWhirter
b88fc2847a
Checkpoint with lifetime issues.
2021-06-29 11:01:57 -04:00
Bob McWhirter
b4dca64e20
Move most of DMA out of gen.py.
2021-06-03 14:53:48 -04:00
Dario Nieuwenhuis
d8e4421fc6
Add stm32-metapac crate, with codegen in rust
2021-05-31 02:40:58 +02:00
Ulf Lilleengen
03bfbe51f5
Create DMA fn to select peripheral based on channel number
2021-05-21 18:38:33 +02:00
Ulf Lilleengen
9fa5a2920f
Move regs trait implementation into generated pac
...
This allows handling devices that don't have DMA2
2021-05-21 18:38:33 +02:00
Lucas Kent
82f9242df2
Fix warnings for embassy-stm32 and embassy-stm32-examples
2021-05-20 22:25:12 +10:00
Dario Nieuwenhuis
2303364322
Standardize module structure, fix some build failures
2021-05-17 02:04:51 +02:00
Dario Nieuwenhuis
bdc3ada4b2
WIP: dma
2021-05-17 01:08:30 +02:00