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:
parent
ef68827559
commit
8246b09f10
@ -13,6 +13,7 @@ RIOTBASE ?= $(CURDIR)/../..
|
||||
DEVELHELP ?= 1
|
||||
|
||||
USEMODULE += usbus
|
||||
USEMODULE += auto_init_usbus
|
||||
|
||||
# USB device vendor and product ID
|
||||
USB_VID ?= 1209
|
||||
|
@ -19,26 +19,11 @@
|
||||
*/
|
||||
|
||||
#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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user