Commit Graph

63 Commits

Author SHA1 Message Date
9bad9365dc Update rust nightly, embedded-hal 1.0, embedded-hal-async. 2022-03-11 00:38:07 +01:00
ed84d753c7 Update examples 2022-03-08 17:12:50 -06:00
340eb4eead stm32: add rust stable support 2022-02-12 02:45:52 +01:00
550da471be stm32: Remove OptionalPin
The idea behind OptionalPin has a few problems:

- you need to impl the signal traits for NoPin which is a bit weird https://github.com/embassy-rs/embassy/blob/master/embassy-stm32/src/dcmi.rs#L413-L416
- you can pass any combination of set/unset pins, which needs checking at runtime  https://github.com/embassy-rs/embassy/blob/master/embassy-stm32/src/dcmi.rs#L130

The replacement is to do multiple `new` constructors for each combination of pins you want to take.
2022-02-10 02:38:10 +01:00
0719b05d63 traits: migrate Delay to embedded-hal 1.0+async, remove Rng and Flash. 2022-01-27 00:08:02 +01:00
4032fc0655 Support unstable-trait feature for stm32 2022-01-26 22:39:06 +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
97ab859f00 stm32/i2c: 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
cdc66e110f stm32/rcc: remove builders on Config.
This makes API consistent with other Config structs in Embassy, where
the convention is to not use builders.
2022-01-04 13:31:30 +01:00
3811c0a401 Add adapter for implementing async traits for blocking types
This allows writing drivers relying on async traits, while still
functioning with implementations that already implement the embedded-hal
traits.

Add examples to stm32l4 for using this feature.
2021-12-17 12:54:51 +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
c2da498263 Update to defmt 3.0ish.
Lots of gitrevs deps.
2021-11-15 11:09:08 -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
f12b70535b Adjust for STM32U5. 2021-11-02 12:05:24 -04:00
01e5376b25 Merge #456
456: Fix L4 clock setup for MSI and PLL to allow RNG operation r=Dirbaio a=lulf

Example is tested on STM32L475VG.

Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2021-10-26 11:59:14 +00:00
e55726964d Fix clock setup for MSI and PLL to allow RNG opereation
Add RNG example using PLL as clock source.
2021-10-26 13:45:53 +02:00
f8ebc967a9 Add implementation of async trait for STM32 I2C v2
* Add DMA read implementation for I2C v2
* Add example using DMA for I2C
2021-10-21 12:30:02 +02:00
9e461b771a Add i2c example for L4 2021-10-20 10:11:34 +02:00
c79485c286 Support for STM32L1
* Add RCC
* Fix more issues with dash in chip names
* Update stm32-data version
* Add blinky and spi example
2021-09-21 14:50:23 +02: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
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
07d4b196f7 Update nightly, remove removed features. 2021-08-04 19:48:14 +02:00
0d02342b2d Rename bread -> read_blocking 2021-08-04 08:34:30 +02:00
6ff0614cb6 Add uart::Read DMA-based implementation
* Rename existing read() to bread() (blocking)
2021-08-03 15:31:24 +02:00
3420cbf744 examples: Drop build-std = ["core"]
Previously the cargo configurations of all of the example projects had
`build-std = ["core"]`, which forces compilation of `core` as a
code-size optimisation. However, this is strictly unnecessary and will
currently break for users who do not use `rustup` directly (e.g. nix
users).
2021-07-31 13:01:15 -04:00
895781d0d1 stm32l4: Fix examples crate name 2021-07-29 18:14:01 +02:00
4ccac69929 stm32l4: Cleanup examples
* Use `cortex_m_rt::entry` for sync examples
* Use `Dbgmcu::enable_all()` everywhere
2021-07-29 15:54:11 +02:00
7bfb763e09 Rename embassy-extras to embassy-hal-common 2021-07-29 13:44:51 +02:00
5b0ae5c25b stm32/examples: cleanup L4 2021-07-24 13:57:11 +02:00
06fb2a7a80 Enable SYSCFG clock in exti::init() 2021-07-24 11:13:49 +02:00
34dfe28d3a FFS warnings about unused Result<>. 2021-07-23 13:22:39 -04:00
053e330375 Fix warnings about un-used variables. 2021-07-23 13:22:39 -04:00
e269971597 Fix extraneous mut warnings in L4 example. 2021-07-23 13:22:39 -04:00
bee7f60f08 Improve the SPIv2 DMA example to verify it actually works. 2021-07-23 13:22:39 -04:00
0d2051243e SPIv2 + DMA. 2021-07-23 13:22:39 -04:00
5ac91933ff stm32: No need to enable GPIO clocks manually 2021-07-23 17:54:13 +02:00
d7176da37c stm32/examples: update DMA channel names 2021-07-17 08:04:33 +02:00
3d1391ef2d stm32/dma: impl all variants 2021-07-16 14:41:20 -04:00
71c8d7aa7d stm32l4/examples: remove old-pac uses. 2021-07-15 00:37:00 +02:00
21e94972dc Fix more warnings and examples. 2021-07-14 14:55:20 -04:00