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