Dario Nieuwenhuis
a8703b7598
Run rustfmt.
2022-06-12 22:22:31 +02:00
Dario Nieuwenhuis
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
Dario Nieuwenhuis
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
Will Glynn
962fabe5c9
examples/stm32*, tests/stm32: specify time-tick-32768hz
2022-05-31 16:14:23 -05:00
chemicstry
667abe6d1d
Simplify example
2022-05-26 14:11:15 +03:00
chemicstry
4b6162694a
Fix removed space
2022-05-26 14:05:56 +03:00
chemicstry
1d951a54be
Reimplement BufRead for BufferedUart
2022-05-26 14:02:55 +03:00
Dario Nieuwenhuis
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
Dario Nieuwenhuis
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
Dario Nieuwenhuis
82803bffda
Use embassy/defmt-timestamp-uptime in all examples.
2022-04-02 04:35:06 +02:00
chemicstry
9d71acc49e
Cleanup
2022-03-16 23:55:07 +02:00
chemicstry
f08f4df180
Cleanup
2022-03-16 20:33:46 +02:00
chemicstry
8a8e5c4b73
Fix SDMMC v2 and add H7 example
2022-03-16 20:20:39 +02:00
chemicstry
bf4a38ac06
Use RCC frequency instead of config
2022-03-16 19:09:37 +02:00
chemicstry
6d547b1143
SDIO working on stm32f4
2022-03-16 18:52:27 +02:00
Dario Nieuwenhuis
9bad9365dc
Update rust nightly, embedded-hal 1.0, embedded-hal-async.
2022-03-11 00:38:07 +01:00
Timo Kröger
4c30543938
[can] Do not use wildcard reexport for bxcan
2022-03-05 09:46:06 +01:00
bors[bot]
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
Dario Nieuwenhuis
340eb4eead
stm32: add rust stable support
2022-02-12 02:45:52 +01:00
Frederik
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
Cristian Eigel
898851ceeb
Port multiprio example to stm32f3 and stm32f4 platforms
2022-02-10 19:22:32 +01:00
chemicstry
a766bf635d
Fix function name
2022-02-09 02:04:31 +02:00
chemicstry
1f81a69347
Merge USB FS and HS peripherals. Add ULPI.
2022-02-09 02:02:23 +02:00
chemicstry
db0d798b48
Add stm32 USB OTG peripherals
2022-02-08 01:46:32 +02:00
Dario Nieuwenhuis
0719b05d63
traits: migrate Delay to embedded-hal 1.0+async, remove Rng and Flash.
2022-01-27 00:08:02 +01:00
Dario Nieuwenhuis
79f60adbfb
stm32: add time-driver-any
cargo feature that automatically picks one available timer.
2022-01-24 00:24:53 +01:00
Dario Nieuwenhuis
889d757ab8
stm32/spi: expose all functionality as inherent methods.
2022-01-19 17:59:55 +01:00
Dario Nieuwenhuis
c949519714
stm32/usart: expose all functionality as inherent methods.
2022-01-19 17:59:55 +01:00
Dario Nieuwenhuis
b526addf7b
stm32/exti: expose all functionality as inherent methods.
2022-01-19 17:59:55 +01:00
Dario Nieuwenhuis
58fc64722c
stm32/gpio: expose all functionality as inherent methods.
2022-01-19 17:59:55 +01:00
Ulf Lilleengen
2bc105803a
Make exti an optional feature
...
* Add embassy-stm32 build with exti
* Add exti to examples
2022-01-12 14:28:10 +01:00
Dario Nieuwenhuis
3332c40705
examples: remove unused deps.
2021-11-29 02:07:48 +01:00
Dario Nieuwenhuis
9b17b3d721
Remove unused deps
2021-11-15 20:13:22 +01:00
Bob McWhirter
436eb81fc2
Adjust for bxcan API.
2021-11-15 12:00:26 -05:00
Bob McWhirter
a770fc77c9
Adjust all examples to defmt 0.3.
2021-11-15 11:19:19 -05:00
Dario Nieuwenhuis
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
Dario Nieuwenhuis
f2623e7e9b
Update lots of deps
2021-09-11 01:35:23 +02:00
Dario Nieuwenhuis
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
Dario Nieuwenhuis
2c992f7010
stm32: move dbgmcu stuff to toplevel config setting, defaulting to true.
2021-08-19 23:50:19 +02:00
Dario Nieuwenhuis
d3aeb45fb3
Update cortex-m-rt to v0.7 for stm32, rp.
2021-08-19 00:56:11 +02:00
Timo Kröger
dacf75d911
bxcan: Fix the flaky CAN example
2021-08-18 21:58:50 +02:00
Timo Kröger
191a589820
bxcan: namechange "bxcan_v1" -> "can_bxcan"
2021-08-18 21:58:50 +02:00
Timo Kröger
7c405250a7
CAN support with bxcan crate
2021-08-18 21:58:50 +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
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
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
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
03f15d3a60
Remove builders from Config(s) and examples.
2021-08-04 11:32:39 -04:00
Ulf Lilleengen
0d02342b2d
Rename bread -> read_blocking
2021-08-04 08:34:30 +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
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
f6c5f039c8
Emit a default memory.x alongside device.x from metapac.
2021-08-02 11:23:55 -04:00
Ben Gamari
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
Thales Fragoso
5cfb9adad8
f4-pll: Add max values per chip
2021-07-29 18:43:15 -03:00
Thales Fragoso
e7714983b3
f4-rcc: Add option to enable debug_wfe and add hello example
2021-07-29 18:43:15 -03:00
Dario Nieuwenhuis
7bfb763e09
Rename embassy-extras to embassy-hal-common
2021-07-29 13:44:51 +02:00
Timo Kröger
dd1ec8ebec
Use embassy::main
macro for stm32f4 examples
2021-07-27 15:03:18 +02:00
Timo Kröger
06fb2a7a80
Enable SYSCFG clock in exti::init()
2021-07-24 11:13:49 +02:00
Bob McWhirter
67283c0cbd
Reset back the memory.x also.
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
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
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
Timo Kröger
5e998d1a6c
Cleanup stm32f4 examples
...
* Remove dependency on stm32f4 pac crate
* Remove unused `ZeroClock`
2021-07-21 23:12:36 +02:00
Dario Nieuwenhuis
d7176da37c
stm32/examples: update DMA channel names
2021-07-17 08:04:33 +02:00
Dario Nieuwenhuis
3d1391ef2d
stm32/dma: impl all variants
2021-07-16 14:41:20 -04:00
Bob McWhirter
d5fb558005
Fix non-DMA USART example.
2021-06-29 13:08:18 -04:00
Bob McWhirter
24f18819c8
Adjust example for RCC and DMA.
2021-06-29 11:01:57 -04:00
Thales Fragoso
0eaadfc125
stm32: Update gpio examples
2021-06-25 18:16:43 -03:00
Ulf Lilleengen
95532726b2
Add minimal RCC impls for L4 and F4
2021-06-14 11:33:11 +02:00
Rukai
010b2b9497
Fix stm32 warnings
2021-06-06 00:46:20 +10:00
Dario Nieuwenhuis
7d869bdec8
Update heapless
2021-06-04 01:35:04 +02:00
Dario Nieuwenhuis
dff03ecfc7
Move examples to a subdirectory
2021-06-02 01:32:19 +02:00