Commit Graph

2873 Commits

Author SHA1 Message Date
Ulf Lilleengen
cdf30e68eb Erase mutex type as well 2022-04-11 13:33:48 +02:00
Ulf Lilleengen
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
bors[bot]
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
Philip A Reimer
d8860c0b80 add stm32l4 hsi48 and usb example 2022-04-09 14:55:03 -06:00
bors[bot]
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
alexmoon
e867364d42 Unify ReadError and WriteError into EndpointError 2022-04-09 01:48:17 +02:00
bors[bot]
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
alexmoon
9c6d49961b Add saadc::VddhDiv5Input 2022-04-08 13:41:21 -04:00
bors[bot]
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
Ulf Lilleengen
86e52e67d0 Update to latest rust-lorawan version 2022-04-08 12:58:57 +02:00
bors[bot]
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
Dario Nieuwenhuis
8b757e1aec Add stm32wlexx support 2022-04-08 03:43:58 +02:00
Dario Nieuwenhuis
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
Dario Nieuwenhuis
05fecb3def
Merge pull request #703 from embassy-rs/stm32l5
Add STM32L5 support.
2022-04-08 03:25:41 +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
bors[bot]
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
Dario Nieuwenhuis
9252e8bb88 Update cargo-batch. 2022-04-08 00:35:00 +02:00
bors[bot]
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
Dario Nieuwenhuis
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
alexmoon
7f9dd1a37b Fix spurious ControlPipe::data_in errors 2022-04-07 10:54:21 -04:00
alexmoon
6abbfa9a92 Async-ify Driver::enable and UsbDeviceBuilder::build 2022-04-07 10:51:26 -04:00
Ulf Lilleengen
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
bors[bot]
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
Matous Hybl
eb6910fa86 Reexport unborrow macro in HALs 2022-04-07 12:57:02 +02:00
bors[bot]
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
alexmoon
a1754ac8a8 embassy-usb-hid bug fixes 2022-04-06 05:38:11 +02:00
Dario Nieuwenhuis
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
Dario Nieuwenhuis
f6d11dfba5 usb: fix slow enumeration with EP0 max_packet_size of 8 or 16. 2022-04-06 05:38:11 +02:00
Dario Nieuwenhuis
b2e517bb28 usb/serial: add multitask example. 2022-04-06 05:38:11 +02:00
Dario Nieuwenhuis
3dbb7c9e15 usb/hid: add keyboard example. 2022-04-06 05:38:11 +02:00
Dario Nieuwenhuis
de9acf5d48 usb/hid: fix infinite loop when N=0 2022-04-06 05:38:11 +02:00
Dario Nieuwenhuis
6d514a0b31 usb/hid: update for endpoint state changes. 2022-04-06 05:38:11 +02:00
Dario Nieuwenhuis
fa9eadcee9 Add docserver metadata. 2022-04-06 05:38:11 +02:00
alexmoon
2ce435dc34 Add basic device state handling for endpoints. 2022-04-06 05:38:11 +02:00
alexmoon
99f95a33c3 Simplify hid output report handling 2022-04-06 05:38:11 +02:00
alexmoon
c8ad82057d Reduce memory overhead and simplify logic for merging endpoint and control request output reports. 2022-04-06 05:38:11 +02:00
alexmoon
c309531874 Remove output() and split() methods from HidClass when there is no out endpoint, and route set_report requests for output reports to RequestHandler::set_report in that case. 2022-04-06 05:38:11 +02:00
alexmoon
daf2379fa4 Make the interupt IN endpoint non-optional 2022-04-06 05:38:11 +02:00
alexmoon
a51de5a39a Remove the feature report reader 2022-04-06 05:38:11 +02:00
alexmoon
cf89c85569 Log when reports are dropped without being read. 2022-04-06 05:38:11 +02:00
alexmoon
5ee7a85b33 Async USB HID class 2022-04-06 05:38:11 +02:00
Dario Nieuwenhuis
8fe3b44d82 usb: log on reset, resume, suspend 2022-04-06 05:38:11 +02:00
Dario Nieuwenhuis
522a87ae42 usb: centralize all control logging in control.rs 2022-04-06 05:38:11 +02:00
Dario Nieuwenhuis
d7d199f2ac nrf/usb: unify in/out wakers for ep0 2022-04-06 05:38:11 +02:00
alexmoon
f5ba022257 Refactor ControlPipe to use the typestate pattern for safety 2022-04-06 05:38:11 +02:00
alexmoon
77e0aca03b Move data chunking from the driver to the lib 2022-04-06 05:38:11 +02:00
Dario Nieuwenhuis
1672fdc666 usb-serial: make inner guts private. 2022-04-06 05:38:11 +02:00
Dario Nieuwenhuis
cdb7bae51a examples/nrf: don't build usb stuff in stable. 2022-04-06 05:38:11 +02:00
Dario Nieuwenhuis
a435d78cf7 usb: cleanup and simplify error handling. 2022-04-06 05:38:11 +02:00