Commit Graph

1595 Commits

Author SHA1 Message Date
Dario Nieuwenhuis
b1d631d639 stm32/time: add Cargo features to choose tim2/tim3 2021-08-05 19:14:09 +02:00
Dario Nieuwenhuis
0ea6a2d890 time: replace dyn clock/alarm with a global Driver trait 2021-08-05 19:14:09 +02:00
Dario Nieuwenhuis
a4c0ee6df7
Merge pull request #345 from Liamolucko/forward-task-attributes
Forward attributes to generated task function
2021-08-05 19:13:08 +02:00
Liam Murphy
53e66a383f Forward attributes to generated task function
Fixes #18

Syn considers doc comments to be attributes, so forwarding those fixes the issue.
It's probably a good idea to forward most attributes anyway.
2021-08-05 15:35:50 +10:00
Dario Nieuwenhuis
cfa1f61154
Merge pull request #344 from bobmcwhirter/remove_builders
Remove builders from Config(s) and examples.
2021-08-04 21:32:39 +02:00
Bob McWhirter
9726f77ce1 Grep fails me. 2021-08-04 15:28:08 -04:00
Dario Nieuwenhuis
cee111c865
Merge pull request #306 from embassy-rs/update-nightly
Remove feature(impl_trait_in_bindings), update nightly
2021-08-04 20:34:52 +02:00
Bob McWhirter
97e4b89f82 Fmt giving me headaches. 2021-08-04 14:32:22 -04:00
Bob McWhirter
08e7e5a3fa Um. 2021-08-04 14:22:47 -04:00
Bob McWhirter
dc126b9ab6 Unused import. 2021-08-04 14:14:36 -04:00
Bob McWhirter
6fd8f6b79a Remove more extra vars. 2021-08-04 13:55:34 -04:00
Dario Nieuwenhuis
07d4b196f7 Update nightly, remove removed features. 2021-08-04 19:48:14 +02:00
Bob McWhirter
f91bfef799 Formatting again. 2021-08-04 13:42:06 -04:00
Dario Nieuwenhuis
9bd34429f3 stm32: add missing + 'a bounds on trait GATs 2021-08-04 19:39:54 +02:00
Bob McWhirter
f4971fbb79 Further work sharing config for example and removing duplicated code. 2021-08-04 13:39:02 -04:00
Dario Nieuwenhuis
250f1cd0a5 util: fix unused return warning 2021-08-04 19:38:05 +02:00
Bob McWhirter
4fe9114695 Remove unused import. 2021-08-04 11:40:47 -04:00
Bob McWhirter
0787c8f8f5 Formatting. 2021-08-04 11:35:18 -04:00
Bob McWhirter
03f15d3a60 Remove builders from Config(s) and examples. 2021-08-04 11:32:39 -04:00
Dario Nieuwenhuis
07a095be0d
Merge pull request #343 from embassy-rs/rustfmt-everything
Rustfmt everything
2021-08-04 15:35:44 +02:00
Dario Nieuwenhuis
a1a5acb825 rustfmt everything 2021-08-04 15:25:21 +02:00
Dario Nieuwenhuis
87f27d5ed6 ci: rustfmt check all .rs files
The old script was missing many .rs files that were not enabled due to cfg's.
2021-08-04 15:23:32 +02:00
Dario Nieuwenhuis
f574e55395
Merge pull request #331 from timokroeger/stm32-enable-bit
metapac: Improve enable bit search
2021-08-04 15:15:08 +02:00
Timo Kröger
f240edc579 Remove broken panic message 2021-08-04 12:51:24 +02:00
Timo Kröger
e21faaeb47 cargo fmt 2021-08-04 12:43:51 +02:00
Timo Kröger
b36337b3d2 Refactor bit search logic when no clock specified
Always search for a enable bit, even when no clock is specified in the
yaml. Try to derive the clock name from the register name.

This change picked up USART2 for stm32wle which was missing the clock.
2021-08-04 12:42:35 +02:00
Dario Nieuwenhuis
de77dc11ca
Merge pull request #301 from thalesfragoso/i2cv2-dma
i2c-v2: Implement write_dma and write_dma_vectored
2021-08-04 12:28:18 +02:00
Timo Kröger
37536695e1 Refactor find_reg_for_field() 2021-08-04 11:22:54 +02:00
Dario Nieuwenhuis
5d31dd328f
Merge pull request #341 from lulf/usart-dma-read
Add uart::Read DMA-based implementation
2021-08-04 11:02:15 +02:00
Ulf Lilleengen
0d02342b2d Rename bread -> read_blocking 2021-08-04 08:34:30 +02:00
Bob McWhirter
c52ef23280
Merge pull request #342 from bobmcwhirter/h7-example-cleanup
Enhance Rcc configuration to be more fluentish.
2021-08-03 14:42:09 -04:00
Bob McWhirter
3e6aceaaa7 Run cargo-fmt on the h7 examples. 2021-08-03 14:31:41 -04:00
Bob McWhirter
88c11a653c Formatting fixes. 2021-08-03 14:12:11 -04:00
Bob McWhirter
d7409d63e8 Enhance Rcc configuration to be more fluentish.
Clean up H7 examples to remove all vegan HALs and PACs.
2021-08-03 13:57:18 -04:00
Timo Kröger
c985c031d4 Use a regex to match find enable and rst regs 2021-08-03 17:58:28 +02:00
Timo Kröger
4e47b15daf Ignore the clock number for enable bit search
The number has different meanings depending on family:
stm32f0: RCC_APB2ENR - APB peripheral clock enable register 2    CLOCK: APB1
stm32f4: RCC_APB2ENR - RCC APB2 peripheral clock enable register CLOCK: APB2

Ignore the clock number and search all registers for a matching enable bit.
2021-08-03 17:58:27 +02:00
Timo Kröger
fba8b86005 BTreeMaps to preserve ordering of generated code
Makes diffing of changes easier
2021-08-03 17:58:26 +02:00
Ulf Lilleengen
6ff0614cb6 Add uart::Read DMA-based implementation
* Rename existing read() to bread() (blocking)
2021-08-03 15:31:24 +02:00
Dario Nieuwenhuis
ad62900a40
Merge pull request #339 from embassy-rs/reomve-workaround
Remove version pinning workaround.
2021-08-02 20:53:44 +02:00
Dario Nieuwenhuis
6043383008 Remove version pinning workaround. 2021-08-02 20:47:30 +02:00
Dario Nieuwenhuis
9ca43752eb
Merge pull request #327 from embassy-rs/remove-pin
PeripheralMutex: Remove Pin
2021-08-02 20:28:54 +02:00
Dario Nieuwenhuis
3f28bb6c77 common: Initialize PeripheralMutex state with closure to ensure it's done in-place. 2021-08-02 20:13:41 +02:00
Dario Nieuwenhuis
e238079d7d Make const the states when able. 2021-08-02 19:59:02 +02:00
Dario Nieuwenhuis
63ac7ac799 Mark news as unsafe due to not being leak-safe. 2021-08-02 19:55:04 +02:00
Dario Nieuwenhuis
af87031d62 hal-common: remove Pin in PeripheralMutex 2021-08-02 19:55:04 +02:00
Dario Nieuwenhuis
de207764ae
Merge pull request #332 from bobmcwhirter/memory_x_gen
Emit a default memory.x alongside device.x from metapac.
2021-08-02 19:54:41 +02:00
Bob McWhirter
63b32b39e1 Use an em bikeshed instead of an underscore bikeshed. 2021-08-02 13:29:06 -04:00
Bob McWhirter
5f9447abb4 Put the implicit memory.x behind a memory_x feature on embassy-stm32. 2021-08-02 13:21:30 -04:00
Bob McWhirter
3a00a1dba7 Undo the pwr-guarding cfg. 2021-08-02 11:34:41 -04:00
Bob McWhirter
71040d1f2c Update to latest stm32-data. 2021-08-02 11:23:55 -04:00