1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

usbus_minimal: Adapt example to auto_init

This commit is contained in:
Koen Zandberg 2019-02-11 13:46:02 +01:00
parent ef68827559
commit 8246b09f10
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B
2 changed files with 1 additions and 15 deletions

View File

@ -13,6 +13,7 @@ RIOTBASE ?= $(CURDIR)/../..
DEVELHELP ?= 1 DEVELHELP ?= 1
USEMODULE += usbus USEMODULE += usbus
USEMODULE += auto_init_usbus
# USB device vendor and product ID # USB device vendor and product ID
USB_VID ?= 1209 USB_VID ?= 1209

View File

@ -19,26 +19,11 @@
*/ */
#include <stdio.h> #include <stdio.h>
#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) int main(void)
{ {
puts("RIOT USB stack example application"); 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!"); puts("Started USB stack!");
return 0; return 0;
} }