Dario Nieuwenhuis
e3b8e35498
Make embassy-net nightly-only.
...
It's useless without async traits, so juggling the `nightly` feature
around is not worth the pain.
2022-05-19 06:15:01 +02:00
Dario Nieuwenhuis
47ceee47d5
Update embedded-io to 0.3
2022-05-19 00:36:18 +02:00
Dario Nieuwenhuis
931a137f8c
Replace embassy::io with embedded_io.
2022-05-07 01:45:54 +02: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
Ulf Lilleengen
484e0acc63
Add stm32 flash + bootloader support
...
* Add flash drivers for L0, L1, L4, WB and WL. Not tested for WB, but
should be similar to WL.
* Add embassy-boot-stm32 for bootloading on STM32.
* Add flash examples and bootloader examples
* Update stm32-data
2022-04-27 15:17:18 +02:00
Dario Nieuwenhuis
3251a21fb7
Switch to crates.io embedded-hal, embedded-hal-async.
...
This temporarily removes support for the async UART trait, since it's
not yet in embedded-hal-async.
2022-04-22 19:58:24 +02:00
Dario Nieuwenhuis
e5a843dc06
net: auto-enable defmt in smoltcp using namespaced features.
2022-04-13 17:46:27 +02:00
Dario Nieuwenhuis
8b757e1aec
Add stm32wlexx support
2022-04-08 03:43:58 +02:00
Dario Nieuwenhuis
0c07d03754
Add missing stm32wl/stm32wb chips except stm32wle
2022-04-08 03:15:27 +02:00
Dario Nieuwenhuis
50ff63ab88
Add STM32L5 support.
2022-04-08 03:11:38 +02:00
Dario Nieuwenhuis
aee19185b7
Add more docserver metadata.
2022-04-05 21:05:09 +02:00
Joonas Javanainen
08e6a996bc
Regenerate embassy-stm32 features
2022-03-21 00:19:36 +02:00
Dario Nieuwenhuis
9bad9365dc
Update rust nightly, embedded-hal 1.0, embedded-hal-async.
2022-03-11 00:38:07 +01:00
Dario Nieuwenhuis
44096358a2
docs: add metadata.embassy_docs to cargo tomls.
2022-03-04 18:03:41 +01:00
Matous Hybl
0172ca5b81
stm32: Add support for using TIM12 and TIM15 as time driver
2022-02-28 19:20:22 +01:00
Dario Nieuwenhuis
340eb4eead
stm32: add rust stable support
2022-02-12 02:45:52 +01:00
Dario Nieuwenhuis
20e14b8edb
embassy, embassy-nrf: add nightly
Cargo feature to gate nightly-only features.
2022-02-12 01:16:31 +01:00
bors[bot]
1d265b73b2
Merge #601
...
601: [part 1/n] Change macrotables to build.rs codegen r=lulf a=Dirbaio
This PR replaces the "macrotables" (the macros like `stm32_data::peripherals!`) with a `const METADATA`.
Macrotables had some problems:
- Hard to debug
- Somewhat footgunny (typo the "pattern" and then nothing matches and the macro now expands to nothing, silently!)
- Limited power
- Can't count, so we had to add a [special macrotable for that](f50f3f0a73/embassy-stm32/src/dma/bdma.rs (L26)
).
- Can't remove duplicates, so we had to fallback to [Rust code in build.rs](f50f3f0a73/embassy-stm32/build.rs (L105-L145)
)
- Can't include the results as a listto another macro, so again [build.rs](https://github.com/embassy-rs/embassy/blob/master/embassy-stm32/build.rs#L100-L101 ).
They work fine for the 95% of cases, but for the remaining 5% we need Rust code in build.rs. So we might as well do everything with Rust code, so everything is consistent.
The new approach generates a `const METADATA: Metadata = Metadata { ... }` with [these structs](https://github.com/embassy-rs/embassy/blob/unmacrotablize/stm32-metapac-gen/src/assets/metadata.rs ) in `stm32-metapac`. `build.rs` can then read that and generate whatever code.
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-02-09 15:27:35 +00:00
bors[bot]
d91bd0b9a6
Merge #602
...
602: Add stm32 USB OTG peripherals r=Dirbaio a=chemicstry
Fixes #557 . This is similar to #580 , but for synopsys IP.
I could add examples to other chips, but I have no way of testing them. The F4 example is tested and working.
Co-authored-by: chemicstry <chemicstry@gmail.com>
2022-02-09 00:29:00 +00:00
chemicstry
1f81a69347
Merge USB FS and HS peripherals. Add ULPI.
2022-02-09 02:02:23 +02:00
Dario Nieuwenhuis
940412c034
stm32/build.rs: switch to using stm32-metapac metadata and quote.
2022-02-09 00:31:21 +01:00
Matous Hybl
d37d714314
stm32: Add support for FMC
2022-02-08 17:30:20 +01: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
Ulf Lilleengen
4032fc0655
Support unstable-trait feature for stm32
2022-01-26 22:39:06 +01:00
Dario Nieuwenhuis
533ceb707c
stm32: add tim4, tim5 support for time-driver (stm32f410 doesn't have tim2, tim3)
2022-01-24 00:50:10 +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
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
Ulf Lilleengen
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
VasanthakumarV
7733d11f90
[generate] Add stm32f3 chips to the Cargo manifest
2021-12-13 13:49:41 +05:30
Dario Nieuwenhuis
88d4b0c00d
stm32: add stm32g4 support.
2021-11-27 02:34:23 +01:00
Dario Nieuwenhuis
e187f50f4b
stm32: remove unused deps
2021-11-24 01:41:51 +01:00
Dario Nieuwenhuis
dfb6d407a1
stm32: rename core features from _cmX to -cmX, cleanup gen.
2021-11-23 23:49:06 +01:00
Bob McWhirter
ee1490bce1
Move to the newly released bxcan crate that supports defmt 0.3.
2021-11-15 13:18:53 -05:00
Bob McWhirter
c2da498263
Update to defmt 3.0ish.
...
Lots of gitrevs deps.
2021-11-15 11:09:08 -05:00
bors[bot]
1bf6e646c9
Merge #465
...
465: Adjust for STM32U5. r=lulf a=bobmcwhirter
Co-authored-by: Bob McWhirter <bmcwhirt@redhat.com>
2021-11-02 20:42:41 +00:00
Ulf Lilleengen
205a223af3
Update versions of critical-section and atomic-polyfill
2021-11-02 18:52:03 +01:00
Bob McWhirter
f12b70535b
Adjust for STM32U5.
2021-11-02 12:05:24 -04:00
Matous Hybl
015cad84dd
Initial support for STM32F767ZI.
2021-10-26 17:33:28 +02:00
Mariusz Ryndzionek
ce361abb1b
Changing the casts (code review request)
2021-09-28 18:31:04 +02:00
Mariusz Ryndzionek
bce909ec1e
Initial STM32F1 family support with two examples for STM32F103C8 (Blue Pill)
2021-09-28 18:31:04 +02:00
Vincent Stakenburg
7d6d274d55
Add MSI and PLL clock source for L4
2021-09-24 18:27:39 +02:00
Ulf Lilleengen
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
Dario Nieuwenhuis
bb72f7eb98
Merge pull request #390 from lulf/wasm-executor
...
Wasm executor support
2021-09-13 18:55:17 +02:00
Ulf Lilleengen
99a94f1d50
Update version of critical-section
2021-09-13 17:05:17 +02:00
Dario Nieuwenhuis
d6faf69e09
Merge pull request #378 from numero-744/gen-features-using-rust-not-python
...
Use our beloved Rust instead of Python
2021-09-13 16:47:01 +02:00
Ulf Lilleengen
e24528051b
Add WASM support for executor
...
* Adds an executor for WASM runtimes based on wasm_bindgen.
* Add time driver based on JS time handling.
* Add example that can run in browser locally.
* Update to critical-section version that supports 'std' flag
2021-09-13 16:42:39 +02:00
Côme ALLART
99ccf18160
fix(gen-features): keep data files order
2021-09-11 20:04:57 +02:00
Dario Nieuwenhuis
f2623e7e9b
Update lots of deps
2021-09-11 01:35:23 +02:00
Ulf Lilleengen
7ad6280e65
Add HAL for SubGhz peripheral for STM32 WL series
...
Based on the HAL from stm32wl, the peripheral driver has been
modified to fit into embassy, using the embassy APIs, providing
operation of the radio peripheral.
The initial version does not offer any async APIs, but the example
shows how the radio IRQ can be used to perform async TX of the radio.
2021-09-02 10:39:56 +02:00
Côme ALLART
022b809248
refactor(gen_features): use Rust instead of Python
...
Done for /embassy-stm32 only
The new generator is in /stm32-gen-features
/stm32-metapac could/should be added too
A CI check "generated features up to date" could/should be performed
2021-08-27 11:09:27 +02:00
Ben Gamari
e2f71ffbbd
Add support for STM32G0
2021-08-20 00:15:11 +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
0c3bede64f
bxcan: Make bxcan
a hard dependency
...
There seems no way to enable a optional dependency from build.rs or
features passed through the command line.
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
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
b1d631d639
stm32/time: add Cargo features to choose tim2/tim3
2021-08-05 19:14:09 +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
Dario Nieuwenhuis
7bfb763e09
Rename embassy-extras to embassy-hal-common
2021-07-29 13:44:51 +02:00
Dario Nieuwenhuis
f916fe5476
all hals: reexport PAC if unstable-pac
feature is set.
2021-07-14 22:19:04 +02:00
Dario Nieuwenhuis
35a76c364a
embassy/time: make optional via Cargo feature
2021-07-12 03:45:48 +02:00
Thales Fragoso
797534d1a6
Update features to include F0
2021-06-22 14:41:42 -03:00
Thales Fragoso
098ce6e740
stm32h7: Add ethernet example
2021-06-16 16:48:35 +02:00
Thales Fragoso
77546825a1
stm32: Make vcell dependency optional
2021-06-16 16:48:35 +02:00
Thales Fragoso
598201bff3
eth-v2: Make embassy-net optional
2021-06-16 16:48:35 +02:00
Thales Fragoso
46e1bae9e3
eth-v2: Start Ethernet peripheral implementation
2021-06-16 16:48:35 +02:00
Ulf Lilleengen
b6a8703698
Add support for generating PAC for dual cores
...
* Chips that have multiple cores will be exposed as chipname_corename,
i.e. stm32wl55jc_cm4
* Chips that have single cores will use the chip family as feature name
and pick the first and only core from the list
* Add support for stm32wl55 chip family
2021-06-16 15:12:07 +02:00
Dominik Boehi
0eab96f573
Initial support and example for STM32WB55
2021-06-12 07:06:36 +02:00
Dario Nieuwenhuis
0ffa78aca1
Use macrotables from build.rs
2021-06-07 05:12:10 +02:00
Ulf Lilleengen
1a9a619033
Implement togglable output pin for Output
2021-05-31 09:33:33 +02:00
Dario Nieuwenhuis
60f12c78dd
Add resolver=2
2021-05-31 02:43:59 +02:00
Dario Nieuwenhuis
d8e4421fc6
Add stm32-metapac crate, with codegen in rust
2021-05-31 02:40:58 +02:00
Bob McWhirter
a9ec941dca
i2c v1
2021-05-25 14:47:07 -04:00
Ulf Lilleengen
1c10e746b6
Re-adds embassy macros for stm32
...
* Hook RCC config into chip config and use chip-specific RCC init
function
* RTC/clock setup is ignored for now
2021-05-25 13:30:42 +02:00
Thales Fragoso
9c5d4d9f8a
STM32 Clock: Use atomic-polyfill
2021-05-23 17:22:07 -03:00
Thales Fragoso
2b1d7fe3ee
Use Mutex and CriticalSection from bare-metal 1.0
2021-05-22 23:53:50 -03:00
Thales Fragoso
5e49a9932f
Update generated files
2021-05-22 22:07:05 -03:00
Thales Fragoso
a0fe9e4645
Add unstable feature to give access to the pac
2021-05-22 15:34:49 -03:00
Thales Fragoso
f9724fa576
Update generated code
2021-05-21 20:20:12 -03:00
Thales Fragoso
82ca5b495e
Update generated code
2021-05-21 20:14:52 -03:00
Thales Fragoso
7e388fcf58
Add pac RCC for H7 (generated)
2021-05-21 20:11:27 -03:00
Dario Nieuwenhuis
0d08e65235
Regen
2021-05-21 19:05:21 +02:00
Bob McWhirter
a4fd1282e9
Generate _spi_v3 items.
2021-05-17 11:34:36 -04:00
Dario Nieuwenhuis
f7858631d8
stm32: fix build, add ci
2021-05-17 03:16:58 +02:00
Thales Fragoso
86063ac2a2
Update generated code
2021-05-14 23:53:12 -03:00
Thales Fragoso
a5d473be0e
Fix RNG interrupt name
2021-05-14 23:47:56 -03:00
Thales Fragoso
2cb66d6032
Update generated code
2021-05-14 23:44:51 -03:00
Thales Fragoso
ad720f83df
Expose data transfer timeout and implement configuration for BusWidth one
2021-05-14 23:43:11 -03:00
Thales Fragoso
359aaa5aeb
Implement embedded-sdmmc traits
2021-05-14 23:43:09 -03:00
Thales Fragoso
0b607ca80a
Initial H7 sdmmc support
2021-05-14 23:40:28 -03:00
Bob McWhirter
9e93a0999f
Add SPIv1, use cfg_attr to pick correct impl.
...
Add IRQ to impl_rng!() to accomodate RNG vs HASH_RNG split.
2021-05-13 14:28:53 -04:00
Bob McWhirter
0470abb353
Checkpoint.
2021-05-10 15:33:37 -04:00
Dario Nieuwenhuis
ac616a6dcf
Add dma scaffolding
2021-05-10 01:20:04 +02:00
Bob McWhirter
e8537ca9c2
Implement async RNG, including rand_core sync traits.
2021-05-06 14:35:46 -04:00
Dario Nieuwenhuis
f5f98cdeab
Autogenerate features for family, peripherals and peripheral versions
2021-05-06 03:59:16 +02:00
Dario Nieuwenhuis
23ca2f9174
Autogenerate the tailored PAC for each chip
2021-05-06 03:43:46 +02:00
Bob McWhirter
14ce02eecf
Add the leaf features for peripherals.
2021-05-05 11:06:03 -04:00
Bob McWhirter
d8156b43b1
Generate some chip features by peripherals.
2021-05-05 11:01:02 -04:00
Dario Nieuwenhuis
7ef5806168
stm32: codegen interrupts
2021-05-01 03:08:52 +02:00
Bob McWhirter
0713947d67
Stub in RNG impl.
2021-04-26 14:11:46 -04:00
Dario Nieuwenhuis
29b5bae1d1
Codegen PoC
2021-04-20 03:37:49 +02:00
Dario Nieuwenhuis
aa65d5ccaf
it's alive
2021-04-20 02:30:13 +02:00
xoviat
7cb46ac720
stm32: fix usb
2021-04-06 14:23:13 -05:00
xoviat
6416f2fc08
stm32: use crates version
2021-04-06 13:56:22 -05:00
xoviat
009e1896bf
stm32: consolidate crates
2021-03-30 10:05:52 -05:00
xoviat
9e687ade64
Merge branch 'master' of https://github.com/akiles/embassy into proc-macro
2021-03-27 21:31:49 -05:00
xoviat
3242990690
Merge branch 'master' of https://github.com/akiles/embassy into st-usb
2021-03-27 21:24:21 -05:00
xoviat
6ee9e012fc
add embassy::main and implement for stm32f4
2021-03-27 17:27:39 -05:00
xoviat
6f597653af
stm32: consolidate modules
2021-03-26 19:34:52 -05:00
Thales Fragoso
d4f35c1729
Move USB to embassy-extras
2021-03-19 20:49:15 -03:00
xoviat
03ecc91d55
stm32: consolidate functionality into new pkg
2021-03-19 15:26:20 -05:00