Add a structure to represent a USB device and wrappers to avoid glue UHC calls when operating on devices. Although there is a long road to device configuration and management, we can start with the tools that can also be used for USB device support testing. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
20 lines
351 B
C
20 lines
351 B
C
/*
|
|
* Copyright (c) 2023 Nordic Semiconductor ASA
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <zephyr/usb/usbh.h>
|
|
#include "usbh_device.h"
|
|
|
|
#define USBH_USB_DEVICE_COUNT 1
|
|
|
|
static struct usb_device udevs[USBH_USB_DEVICE_COUNT];
|
|
|
|
struct usb_device *usbh_device_get_any(struct usbh_contex *const ctx)
|
|
{
|
|
udevs->ctx = ctx;
|
|
|
|
return udevs;
|
|
}
|