From 8246b09f107feb07a3594c7efa6ae2c4540d1df4 Mon Sep 17 00:00:00 2001 From: Koen Zandberg Date: Mon, 11 Feb 2019 13:46:02 +0100 Subject: [PATCH] usbus_minimal: Adapt example to auto_init --- examples/usbus_minimal/Makefile | 1 + examples/usbus_minimal/main.c | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) 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; }