usbus: Initial simple auto init structure#11075
Conversation
|
With the move to usbdev devices as part of periph, I have to think a bit on how to rework the device setup itself. suggestions are welcome of course (@dylad @kaspar030). One option is to move the |
I can try to come up with something tomorrow, see if it works out the way I'd like |
95c6564 to
e2b6cdf
Compare
|
rebased |
|
Reworked this to use The usb stack initialization only has to call |
cpu/sam0_common/Makefile.dep
Outdated
| @@ -0,0 +1,3 @@ | |||
| ifneq (,$(filter periph_usbdev,$(USEMODULE))) | |||
| FEATURES_REQUIRED += periph_gpio_irq | |||
1a43f4e to
6ef452a
Compare
|
Rebased (I think) |
dylad
left a comment
There was a problem hiding this comment.
Looks good, I'll test it on hardware
sys/auto_init/usb/auto_init_usb.c
Outdated
| #include "usb/usbus.h" | ||
|
|
||
| #define ENABLE_DEBUG (0) | ||
| #include "debug.h" |
dylad
left a comment
There was a problem hiding this comment.
Works fine.
ACK !
Please squash
1558fca to
8246b09
Compare
|
Squashed! |
|
Here we go |
|
Thanks again! |
Contribution description
This code provides a simple auto_init structure for USB peripherals and USBUS provided functions. The auto_init as contributed is designed as a simple solution for the common case. It is intentionally not designed to solve all use cases.
Testing procedure
The example should now provide a USB device without any usb specific handling in the
main.ccode.Issues/PRs references
Depends on #10916