diff --git a/examples/usbus_minimal/Makefile b/examples/usbus_minimal/Makefile index 8a9d7223c5..662a8e7caa 100644 --- a/examples/usbus_minimal/Makefile +++ b/examples/usbus_minimal/Makefile @@ -13,6 +13,7 @@ RIOTBASE ?= $(CURDIR)/../.. DEVELHELP ?= 1 USEMODULE += usbus +USEMODULE += auto_init_usbus # USB device vendor and product ID USB_VID ?= 1209 diff --git a/examples/usbus_minimal/main.c b/examples/usbus_minimal/main.c index 995f707890..3af5fbe38e 100644 --- a/examples/usbus_minimal/main.c +++ b/examples/usbus_minimal/main.c @@ -19,26 +19,11 @@ */ #include -#include "usb/usbus.h" - -static char _stack[USBUS_STACKSIZE]; - -static usbus_t usbus; -/* TODO: remove as soon as we have decent auto_init */ -#include "periph_conf.h" -#include "sam_usb.h" int main(void) { puts("RIOT USB stack example application"); - /* TODO: remove as soon as we have decent auto_init */ - usbdev_t *usbdev_ctx = usbdev_get_ctx(0); - /* start usb stack */ - usbus_init(&usbus, usbdev_ctx); - usbus_create(_stack, sizeof(_stack), USBUS_PRIO, USBUS_TNAME, &usbus); - - /* start shell */ puts("Started USB stack!"); return 0; }