Commit Graph

1589 Commits

Author SHA1 Message Date
8193885cb5 Merge #482
482: Add MCO peripheral. r=Dirbaio a=matoushybl

This PR adds an abstraction over STM32 RCC feature called MCO (Microcontroller Clock Output). The clock output can bind to several clock sources and then can be scaled using a prescaler.

Given that from the embassy ecosystem the RCC is generaly invisible to the user, the MCO was implemented as a separate peripheral bound to the pin where the clock should appear.

Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2021-11-11 16:20:02 +00:00
c14642cffc Add MCO peripheral. 2021-11-11 11:34:09 +01:00
96e2f0dfc5 Merge #468
468: Add v1c ethernet driver for the STM32F7 family. r=Dirbaio a=matoushybl



Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2021-11-10 22:07:38 +00:00
f0ba79059e Add v1c ethernet driver for the STM32F7 family. 2021-11-10 10:16:46 +01:00
fc75e0ec57 Merge #481
481: Stm32u5 r=Dirbaio a=bobmcwhirter



Co-authored-by: Bob McWhirter <bmcwhirt@redhat.com>
2021-11-09 14:00:25 +00:00
12a64b867b More support for U5 PWR (ish), RCC, and FLASH (ish). 2021-11-08 14:27:33 -05:00
5f124ec49f Update U5 to init RCC. 2021-11-08 14:20:51 -05:00
db889da044 Merge #473
473: Replace rustflags with build.rs extra-link-args. r=Dirbaio a=Dirbaio

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.

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2021-11-07 23:06:10 +00:00
5322e293bd Merge #461
461: nrf: add initial nrf5340 support r=Dirbaio a=Dirbaio

Thanks to `@diondokter's` work on DPPI this was quite easy! :) 

TODO:
- [ ] Add config option to enable 128mhz
- [ ] Add config option to unlock APPROTECT automatically.
- [ ] Add a way to boot net (config option or API?)
- [ ] Support WDT (there's WDT0, WDT1. Needs some refactor)
- [ ] Support NVMC
- [ ] Support TEMP

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2021-11-07 22:58:27 +00: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
90095adedf Merge #471
471: Update stm32-data r=Dirbaio a=Dirbaio

Updates to include https://github.com/embassy-rs/stm32-data/pull/98 to check I haven't broken anything.

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2021-11-05 18:31:19 +00:00
a8c78a3807 Update stm32-data 2021-11-05 19:30:53 +01:00
5d863ad19f Merge #469
469: Add support for STM32H723 and fix eth example. r=matoushybl a=matoushybl



Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2021-11-04 15:28:09 +00:00
9b5d9fbfca Fix v2 ethernet pin definitions. Fix ethernet example for H7 nucleos. 2021-11-04 16:25:30 +01:00
26f86d7f36 Merge #470
470: Add TCP listen. r=Dirbaio a=matoushybl



Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2021-11-04 12:49:41 +00:00
d742d0252e Add TCP listen. 2021-11-04 13:34:13 +01:00
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
f9c266bc10 Omg. More formatting. 2021-11-02 16:06:49 -04:00
16c88e3094 Need to include a bit of embassy for the NVIC. 2021-11-02 15:58:40 -04:00
9deafa8bab Remove unused imports. 2021-11-02 15:56:04 -04:00
d1272e00bb Prefix unused variable for now. 2021-11-02 15:45:56 -04:00
44056c2e75 Less allowy. 2021-11-02 15:32:20 -04:00
569ecd699d Merge #467
467: docs: fix some `cargo doc` warnings r=lulf a=numero-744

There are still 3 warnings (below)

```
 Documenting embassy v0.1.0 (embassy)
warning: unresolved link to `channel`
   --> src/channel/mpsc.rs:241:22
    |
241 |     /// [`channel`]: channel
    |                      ^^^^^^^ no item named `channel` in scope
    |
    = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `Task::spawn`
   --> src/executor/raw/mod.rs:105:12
    |
105 | /// with [`Task::spawn()`], which will fail if it is already spawned.
    |            ^^^^^^^^^^^^^ no item named `Task` in scope

warning: public documentation for `spawn` links to private item `Executor::spawn`
   --> src/executor/raw/mod.rs:156:17
    |
156 |     /// cause [`Executor::spawn()`] to return the error.
    |                 ^^^^^^^^^^^^^^^^^ this item is private
    |
    = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
    = note: this link will resolve properly if you pass `--document-private-items`

warning: `embassy` (lib doc) generated 3 warnings
```

Co-authored-by: Côme ALLART <come.allart@etu.emse.fr>
2021-11-02 19:31:15 +00:00
076c795ebb Even more allowed unused. 2021-11-02 15:28:14 -04:00
6bbf450478 Allow unused macros temporarily until U5 supports DMA. 2021-11-02 15:20:42 -04:00
ee1ea44b60 Add stm32u5 examples to CI run. 2021-11-02 15:11:30 -04:00
eaaaa2460a Formatting, per usual. 2021-11-02 14:53:53 -04:00
3ab1775820 Add STM32U5 example. 2021-11-02 14:43:42 -04:00
11b0a89b6a Merge #466
466: Update versions of critical-section and atomic-polyfill r=lulf a=lulf



Co-authored-by: Ulf Lilleengen <ulf.lilleengen@gmail.com>
2021-11-02 18:10:01 +00:00
205a223af3 Update versions of critical-section and atomic-polyfill 2021-11-02 18:52:03 +01:00
3dd39e3d46 docs: fix some cargo doc warnings 2021-11-02 18:49:01 +01:00
705523d0ea Fix formatting. 2021-11-02 12:13:42 -04:00
29ff0317a3 Update stm32-data. 2021-11-02 12:06:32 -04:00
f12b70535b Adjust for STM32U5. 2021-11-02 12:05:24 -04:00
3dcf899bab Merge #462
462: Add the `embassy_traits::i2c::WriteIter` trait r=Dirbaio a=ithinuel

This trait makes the parallel with `embedded_hal::i2c::WriteIter`.

It allows to fetch bytes to write from an Iterator rather than requiring an allocation for an array.

It is provided as an extra Trait to avoid breaking existing implementations of `embassy_traits::i2c::I2c`.

Co-authored-by: Wilfried Chauveau <wilfried.chauveau@ithinuel.me>
2021-10-30 14:35:26 +00:00
2d475b80d9 Add IntoIterator trait bound on Future trait's parameter
The parameter is also renamed from `U` to `V` to avoid confusion with the
type parameter `U` from the `write_iter` function that follows.
2021-10-29 20:37:00 +01:00
4d75035098 Add the embassy_traits::i2c::WriteIter trait
This trait makes the parallel with `embedded_hal::i2c::WriteIter`.

It allows to fetch bytes to write from an Iterator rather than requiring
an allocation for an array.

It is provided as an extra Trait to avoid breaking existing implementations
of `embassy_traits::i2c::I2c`.
2021-10-29 12:34:49 +01:00
663141b4e4 nrf: add initial nrf5340 support 2021-10-28 03:36:25 +02:00
dfccb84fcb Merge #457
457: nrf91: support running in both S and NS mode. r=Dirbaio a=Dirbaio

- Cargo feature `nrf9160` is now `nrf9160-s` or `nrf9160-ns`
- "fake-PAC" renames everything appropriately so there's no need to spam cfg's everywhere.

With `nrf9160-s`  you can now run code without flashing any weird SPM/bootloader. Tested on nrf9160-dk.

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2021-10-27 22:43:35 +00:00
b636acf115 Merge #459
459: Update stm32-data to main r=Dirbaio a=lulf

I'm getting some issue updating to latest embassy rev, trying to sync it with latest stm32-data to see if that helps.

Co-authored-by: Ulf Lilleengen <ulf.lilleengen@gmail.com>
2021-10-26 19:47:46 +00:00
a420491184 Update stm32-data to main 2021-10-26 21:45:08 +02:00
9393cd4487 Merge #458
458: Enable the DMAMUX clocks. r=Dirbaio a=bobmcwhirter



Co-authored-by: Bob McWhirter <bmcwhirt@redhat.com>
2021-10-26 18:37:54 +00:00
bbff98ed0d Move the use inside the macro call, inside another set of braces in case it percolates up twice. 2021-10-26 14:34:03 -04:00
a72816492a Only attempt to enable the dmamux peri clock if it has an enable bit. 2021-10-26 14:19:03 -04:00
959aecf6ac Enable the DMAMUX clocks. 2021-10-26 14:01:39 -04:00
c995a97f20 nrf91: support running in both S and NS mode. 2021-10-26 17:40:07 +02:00
a6fe031d34 Merge #437
437: Initial support for STM32F767ZI. r=Dirbaio a=matoushybl

This PR adds support for the STM32F767ZI, it adds examples and RCC setup.
It is greatly based on the F4 source code and the f7-hal.

This PR is based on the pending PR in stm32-data: https://github.com/embassy-rs/stm32-data/pull/92

I am looking forward to your feedback on improving it and adding support for more peripherals and devices in the F7 family.

Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2021-10-26 15:37:04 +00:00
0fc92866b0 Add missing examples to Cargo.example.toml 2021-10-26 17:33:28 +02:00
cf47676dac Add stm32f7 to CI 2021-10-26 17:33:28 +02:00
015cad84dd Initial support for STM32F767ZI. 2021-10-26 17:33:28 +02:00