Commit Graph

79 Commits

Author SHA1 Message Date
a8703b7598 Run rustfmt. 2022-06-12 22:22:31 +02:00
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
db344c2bda common/PeripheralMutex: remove unsafe API. (#802)
Following the project's decision that "leak unsafe" APIs are not marked as "unsafe",
update PeripheralMutex to accept non-'static state without unsafe.

Fixes #801
2022-06-09 21:28:13 +02:00
962fabe5c9 examples/stm32*, tests/stm32: specify time-tick-32768hz 2022-05-31 16:14:23 -05:00
667abe6d1d Simplify example 2022-05-26 14:11:15 +03:00
4b6162694a Fix removed space 2022-05-26 14:05:56 +03:00
1d951a54be Reimplement BufRead for BufferedUart 2022-05-26 14:02:55 +03:00
fc32b3750c Remove embassy_hal_common::usb.
The replacement is `embassy-usb`. There's a WIP driver for stm32 USBD in #709,
there's no WIP driver for stm32 USB_OTG. This means we're left without
USB_OTG support for now.

Reason for removing is I'm going to soon remove `embassy::io`, and
USB uses it. I don't want to spend time maintaining "dead" code
that is going to be removed. Volunteers welcome, either to update
old USB to the new IO, or write a USB_OTG driver fo the new USB.
2022-05-04 01:41:37 +02:00
b27feb0619 executor: fix unsoundness in InterruptExecutor::start.
The initial closure is not actually called in the interrupt, so this is
illegally sending non-Send futures to the interrupt.

Remove the closure, and return a SendSpawner instead.
2022-04-25 22:09:04 +02:00
82803bffda Use embassy/defmt-timestamp-uptime in all examples. 2022-04-02 04:35:06 +02:00
9d71acc49e Cleanup 2022-03-16 23:55:07 +02:00
f08f4df180 Cleanup 2022-03-16 20:33:46 +02:00
8a8e5c4b73 Fix SDMMC v2 and add H7 example 2022-03-16 20:20:39 +02:00
bf4a38ac06 Use RCC frequency instead of config 2022-03-16 19:09:37 +02:00
6d547b1143 SDIO working on stm32f4 2022-03-16 18:52:27 +02:00
9bad9365dc Update rust nightly, embedded-hal 1.0, embedded-hal-async. 2022-03-11 00:38:07 +01:00
4c30543938 [can] Do not use wildcard reexport for bxcan 2022-03-05 09:46:06 +01:00
eb922c4655 Merge #608
608: stm32f4: add adc + example r=Dirbaio a=ain101

Example tested on stm32f407vg Discovery Board.
minimal adc: no vref, dma, complex sequence

Co-authored-by: Frederik <frederik@frederik.at>
2022-02-13 11:44:59 +00:00
340eb4eead stm32: add rust stable support 2022-02-12 02:45:52 +01:00
7a3d28ad00 stm32f4: add adc + example
Example tested on stm32f407vg Discovery Board.
minimal adc: no vref, dma, complex sequence
2022-02-10 23:28:41 +01:00
898851ceeb Port multiprio example to stm32f3 and stm32f4 platforms 2022-02-10 19:22:32 +01:00
a766bf635d Fix function name 2022-02-09 02:04:31 +02:00
1f81a69347 Merge USB FS and HS peripherals. Add ULPI. 2022-02-09 02:02:23 +02:00
db0d798b48 Add stm32 USB OTG peripherals 2022-02-08 01:46:32 +02:00
0719b05d63 traits: migrate Delay to embedded-hal 1.0+async, remove Rng and Flash. 2022-01-27 00:08:02 +01:00
79f60adbfb stm32: add time-driver-any cargo feature that automatically picks one available timer. 2022-01-24 00:24:53 +01:00
889d757ab8 stm32/spi: expose all functionality as inherent methods. 2022-01-19 17:59:55 +01:00
c949519714 stm32/usart: expose all functionality as inherent methods. 2022-01-19 17:59:55 +01:00
b526addf7b stm32/exti: expose all functionality as inherent methods. 2022-01-19 17:59:55 +01:00
58fc64722c stm32/gpio: expose all functionality as inherent methods. 2022-01-19 17:59:55 +01:00
2bc105803a Make exti an optional feature
* Add embassy-stm32 build with exti
* Add exti to examples
2022-01-12 14:28:10 +01:00
3332c40705 examples: remove unused deps. 2021-11-29 02:07:48 +01:00
9b17b3d721 Remove unused deps 2021-11-15 20:13:22 +01:00
436eb81fc2 Adjust for bxcan API. 2021-11-15 12:00:26 -05:00
a770fc77c9 Adjust all examples to defmt 0.3. 2021-11-15 11:19:19 -05:00
2221e1fa93 Replace rustflags with build.rs extra-link-args.
Rustflags apply to ALL the crates in the graph, while we only need
them for the toplevel crate which is the only one getting linked.

Rustflags are not equal for all crates, this caused cargo to re-build the
same dependency crate multiple times uselessly. After this change, deps
are reused more, making builds faster.

Note that this only applies when sharing the target/ dir for multiple crates
in the repo which is not the default.
2021-11-07 23:52:11 +01:00
f2623e7e9b Update lots of deps 2021-09-11 01:35:23 +02:00
de016e8456 Remove trait_alias, allow(incomplete_features).
trait_alias seems unused. no idea why it's there.
2021-09-03 17:00:58 +02:00
2c992f7010 stm32: move dbgmcu stuff to toplevel config setting, defaulting to true. 2021-08-19 23:50:19 +02:00
d3aeb45fb3 Update cortex-m-rt to v0.7 for stm32, rp. 2021-08-19 00:56:11 +02:00
dacf75d911 bxcan: Fix the flaky CAN example 2021-08-18 21:58:50 +02:00
191a589820 bxcan: namechange "bxcan_v1" -> "can_bxcan" 2021-08-18 21:58:50 +02:00
7c405250a7 CAN support with bxcan crate 2021-08-18 21:58:50 +02:00
e44acd0d56 stm32f4: Use unwrap! where possible 2021-08-05 22:39:59 +02:00
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
b1d631d639 stm32/time: add Cargo features to choose tim2/tim3 2021-08-05 19:14:09 +02:00
0ea6a2d890 time: replace dyn clock/alarm with a global Driver trait 2021-08-05 19:14:09 +02:00
cfa1f61154 Merge pull request #344 from bobmcwhirter/remove_builders
Remove builders from Config(s) and examples.
2021-08-04 21:32:39 +02:00
9726f77ce1 Grep fails me. 2021-08-04 15:28:08 -04:00
6fd8f6b79a Remove more extra vars. 2021-08-04 13:55:34 -04:00