-
Notifications
You must be signed in to change notification settings - Fork 2.1k
usbus: Initial simple auto init structure #11075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it still needed ?
1a43f4e
to
6ef452a
Compare
Rebased (I think) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.c
code.Issues/PRs references
Depends on #10916