Merge pull request #15752 from aabadie/pr/tests/usbus_hid_cleanup
tests/usbus_hid: uncrustify and cleanup Makefile
This commit is contained in:
commit
703c33fd3e
@ -6,7 +6,7 @@ USEMODULE += usbus_hid
|
||||
|
||||
DISABLE_MODULE += auto_init_usbus
|
||||
|
||||
USB_VID ?= ${USB_VID_TESTING}
|
||||
USB_PID ?= ${USB_PID_TESTING}
|
||||
USB_VID ?= $(USB_VID_TESTING)
|
||||
USB_PID ?= $(USB_PID_TESTING)
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
@ -57,6 +57,7 @@ ssize_t usb_hid_io_read(void* buffer, size_t len);
|
||||
void init(void)
|
||||
{
|
||||
usbdev_t *usbdev = usbdev_get_ctx(0);
|
||||
|
||||
usbus_init(&usbus, usbdev);
|
||||
|
||||
usb_hid_io_init(&usbus, report_desc_ctap, sizeof(report_desc_ctap));
|
||||
@ -70,11 +71,14 @@ int main(void)
|
||||
xtimer_sleep(3);
|
||||
init();
|
||||
puts("RIOT USB HID echo test");
|
||||
puts("Write input to the hidraw device under /dev/hidrawX, and see if it gets echoed here");
|
||||
puts(
|
||||
"Write input to the hidraw device under /dev/hidrawX, and see if it gets echoed here");
|
||||
|
||||
uint8_t buffer[CONFIG_USBUS_HID_INTERRUPT_EP_SIZE];
|
||||
|
||||
for (;;) {
|
||||
ssize_t len = usb_hid_io_read(buffer, CONFIG_USBUS_HID_INTERRUPT_EP_SIZE);
|
||||
ssize_t len =
|
||||
usb_hid_io_read(buffer, CONFIG_USBUS_HID_INTERRUPT_EP_SIZE);
|
||||
|
||||
printf("Msg received via USB HID: ");
|
||||
for (int i = 0; i < len; i++) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user