blob: 33a4311e69259961f49933609f6b19049eb8d242 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#ifndef __USB_GADGET_H__
#define __USB_GADGET_H__
#ifdef __cplusplus
extern "C" {
#endif
enum {
USB_GADGET_MANUFACTURER_IDX = 0,
USB_GADGET_PRODUCT_IDX,
USB_GADGET_SERIAL_IDX,
USB_GADGET_LANGUAGE_IDX,
USB_GADGET_CONFIG_IDX,
USB_GADGET_INTERFACE_IDX,
USB_GADGET_MAX_IDX,
};
int usb_gadget_function_enable(const char *name);
#ifndef CONFIG_KERNEL_FREERTOS
int usb_gadget_function_disable(const char *name);
#else
int usb_gadget_function_disable(void);
#endif
int usb_gadget_function_read(int ep_idx, char *buf, int size);
int usb_gadget_function_write(int ep_idx, char *buf, int size);
int usb_gadget_function_string_set(char *name, char *str, unsigned int idx);
#ifdef __cplusplus
}
#endif
#endif /* __USB_GADGET_H__ */
|