Commit Graph

6289 Commits

Author SHA1 Message Date
2915e858ba Make Driver::disable async and fix comment 2022-04-13 14:55:02 -04:00
7fde3abd5d Remote wakeup bug fixes 2022-04-13 14:55:02 -04:00
3a30b08936 Remove dead code on nrf5340 2022-04-13 14:55:02 -04:00
f5656e3544 Add DeviceStateHandler, DeviceCommand channel, and remote wakeup support 2022-04-13 14:55:02 -04:00
e5a843dc06 net: auto-enable defmt in smoltcp using namespaced features. 2022-04-13 17:46:27 +02:00
0d3758ad6b net: make run() noreturn. 2022-04-13 17:27:20 +02:00
2217de24c0 usb-hid: add embassy docs metadata. 2022-04-13 16:46:24 +02:00
6d0e6d563d Merge #714
714: add more clock options for l4 and l5 r=Dirbaio a=ant32

- added an assert so it panics if pll48div is not 48Mhz
- added MSI as a clock source for PLL
- removed hsi48 option for MCUs mentioned in l4 rcc presentation
- copied some code from l4 to l5, but don't have a way of testing it.

Co-authored-by: Philip A Reimer <antreimer@gmail.com>
2022-04-12 21:42:36 +00:00
5d48153bd7 Merge #694
694: Add select, select3, select4. r=Dirbaio a=Dirbaio

The difference with those from the `futures` crate is they don't return the other partially-run futures, so they can work with `!Unpin` futures which makes them much easier to use.

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-04-12 21:27:13 +00:00
77c2b151c2 Merge #715
715: stm32/dac: Check proper channel r=Dirbaio a=michalsrb

Small fix. Otherwise it panics when trying to use channel 1 if channel 2 does not exist.

Co-authored-by: Michal Srb <michalsrb@gmail.com>
2022-04-12 20:57:36 +00:00
d8dd671522 Merge #699
699: Add ADC support for H7 r=Dirbaio a=matoushybl

Seems to work on H743, ADC1 works fine, but ADC3 has different ADC_COMMON block which stm32-data does't yet support, so measuring VREFINT or TEMP doesn't work. I'd like to discuss how adding support for the different ADC_COMMON could be done.

Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-04-12 20:39:47 +00:00
371f3ef419 Add ADC support for H7 2022-04-12 22:25:00 +02:00
c1914a477d stm32/dac: Check proper channel 2022-04-12 12:49:06 +02:00
ac3986e40e Merge #712
712: Add types for channel dynamic dispatch r=lulf a=lulf

* Add internal DynamicChannel trait implemented by Channel that allows
  polling for internal state in a lock safe manner and does not require
  knowing the channel size.
* Existing usage of Sender and Receiver is preserved and does not use
  dynamic dispatch.
* Add DynamicSender and DynamicReceiver types that references the
  channel using the DynamicChannel trait and does not require the const
  generic channel size parameter.

Having the ability not know the channel size is very convenient when you don't want to change all of your channel using code when tuning the size. With this change, existing usage can be kept, and those willing to pay the price for dynamic dispatch may do so.

Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-04-12 09:55:33 +00:00
8f6fccf012 fix clock in l4 rng example 2022-04-11 21:06:22 -06:00
d90ecbbe40 add more clock options for l4 and l5 2022-04-11 19:11:02 -06:00
cdf30e68eb Erase mutex type as well 2022-04-11 13:33:48 +02:00
bc1dff34c0 Add types for channel dynamic dispatch
* Add internal DynamicChannel trait implemented by Channel that allows
  polling for internal state in a lock safe manner and does not require
  knowing the channel size.
* Existing usage of Sender and Receiver is preserved and does not use
  dynamic dispatch.
* Add DynamicSender and DynamicReceiver types that references the
  channel using the DynamicChannel trait and does not require the const
  generic channel size parameter.
2022-04-11 08:57:15 +02:00
e844893095 Merge #710
710: add stm32l4 hsi48 and usb example r=Dirbaio a=ant32



Co-authored-by: Philip A Reimer <antreimer@gmail.com>
2022-04-09 23:57:18 +00:00
d8860c0b80 add stm32l4 hsi48 and usb example 2022-04-09 14:55:03 -06:00
cd6250986a Merge #708
708: Unify ReadError and WriteError into EndpointError r=Dirbaio a=Dirbaio

Originally #698, got overwritten in a rebase I think.

Co-authored-by: alexmoon <alex.r.moon@gmail.com>
2022-04-09 00:06:44 +00:00
e867364d42 Unify ReadError and WriteError into EndpointError 2022-04-09 01:48:17 +02:00
b2cdaa56c1 Merge #707
707: Add saadc::VddhDiv5Input r=Dirbaio a=alexmoon

Adds support for the VDDHDIV5 ADC input on newer nrf chips.

Co-authored-by: alexmoon <alex.r.moon@gmail.com>
2022-04-08 20:38:45 +00:00
9c6d49961b Add saadc::VddhDiv5Input 2022-04-08 13:41:21 -04:00
e898b4e683 Merge #706
706: Update to latest rust-lorawan version r=Dirbaio a=lulf



Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-04-08 15:38:00 +00:00
86e52e67d0 Update to latest rust-lorawan version 2022-04-08 12:58:57 +02:00
3e45403a2a Merge #705
705: Add stm32wlexx support r=Dirbaio a=Dirbaio

RCC is actually identical, other than removing multicore-related regs.

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-04-08 01:44:22 +00:00
8b757e1aec Add stm32wlexx support 2022-04-08 03:43:58 +02:00
b40c8342ec Merge pull request #704 from embassy-rs/stm32wlwb-more
Add missing stm32wl/stm32wb chips except stm32wle
2022-04-08 03:32:29 +02:00
05fecb3def Merge pull request #703 from embassy-rs/stm32l5
Add STM32L5 support.
2022-04-08 03:25:41 +02:00
0c07d03754 Add missing stm32wl/stm32wb chips except stm32wle 2022-04-08 03:15:27 +02:00
50ff63ab88 Add STM32L5 support. 2022-04-08 03:11:38 +02:00
37da84129d Merge #657
657: Async usb stack r=Dirbaio a=Dirbaio

TODO

- [x] Make it work on nRF
- [x] Add a way for classes to handle their own EP0 control requests - thanks `@alexmoon!`
- [x] Handle CONTROL OUT requests with data.
- [ ] Impl AsyncRead/AsyncWrite for CDC ACM -- will do later, it's not trivial
- [x] Cleanup unwraps/asserts/panics
- [x] Cleanup logs (make everything trace/debug, not info)
- [ ] Port synopsys-usb-otg
- [ ] Port stm32-usbd
- [ ] Add more classes? HID, MSD?


Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
Co-authored-by: alexmoon <alex.r.moon@gmail.com>
2022-04-07 23:03:39 +00:00
9252e8bb88 Update cargo-batch. 2022-04-08 00:35:00 +02:00
637ec36f9c Merge #700
700: Add back support for cloning sender/receiver r=Dirbaio a=lulf

The automatic derive clone does not work because RawMutex is not Clone.

Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-04-07 19:27:36 +00:00
d2494486d1 Merge pull request #701 from alexmoon/async-usb-stack
Async-ify Driver::enable and UsbDeviceBuilder::build
2022-04-07 19:55:00 +02:00
7f9dd1a37b Fix spurious ControlPipe::data_in errors 2022-04-07 10:54:21 -04:00
6abbfa9a92 Async-ify Driver::enable and UsbDeviceBuilder::build 2022-04-07 10:51:26 -04:00
9206584aa9 Add back support for cloning sender/receiver
* Remove level of import indirection for Channel and Signal.
2022-04-07 15:15:44 +02:00
b6f40aca57 Merge #679
679: Reexport unborrow macro in HALs r=Dirbaio a=matoushybl

Removes the need to depend on embassy-hal-common in the case of developing custom peripheral drivers.

Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-04-07 11:41:15 +00:00
eb6910fa86 Reexport unborrow macro in HALs 2022-04-07 12:57:02 +02:00
fee0aef076 Merge #696
696: Add async Mutex. r=Dirbaio a=Dirbaio

What it says on the tin :) 

It allows sharing data between tasks when you want to `.await` stuff while holding it locked.

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-04-06 10:20:43 +00:00
a1754ac8a8 embassy-usb-hid bug fixes 2022-04-06 05:38:11 +02:00
22a47aeeb2 usb: abort control data in/out on reset or when receiving another SETUP.
This removes the horrible timeout hack.
2022-04-06 05:38:11 +02:00
f6d11dfba5 usb: fix slow enumeration with EP0 max_packet_size of 8 or 16. 2022-04-06 05:38:11 +02:00
b2e517bb28 usb/serial: add multitask example. 2022-04-06 05:38:11 +02:00
3dbb7c9e15 usb/hid: add keyboard example. 2022-04-06 05:38:11 +02:00
de9acf5d48 usb/hid: fix infinite loop when N=0 2022-04-06 05:38:11 +02:00
6d514a0b31 usb/hid: update for endpoint state changes. 2022-04-06 05:38:11 +02:00
fa9eadcee9 Add docserver metadata. 2022-04-06 05:38:11 +02:00