Commit graph

2489 commits

Author SHA1 Message Date
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
0b2f43c391 net: add split() to tcpsocket 2022-05-19 06:14:05 +02:00
bors[bot]
240bef8c9f
Merge #778
778: Update embedded-io to 0.3 r=Dirbaio a=Dirbaio

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-05-18 22:36:49 +00:00
Dario Nieuwenhuis
47ceee47d5 Update embedded-io to 0.3 2022-05-19 00:36:18 +02:00
bors[bot]
261043fc73
Merge #777
777: usb-ncm: remove useless Cell. r=Dirbaio a=Dirbaio

This allows the CDC-NCM class struct to be Send, so you can run
it at a different priority than the main USB stack task.

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-05-18 19:54:38 +00:00
Dario Nieuwenhuis
5eca119312 usb-ncm: remove useless Cell.
This allows the CDC-NCM class struct to be Send, so you can run
it at a different priority than the main USB stack task.
2022-05-18 21:54:13 +02:00
bors[bot]
3d1501c020
Merge #772
772: nrf/buffered_uarte: fix out of bounds on read. r=Dirbaio a=Dirbaio

🙈 

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-05-14 00:21:27 +00:00
Dario Nieuwenhuis
833b3a370a nrf/buffered_uarte: fix out of bounds on read. 2022-05-14 02:20:40 +02:00
bors[bot]
13bcb5ffb6
Merge #768
768: nrf/usb: fix control out transfers getting corrupted due to ep0rcvout sticking from earlier. r=Dirbaio a=Dirbaio

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-05-12 16:46:35 +00:00
Dario Nieuwenhuis
0764fad587 nrf/usb: fix control out transfers getting corrupted due to ep0rcvout sticking from earlier. 2022-05-12 18:45:10 +02:00
Dario Nieuwenhuis
5fd55f9529 usb: parse request in embassy-usb instead of the driver. 2022-05-12 18:14:48 +02:00
bors[bot]
45c0f1ab88
Merge #756
756: Add async quadrature decoder for embassy-nrf r=Dirbaio a=kalkyl

Thsi PR adds an async interface to the QDEC peripheral to embassy-nrf, that can be used for rotary encoders for example.

Co-authored-by: Henrik Alsér <henrik@mindbite.se>
Co-authored-by: Henrik Alsér <henrik.alser@me.com>
Co-authored-by: Henrik Alsér <henrik.alser@me.com>
2022-05-12 13:40:08 +00:00
Henrik Alsér
93cbd079ec Remove OnDrop handler, start sampling in new 2022-05-12 15:35:32 +02:00
Henrik Alsér
0be9184efc
Merge branch 'embassy-rs:master' into qdec 2022-05-12 15:24:46 +02:00
bors[bot]
30d4d0e9d7
Merge #763 #766
763: Misc USB improvements r=Dirbaio a=Dirbaio

The "simplify control in/out handlng" commit gives a -2kb code size improvement.

766: Make usb_serial examples work on windows r=Dirbaio a=timokroeger

Windows shows `error 10` when using CDC ACM on non composite devices.
Workaround is to use IADS:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
Co-authored-by: Timo Kröger <timo.kroeger@hitachienergy.com>
2022-05-12 13:04:29 +00:00
bors[bot]
3f9fdc0dd3
Merge #767
767: Stm32 fixes r=lulf a=jr-oss

Using embassy on STM32 Discovery board showed problems with
- USART with parity
- Clock settings (CFGR) when using PLL and prescaler
- Flash ACR settings

This PR attempts to fix these


Co-authored-by: Ralf <jr-oss@gmx.net>
2022-05-12 07:15:53 +00:00
Ralf
c90968bb70 stm32/rcc: Modify only relevant CFGR bits and keep the settings previously done.
PLL settings remained intact because these bits are not writable when PLL is enabled,
but prescaler settings were overwritten by selecting PLL as sysclk (CFGR.SW[1:0]).
2022-05-12 09:09:39 +02:00
Ralf
1a216958ac stm32/rcc: Set flash prefetch buffer and half cycle access according to AHB clock prescaler 2022-05-12 09:09:39 +02:00
Ralf
f4677469f9 stm32/usart: Data length is including parity. To get e.g. 8E1 you need to choose 9 data bits 2022-05-12 09:09:30 +02:00
Timo Kröger
2a7afe4262 Make usb_serial examples work on windows
Windows shows `error 10` when using CDC ACM on non composite devices.
Workaround is to use IADS:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
2022-05-12 08:05:13 +02:00
bors[bot]
6040517774
Merge #765
765: Implement Output::is_set_low for embassy-rp r=Dirbaio a=danbev

This commit implements a suggestion for the method `is_set_low` which is
currently a `todo`, by reading last value written to `GPIO_OUT`.

Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2022-05-11 16:58:18 +00:00
Daniel Bevenius
0bb428dcc0 squash! Implement Output::is_set_low for embassy-rp
Add check for the bit of the current pin.
2022-05-11 18:33:13 +02:00
Daniel Bevenius
6d4a49bca8 Implement Output::is_set_low for embassy-rp
This commit implements a suggestion for the method is_set_low which is
currently a 'todo', by reading last value written to GPIO_OUT.
2022-05-11 16:23:31 +02:00
Dario Nieuwenhuis
6af5f8eb2d usb: merge alloc_control_pipe and into_bus into start.
This prevents calling `alloc_control_pipe` twice at compile time, which was
always an error.
2022-05-10 17:30:07 +02:00
bors[bot]
69e0f9f0fe
Merge #764
764: Update re-export comment in embassy-rp/Cargo.toml r=Dirbaio a=danbev



Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2022-05-09 15:35:55 +00:00
Daniel Bevenius
1b2a10007b Update re-export comment in embassy-rp/Cargo.toml 2022-05-09 16:56:28 +02:00
Dario Nieuwenhuis
02ae1138e1 usb: merge Control logic into main code.
Now that control stuff is called from just one place, there's
no need to keep it as a separate struct.
2022-05-09 03:43:24 +02:00
Dario Nieuwenhuis
7ed462a657 usb: simplify control in/out handlng, calling response from a single place. 2022-05-09 02:11:02 +02:00
Dario Nieuwenhuis
2e104170de usb: remove address arg from endpoint allocation. 2022-05-09 02:07:48 +02:00
bors[bot]
b7a27113f0
Merge #762
762: Allow maximal clock for F7 HCLK r=Dirbaio a=matoushybl

Fixes a type in clock calculations, see: aaf2034cab/src/rcc.rs (L347)

Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-05-08 21:12:04 +00:00
Matous Hybl
01fb447e9d Allow maximal clock for F7 HCLK 2022-05-08 23:07:28 +02:00
bors[bot]
e9ab960ebf
Merge #760
760: stm32/gpio: Add support for `set_speed` for gpio v1 r=Dirbaio a=GrantM11235



Co-authored-by: Grant Miller <GrantM11235@gmail.com>
2022-05-08 19:53:31 +00:00
Grant Miller
acc1761637 Remove unnecessary cfg 2022-05-08 14:50:15 -05:00
Grant Miller
b230ac9c1a stm32/gpio: Add support for set_speed for gpio v1 2022-05-08 14:43:37 -05:00
bors[bot]
109364ecff
Merge #759
759: stm32: Fix stm32f107 build. r=Dirbaio a=Dirbaio

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-05-08 19:38:26 +00:00
Dario Nieuwenhuis
96d0eb9476 stm32: Fix stm32f107 build. 2022-05-08 21:37:37 +02:00
Henrik Alsér
1ca5475010
Merge branch 'embassy-rs:master' into qdec 2022-05-07 09:47:29 +02:00
bors[bot]
a4bf190f2f
Merge #752
752: Replace embassy::io with embedded_io. r=Dirbaio a=Dirbaio

TODO:

- [x] Release embedded-io on crates.io
- [x] Remove git dep

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-05-06 23:54:07 +00:00
Dario Nieuwenhuis
931a137f8c Replace embassy::io with embedded_io. 2022-05-07 01:45:54 +02:00
Henrik Alsér
108a981360 Change example pins 2022-05-07 01:15:01 +02:00
Henrik Alsér
840bb2952e Add qdec module 2022-05-07 00:46:36 +02:00
bors[bot]
7e774ff830
Merge #755
755: Add support for flash and bootloader for F3, F7 and H7 r=matoushybl a=matoushybl



Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-05-06 20:18:26 +00:00
Matous Hybl
8a80ae5685 Update list of families with bootloader support 2022-05-06 21:57:15 +02:00
Matous Hybl
118532278c Add H7 flash and bootloader support 2022-05-06 21:57:15 +02:00
Matous Hybl
6d56f772e1 Add F7 flash and bootloader support 2022-05-06 21:57:15 +02:00
Matous Hybl
f3700b4e42 Refactor flash handling to different modules for different families 2022-05-06 21:57:15 +02:00
Matous Hybl
4f5088d79d Add support for F3 flash 2022-05-06 21:57:15 +02:00
bors[bot]
f7af9a549f
Merge #751
751: Use explicit return statement TaskStorage::spawn r=Dirbaio a=danbev

This commit removes the else branch in `TaskStorage::spawn`, and returns
explicitly from the if statement's branch, similar to what
[TaskPool::spawn](85c0525e01/embassy/src/executor/raw/mod.rs (L235-L243)) does.

Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2022-05-04 15:56:30 +00:00
Daniel Bevenius
0ce29ca84c fixup! Use explicit return statement TaskStorage::spawn 2022-05-04 16:31:52 +02:00
Daniel Bevenius
34493c7ed6 Use explicit return statement TaskStorage::spawn
This commit removes the else branch in TaskStorage::spawn, and returns
explicitly from the if statement's branch, similar to what
TaskPool::spawn does.
2022-05-04 16:11:55 +02:00