Commit Graph

2847 Commits

Author SHA1 Message Date
Mathias
d52c7ded49 Implement remaining logic for blocking UART. async is still todo, awaiting DMA 2022-08-18 10:23:29 +02:00
bors[bot]
16d0ae7678
Merge #907
907: Several macro cleanups r=Dirbaio a=Dirbaio



Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-08-17 13:18:58 +00:00
Dario Nieuwenhuis
bd0aaec624 macros: remove embassy_prefix attr.
This was used in the past for reexporting the macros from drogue-device,
which is no longer using it.

Also, it is a pain to support, so we don't want it.
2022-08-17 15:04:59 +02:00
Dario Nieuwenhuis
ef9e373ec4 macros/interrupt_take: do not assume embassy-executor is a dependency of the user crate. 2022-08-17 15:03:23 +02:00
Dario Nieuwenhuis
2649f13dc7 stm32/rcc: fix unnecessary parentheses 2022-08-17 15:03:23 +02:00
Dario Nieuwenhuis
72cd015c1a stm32/sdmmc: remove cast no longer allowed on latest nightly due to nonexhaustive enum. 2022-08-17 14:44:18 +02:00
Dario Nieuwenhuis
13b1ca1eb6 Update nightly. 2022-08-17 13:44:24 +02:00
bors[bot]
6ea8d5f890
Merge #905
905: Rewrite documentation using correct module names r=Dirbaio a=lulf

* Remove traits section now that we have embedded-hal-async and refer to
  it.
* Explanation that embassy is multiple things.
* Bootloader description image

Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-08-16 11:41:35 +00:00
Ulf Lilleengen
d769e562c0 Rewrite documentation using correct module names
* Remove traits section now that we have embedded-hal-async and refer to
  it.
* Explanation that embassy is multiple things.
* Bootloader description image
2022-08-16 11:27:57 +02:00
Dario Nieuwenhuis
68931a36d5 More docserver metadata fix. 2022-08-15 20:42:36 +02:00
Dario Nieuwenhuis
dff6847e9c Add -boot docserver metadata. 2022-08-15 20:41:00 +02:00
Dario Nieuwenhuis
eb811a71ac
Merge pull request #904 from lulf/use-root-component-docs
Use special ROOT component for embassy docs
2022-08-15 19:38:41 +02:00
Ulf Lilleengen
b4ab39c6fa Use special ROOT component for embassy docs 2022-08-15 19:37:48 +02:00
bors[bot]
5790985f9f
Merge #903
903: Update signal.rs r=Dirbaio a=bobmcwhirter

Allow `poll_wait` to be public so higher-order futures around Signal can be built.

Co-authored-by: Bob McWhirter <bmcwhirt@redhat.com>
2022-08-15 15:47:11 +00:00
Bob McWhirter
b273128990 Add documentation to Signal::poll_wait(..). 2022-08-15 11:20:35 -04:00
Bob McWhirter
17b9eb5f86
Update signal.rs
Allow `poll_wait` to be public so higher-order futures around Signal can be built.
2022-08-15 11:07:46 -04:00
Dario Nieuwenhuis
f53367d8ba embassy-docs fixes. 2022-08-15 15:42:48 +02:00
bors[bot]
6ffca81a38
Merge #880
880: Add UDP socket support r=Dirbaio a=arturkow2000



Co-authored-by: Artur Kowalski <artur.kowalski@3mdeb.com>
Co-authored-by: Artur Kowalski <arturkow2000@gmail.com>
2022-08-11 14:17:11 +00:00
Artur Kowalski
ef473827a2 Remove UdpIo struct
UdpIo was shared by split sender/receives halves. Since split() API is
no more UdpIo is not needed and its APIs may be moved into UdpSocket.
2022-08-11 15:52:32 +02:00
bors[bot]
6cae87ee5d
Merge #900
900: net: make TcpIo private. r=Dirbaio a=Dirbaio

It's just an implementation detail to share code between Socket, Reader, Writer. It wasn't supposed to be public.

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-08-11 11:58:45 +00:00
Dario Nieuwenhuis
0a98f9f48e
net: make TcpIo private.
It's just an implementation detail to share code between Socket, Reader, Writer. It wasn't supposed to be public.
2022-08-11 13:58:13 +02:00
Artur Kowalski
b97983242d Simplify UDP code
Drop unneeded APIs: remove impls of embedded_io error traits, remove
flush() and split() methods.
2022-08-11 08:23:18 +02:00
Artur Kowalski
865a91976c Add UDP example app 2022-08-10 20:13:10 +02:00
Artur Kowalski
d5ab0d3ebb Add UDP socket support 2022-08-10 19:40:35 +02:00
bors[bot]
0e524247fa
Merge #896
896: Implement I2C pullup configuration r=lulf a=chemicstry

I wasn't sure if I should put frequency into config struct, so left it separate as in SPI periph.

Also added Copy derives to gpio types, not sure why they weren't?

Co-authored-by: chemicstry <chemicstry@gmail.com>
2022-08-10 10:08:27 +00:00
chemicstry
936473b68a Make sda/scl pullups separate as in nRF HAL 2022-08-10 12:36:15 +03:00
bors[bot]
de22cb9065
Merge #895
895: Implement embedded-nal-async traits for embassy-net r=lulf a=lulf



Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-08-10 08:01:59 +00:00
chemicstry
6498324b58 Implement I2C pullup configuration 2022-08-09 22:13:35 +03:00
Ulf Lilleengen
87401c49b7 Fix formatting 2022-08-09 14:51:32 +02:00
Ulf Lilleengen
2e76b13a4c Add example using embedded-nal-async traits 2022-08-09 14:44:18 +02:00
Ulf Lilleengen
80c1551153 Wrap buffers in a single state type 2022-08-09 14:43:55 +02:00
Ulf Lilleengen
18671b94ba Implement embedded-nal-async traits for embassy-net 2022-08-08 16:51:34 +02:00
bors[bot]
b7b4c84067
Merge #892
892: Merge v1, v2 DAC and update register definitions r=Dirbaio a=chemicstry

This merges v1 (unimplemented) and v2 DAC implementations, because they share most of the code except for some exotic stuff, which is not yet implemented for neither of the versions. This should allow using DAC on all chips that have v1 peripheral.

~Currently blocked on https://github.com/embassy-rs/stm32-data/pull/153~



Co-authored-by: chemicstry <chemicstry@gmail.com>
2022-08-08 11:37:41 +00:00
bors[bot]
b400e6aa75
Merge #894
894: rp: GPIO fixes r=Dirbaio a=Dirbaio



Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-08-08 10:49:51 +00:00
chemicstry
ed74bcb8d8 Update stm32-data 2022-08-08 13:14:13 +03:00
Dario Nieuwenhuis
6c10fa44d0 rp/gpio: fix wait_for_* when multiple pins are in use. 2022-08-08 00:22:08 +02:00
Dario Nieuwenhuis
89e2e25d6f rp/gpio: remove unused lifetimes. 2022-08-07 23:25:50 +02:00
bors[bot]
ba67f6d3a8
Merge #891
891: Async Pipe r=Dirbaio a=Dirbaio



Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-08-04 21:40:44 +00:00
Dario Nieuwenhuis
99a97ec6c9 util/pipe: add some capacity/len getters. 2022-08-04 23:18:56 +02:00
Dario Nieuwenhuis
ac1a26b40f util/pipe: add embedded-io impls for Pipe, Reader, Writer. 2022-08-04 23:18:45 +02:00
chemicstry
8a25906eff Add DACv1 example for F4 2022-08-04 03:31:59 +03:00
chemicstry
206b7fd8ed Use RccPeripheral for DAC and add a hackfix for H7 2022-08-04 03:31:47 +03:00
chemicstry
d990740dd5 Restore F1 example chip 2022-08-04 03:07:42 +03:00
chemicstry
5f01e56728 Merge v1, v2 DAC and update register definitions 2022-08-04 03:02:57 +03:00
Dario Nieuwenhuis
3967c4194b util: add pipe 2022-08-03 13:55:46 +02:00
bors[bot]
1924f2d67d
Merge #890
890: Implement UsbSupply for a reference of SignalledSupply r=Dirbaio a=matoushybl



Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-08-02 20:29:29 +00:00
Matous Hybl
e4cfbf96ac Implement UsbSupply for a reference of SignalledSupply 2022-08-02 22:09:02 +02:00
bors[bot]
a903215423
Merge #888
888: Extend QSPI config with freq, delay, spi mode, and address mode r=Dirbaio a=TilBlechschmidt

Fixes #886 among some of the TODOs which have been flying around in the source file :)

I'll make one more commit to remove some old commented out code from the file and take some time this evening to verify that it works.

Co-authored-by: Til Blechschmidt <til@blechschmidt.de>
2022-08-01 15:40:05 +00:00
bors[bot]
2b0786129a
Merge #887
887: executor: miri fixes r=Dirbaio a=Dirbaio

Fixes a few MIRI errors due to loosely mixing `&TaskStorage<F>` and `&TaskHeader`. References "downgrade" the provenance. `TaskHeader` is smaller, so once you have a `&TaskHeader` you can't use pointer casts to access the whole `TaskStorage<F>`. This fixes it by always keeping the raw pointer around, which doesn't downgrade provenance.

The error was: 

```
[dirbaio@mars std]$ MIRIFLAGS=-Zmiri-disable-isolation cargo miri run --bin tick
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
     Running `/home/dirbaio/.rustup/toolchains/nightly-2022-07-13-x86_64-unknown-linux-gnu/bin/cargo-miri target/miri/x86_64-unknown-linux-gnu/debug/tick`
error: Undefined Behavior: trying to reborrow <12349> for SharedReadWrite permission at alloc2[0x30], but that tag does not exist in the borrow stack for this location
   --> /home/dirbaio/embassy/embassy/embassy-executor/src/executor/raw/mod.rs:162:20
    |
162 |         let this = &*(p.as_ptr() as *const TaskStorage<F>);
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                    |
    |                    trying to reborrow <12349> for SharedReadWrite permission at alloc2[0x30], but that tag does not exist in the borrow stack for this location
    |                    this error occurs as part of a reborrow at alloc2[0x30..0x40]
    |
    = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
    = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
help: <12349> was created by a retag at offsets [0x0..0x30]
   --> src/bin/tick.rs:15:1
    |
15  | #[embassy_executor::main]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: backtrace:
    = note: inside `embassy_executor::executor::raw::TaskStorage::<std::future::from_generator::GenFuture<[static generator@src/bin/tick.rs:15:1: 15:26]>>::poll` at /home/dirbaio/embassy/embassy/embassy-executor/src/executor/raw/mod.rs:162:20
    = note: inside closure at /home/dirbaio/embassy/embassy/embassy-executor/src/executor/raw/mod.rs:390:13
    = note: inside `embassy_executor::executor::raw::run_queue::RunQueue::dequeue_all::<[closure@embassy_executor::executor::raw::Executor::poll::{closure#1}]>` at /home/dirbaio/embassy/embassy/embassy-executor/src/executor/raw/run_queue.rs:69:13
    = note: inside `embassy_executor::executor::raw::Executor::poll` at /home/dirbaio/embassy/embassy/embassy-executor/src/executor/raw/mod.rs:373:9
    = note: inside `embassy_executor::executor::Executor::run::<[closure@src/bin/tick.rs:15:1: 15:26]>` at /home/dirbaio/embassy/embassy/embassy-executor/src/executor/arch/std.rs:52:22
```

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-08-01 12:33:58 +00:00
Til Blechschmidt
43b8c0c71e
Remove commented out logging code 2022-08-01 12:57:00 +02:00