Commit Graph

1263 Commits

Author SHA1 Message Date
Bob McWhirter
2e10ab2e5c Let's count channels per DMA peripheral, shall we now? 2021-07-13 10:09:35 -04:00
Bob McWhirter
b0b61d99e6 Macros do indeed require a ! to invoke. 2021-07-13 10:09:35 -04:00
Bob McWhirter
6534b63e01 Simplify some macros around dmamux peripheral channels. 2021-07-13 10:09:35 -04:00
Bob McWhirter
0befa10367 Trivial to force CI to do it's thing. 2021-07-13 10:09:35 -04:00
Bob McWhirter
06e899b14c Adjust to DMA1EN in the rcc for l0. 2021-07-13 10:09:35 -04:00
Bob McWhirter
d31e30f382 Undo special-casing FOO1 -> FOO in RCC searching. 2021-07-13 10:09:35 -04:00
Bob McWhirter
c28bc5a8da Adapt for DMAEN for DMA1 if DMA1EN is not found (for all peripherals FOO1) for EN/RST rcc table. 2021-07-13 10:09:35 -04:00
Bob McWhirter
a9b2ed52ee Remove deadcode from dmamux.
Smoosh bdma down to a single version.
2021-07-13 10:09:35 -04:00
Bob McWhirter
45964c658c Generalize RCC enabling for BDMA peris. 2021-07-13 10:09:35 -04:00
Bob McWhirter
ff1cb9ac74 Remove warnings. 2021-07-13 10:09:35 -04:00
Bob McWhirter
509c7f6835 Update stm32-data. 2021-07-13 10:09:35 -04:00
Bob McWhirter
97ad434d38 Twizzle our DMA vs BDMA channels. 2021-07-13 10:09:35 -04:00
Bob McWhirter
a24a7e9fec Allow some unused lints given that H7 is still in flight with its multitude of DMA. 2021-07-13 10:09:35 -04:00
Bob McWhirter
13975a0818 Try to improve H7 clockstuff. 2021-07-13 10:09:35 -04:00
Bob McWhirter
696a3b8552 Try to figure out h7cm's problem. 2021-07-13 10:09:35 -04:00
Bob McWhirter
6552af8f0b Fix warning for unused import. 2021-07-13 10:09:35 -04:00
Bob McWhirter
6e69992217 Add a no-op bdma for bdma v2 for CI. 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
30a1d9bf93 Move to copying regs instead of &'static referencing.
Remove unneeded stuff from the DMAMUX end of the stick.
2021-07-13 10:09:35 -04:00
Bob McWhirter
f01ddd5f5c Mix dmamux into bdma_v1. 2021-07-13 10:09:35 -04:00
Bob McWhirter
6ec7253095 Checkpoint my DMA for thales. 2021-07-13 10:08:43 -04:00
Bob McWhirter
acdf7f4f13 Another checkpoint. 2021-07-13 10:08:43 -04:00
Bob McWhirter
31325a2547 Another checkpoint. 2021-07-13 10:08:43 -04:00
Bob McWhirter
043f0ea508 Checkpoint DMAMUX channel setup. 2021-07-13 10:08:43 -04:00
Thales Fragoso
91521a86a0 F0: usart + DMA working 2021-07-13 10:08:43 -04:00
Thales Fragoso
a56ddfdc04 STM: Add usart v2 2021-07-13 10:08:43 -04:00
Thales Fragoso
f32caaeaaf STM: Start working on bdma-v1 2021-07-13 10:08:43 -04:00
Dario Nieuwenhuis
8f28d6b4b1
Merge pull request #288 from embassy-rs/rafix
Fix wonky workspace issues
2021-07-13 05:55:09 +02:00
Dario Nieuwenhuis
5450ec3d4c Update vscode settings for latest rust-analyzer 2021-07-13 05:47:26 +02:00
Dario Nieuwenhuis
1d64421fb4 Fix "can't find crate for std" for stm32-metapac-gen deps. 2021-07-13 05:47:10 +02:00
Dario Nieuwenhuis
549ddf7fc8
Merge pull request #285 from embassy-rs/rp-spi-clock
RP improvements
2021-07-13 03:42:35 +02:00
Dario Nieuwenhuis
b8e23bc74e
Merge pull request #286 from embassy-rs/time-feature
Make embassy::time optional
2021-07-13 03:41:17 +02:00
Dario Nieuwenhuis
1a4c13cf26 rp/spi: add set_frequency 2021-07-12 03:45:57 +02:00
Dario Nieuwenhuis
7547c8d8d6 rp/timer: add 2021-07-12 03:45:57 +02:00
Dario Nieuwenhuis
c210a6efd1 embassy/time: remove useless impl 2021-07-12 03:45:48 +02:00
Dario Nieuwenhuis
16bb678368 Merge BlockingTimer and Delay 2021-07-12 03:45:48 +02:00
Dario Nieuwenhuis
35a76c364a embassy/time: make optional via Cargo feature 2021-07-12 03:45:48 +02:00
Dario Nieuwenhuis
94bd4eb7d5 embassy/time: refactor module structure 2021-07-12 03:45:48 +02:00
Dario Nieuwenhuis
40bc67bee0
Merge pull request #284 from embassy-rs/rp-spi-clock
rp/spi: sane prescaler calculation
2021-07-12 00:14:39 +02:00
Dario Nieuwenhuis
17e31eb903 rp/spi: sane prescaler calculation 2021-07-11 23:47:33 +02:00
Dario Nieuwenhuis
61a3462f87
Merge pull request #278 from huntc/ci-tests
Add tests to our CI
2021-07-06 04:34:10 +02:00
huntc
e13aa4c2a0 Add tests to our CI
Also found some doctests that were failing
2021-07-06 12:29:08 +10:00
Liam Murphy
ff9ff5e43a Update the import 2021-07-05 18:31:54 +10:00
Liam Murphy
fc1ef4947d Fix stm32 ethernet 2021-07-05 18:18:05 +10:00
Liam Murphy
3d96b10b0c Elide lifetimes on Peripheral::state 2021-07-05 17:47:55 +10:00
Liam Murphy
744e2cbb8a extras: Fix UB in Peripheral
`Peripheral` assumed that interrupts can't be preempted,
when they can be preempted by higher priority interrupts.
So I put the interrupt handler inside a critical section,
and also added checks for whether the state had been dropped
before the critical section was entered.

I also added a `'static` bound to `PeripheralState`,
since `Pin` only guarantees that the memory it directly references
will not be invalidated.
It doesn't guarantee that memory its pointee references also won't be invalidated.

There were already some implementations of `PeripheralState`
that weren't `'static`, though,
so I added an unsafe `PeripheralStateUnchecked` trait
and forwarded the `unsafe` to the constructors of the implementors.
2021-07-05 17:42:43 +10:00
Dario Nieuwenhuis
ed83b93b6d
Merge pull request #276 from embassy-rs/deny-warnings
Deny warnings in CI
2021-07-05 03:24:36 +02:00
Dario Nieuwenhuis
ecc151d4e2 stm32/adc: simplify delay handling 2021-07-05 03:18:23 +02:00
Dario Nieuwenhuis
7ebd4e3aa9 nrf/gpio: fix unused warning on chips without ports 2021-07-05 02:44:16 +02:00
Dario Nieuwenhuis
e4145bf08b Deny warnings in CI 2021-07-05 02:44:12 +02:00