Commit Graph

1416 Commits

Author SHA1 Message Date
Dario Nieuwenhuis
4b74e8fc50
Merge pull request #357 from bobmcwhirter/h7_exti
Add H7 exti button example using correct EXTI reg block offsets.
2021-08-16 21:30:28 +02:00
Bob McWhirter
a93ed2bed6 Add H7 exti button example using correct EXTI reg block offsets. 2021-08-16 15:15:07 -04:00
Ulf Lilleengen
cbff0398bb
Add IRQ-driven buffered USART implementation for STM32 v2 usart (#356)
* Add IRQ-driven buffered USART implementation for STM32 v2 usart

* Implementation based on nRF UARTE, but simplified to not use DMA to
  avoid complex interaction between DMA and USART.
* Implementation of AsyncBufRead and AsyncWrite traits
* Some unit tests to ring buffer
* Update polyfill version
* Update sub module to get usart IRQ fix
2021-08-16 17:16:49 +02:00
Dario Nieuwenhuis
c310f18aaf
Merge pull request #355 from thalesfragoso/dma-fences
stm32: Add fences to DMA code
2021-08-11 13:28:57 +02:00
Thales Fragoso
c7ae2d2a3a stm32: Add fences to DMA code 2021-08-10 20:45:41 -03:00
Dario Nieuwenhuis
0be5e323bb
Merge pull request #354 from embassy-rs/nrf-wdt
nrf: add WDT driver
2021-08-07 14:56:24 +02:00
Dario Nieuwenhuis
2540a960e5 nrf: add WDT driver 2021-08-07 14:26:28 +02:00
Dario Nieuwenhuis
e1abba69b7
Merge pull request #353 from embassy-rs/nrf-update-pacs
nrf: update PACs to 0.10
2021-08-07 13:56:29 +02:00
Dario Nieuwenhuis
452f7e0c2c nrf: update PACs to 0.10 2021-08-07 12:41:12 +02:00
Dario Nieuwenhuis
a361050224
Merge pull request #336 from bgamari/unwrap-consistency
examples: Consistently use unwrap! in favor of .unwrap()
2021-08-05 22:45:00 +02:00
Ben Gamari
a3b56a3764 embassy-macros: Use defmt::unwrap! when spawning embassy::main
But only when `defmt` feature is enabled.
2021-08-05 22:40:12 +02:00
Ben Gamari
40e7176e13 embassy-stm32: Eliminate use of unwrap 2021-08-05 22:40:08 +02:00
Ben Gamari
41aaff95f8 stm32h7: Use unwrap! 2021-08-05 22:39:59 +02:00
Ben Gamari
e44acd0d56 stm32f4: Use unwrap! where possible 2021-08-05 22:39:59 +02:00
Ben Gamari
f4950c4449 examples: Consistently use unwrap! in favor of .unwrap()
Unfortunately errors from `embedded_graphics` and `core` doesn't provide
the necessary instances currently.
2021-08-05 22:39:59 +02:00
Dario Nieuwenhuis
36402b5487
Merge pull request #348 from embassy-rs/remove-portal
Remove Portal. Fixes #32
2021-08-05 22:31:06 +02:00
Dario Nieuwenhuis
446ee9c2c5
Merge pull request #347 from embassy-rs/tmm-fix-ub
util: fix unsoundness when dropping ThreadModeMutex outside thread mode.
2021-08-05 22:30:49 +02:00
Dario Nieuwenhuis
b1240217bd Remove Portal. Fixes #32
Portal is very niche, I've only ever used it in `nrf-softdevice` and in a very particular case:
sending event raw-pointers across tasks but "synchronously", because the destination task must process
it now, so it's not deallocated. For most usecases, Signal or channels is enough.

It's unclear to me whether it can be made ub-free. It has problems with reentrancy. It's also not leak-safe, which is quite annoying.

So, remove it for now. We can always add it back later.
2021-08-05 22:24:03 +02:00
Dario Nieuwenhuis
aaa0d1419c util: fix unsoundness when dropping ThreadModeMutex outside thread mode.
Fixes #283
2021-08-05 22:20:45 +02:00
Dario Nieuwenhuis
8a65128cfe
Merge pull request #338 from embassy-rs/time-driver
Remove dyn in time Clock/Alarm.
2021-08-05 19:25:12 +02:00
Dario Nieuwenhuis
05e50e1f4a time_driver: use regular fn ptr -> raw ptr casts 2021-08-05 19:19:47 +02:00
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