Commit Graph

1733 Commits

Author SHA1 Message Date
Dario Nieuwenhuis
9c503a9256
Merge pull request #305 from bobmcwhirter/spi_dma_take3
Spi dma take3
2021-07-24 09:24:11 +02:00
Liam Murphy
1b7ad7080e Add Send/Sync bounds to PeripheralState 2021-07-24 12:53:57 +10:00
Bob McWhirter
83f63890e5 Actually take a &mut of that read slice. 2021-07-23 13:22:39 -04:00
Bob McWhirter
473a83a937 Adjust how we deal with read/write being different length.
Including some docs about it.
Removing the Rx-enablement for write-only operations.
2021-07-23 13:22:39 -04:00
Bob McWhirter
67283c0cbd Reset back the memory.x also. 2021-07-23 13:22:39 -04:00
Bob McWhirter
f1a3e0e05d As before, EVERY DANG TIME.
It'll be sweet with intellij-rust-plugin works better.
2021-07-23 13:22:39 -04:00
Bob McWhirter
a63847944f Reset the examples to the original F4 flavor. 2021-07-23 13:22:39 -04:00
Bob McWhirter
b07325b476 Enable DMA for SPIv1 on F4's etc. 2021-07-23 13:22:39 -04:00
Bob McWhirter
8ab82191b7 Every dang time. 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
34dfe28d3a FFS warnings about unused Result<>. 2021-07-23 13:22:39 -04:00
Bob McWhirter
053e330375 Fix warnings about un-used variables. 2021-07-23 13:22:39 -04:00
Bob McWhirter
e269971597 Fix extraneous mut warnings in L4 example. 2021-07-23 13:22:39 -04:00
Bob McWhirter
638235e72d Fix up the L0 example for SPI. 2021-07-23 13:22:39 -04:00
Bob McWhirter
6dbe049468 Add back in the other versions of SPI. 2021-07-23 13:22:39 -04:00
Bob McWhirter
bee7f60f08 Improve the SPIv2 DMA example to verify it actually works. 2021-07-23 13:22:39 -04:00
Bob McWhirter
0d2051243e SPIv2 + DMA. 2021-07-23 13:22:39 -04:00
Bob McWhirter
1a03f00b56 Wire up peripheral DMA channels for SPI. 2021-07-23 13:22:39 -04:00
Bob McWhirter
3df2aadc39 Avoid borrowck issue. 2021-07-23 13:22:39 -04:00
Bob McWhirter
dedc2bac42 IntelliJ'd. 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
7bbad4c4e5 More unused allowances. 2021-07-23 13:22:39 -04:00
Bob McWhirter
4bcc3b06c6 Include all versions when handing to CI. 2021-07-23 13:22:39 -04:00
Bob McWhirter
a75110296d Annotate to avoid unused warnings for the moment. 2021-07-23 13:22:39 -04:00
Bob McWhirter
3f379e06b0 Begin reworking SPI to add DMA for stm32. 2021-07-23 13:22:39 -04:00
Bob McWhirter
fe66f0f8f8 Checkpoint. 2021-07-23 13:22:39 -04:00
Bob McWhirter
a345dd9e2b More formatting! 2021-07-23 13:22:39 -04:00
Bob McWhirter
58edefff6e Formatting. 2021-07-23 13:22:39 -04:00
Bob McWhirter
d5ed5c3ef3 Split up the nRF impls for SPI traits. 2021-07-23 13:22:39 -04:00
Bob McWhirter
22901938ce Split up the SPI trait into several with shared Error associated type. 2021-07-23 13:22:39 -04:00
Bob McWhirter
372884422a
Merge pull request #313 from timokroeger/cleanup-gpio-clocks
stm32 examples: No need to enable GPIO clocks manually
2021-07-23 13:15:28 -04:00
Timo Kröger
57eecd4292 Use Dbgmcu::enable_all() in stm32f4 examples 2021-07-23 17:54:14 +02:00
Timo Kröger
5ac91933ff stm32: No need to enable GPIO clocks manually 2021-07-23 17:54:13 +02:00
Bob McWhirter
ec5d44333a
Merge pull request #311 from bobmcwhirter/gpio_enable
Auto-enable all GPIOs during init().
2021-07-23 11:38:53 -04:00
Bob McWhirter
650f867b1c Add a single-column variant to gpio_rcc! macro table
which includes just the set of registers that need to be
considered.

Then match against those registers with a single `modify(...)`
2021-07-23 11:32:20 -04:00
Bob McWhirter
13873df30b Auto-enable all GPIOs during init(). 2021-07-23 11:32:19 -04:00
Bob McWhirter
e91c04a673
Merge pull request #310 from bobmcwhirter/dbg
Add a `Dbgmcu` struct capable of enabling all relevant DBGMCU.cr fields.
2021-07-23 11:21:02 -04:00
Bob McWhirter
d68f2617e6 Add a Dbgmcu struct capable of enabling all relevant DBGMCU.cr fields.
Includes the addition of a `dbgmcu!(...)` macro table which currently takes
the form of

	(cr, $fn_name:ident)

where `$fn_name` is something like `set_dbgsleep_d1` etc.

The method is unsafe, since it's performing unsafe PAC operations.

Two examples modified to demonstrate its usage.
2021-07-22 14:18:48 -04:00
Dario Nieuwenhuis
3655ceff27
Merge pull request #308 from timokroeger/stmf4-example-cleanup
Cleanup stm32f4 examples
2021-07-21 23:21:28 +02:00
Timo Kröger
5e998d1a6c Cleanup stm32f4 examples
* Remove dependency on stm32f4 pac crate
* Remove unused `ZeroClock`
2021-07-21 23:12:36 +02:00
Thales
cec2654854
Merge pull request #304 from bobmcwhirter/async_move_dma_transfer
The `async move` portion of @thalesfragoso's i2c PR.
2021-07-20 13:07:28 -03:00
Bob McWhirter
2d3137afc7 The async move portion of @thalesfragoso's i2c PR. 2021-07-20 11:38:16 -04:00
Dario Nieuwenhuis
25b870d811
Merge pull request #302 from embassy-rs/rp-spi-fixes
Rp spi fixes
2021-07-20 10:11:58 +02:00
Dario Nieuwenhuis
451e342961 rp/examples: add spi_display example 2021-07-20 10:06:57 +02:00
Dario Nieuwenhuis
da33b3a4d2 rp/spi: disable+enable when setting frequency 2021-07-20 09:43:06 +02:00
Dario Nieuwenhuis
dbff5cc232 rp/spi: properly drain the rx buffer while writing 2021-07-20 09:42:52 +02:00
Dario Nieuwenhuis
b04dc7e783
Merge pull request #226 from huntc/mpsc
Multi Producer Single Consumer channel
2021-07-20 08:01:42 +02:00
Dario Nieuwenhuis
1799938187 rp/examples: add spi example 2021-07-19 23:54:18 +02:00
Thales
40ea8298ee
Merge pull request #300 from thalesfragoso/clear-dma
stm32: Clear possible set flags after disabling DMA
2021-07-17 17:28:02 -03:00
Thales
f4b8709bac
Merge pull request #281 from thalesfragoso/i2c-256
i2c-v2: Support transfers with more than 255 bytes
2021-07-17 17:21:50 -03:00