1f9f848faSopenharmony_ci/* 2f9f848faSopenharmony_ci * This file is produced automatically. 3f9f848faSopenharmony_ci * Do not modify anything in here by hand. 4f9f848faSopenharmony_ci * 5f9f848faSopenharmony_ci * Created from source file 6f9f848faSopenharmony_ci * usb_if.m 7f9f848faSopenharmony_ci * with 8f9f848faSopenharmony_ci * makeobjops.awk 9f9f848faSopenharmony_ci * 10f9f848faSopenharmony_ci * See the source file for legal information 11f9f848faSopenharmony_ci */ 12f9f848faSopenharmony_ci 13f9f848faSopenharmony_ci 14f9f848faSopenharmony_ci#ifndef _usb_if_h_ 15f9f848faSopenharmony_ci#define _usb_if_h_ 16f9f848faSopenharmony_ci 17f9f848faSopenharmony_ci/** @brief Unique descriptor for the USB_HANDLE_REQUEST() method */ 18f9f848faSopenharmony_ciextern struct kobjop_desc usb_handle_request_desc; 19f9f848faSopenharmony_ci/** @brief A function implementing the USB_HANDLE_REQUEST() method */ 20f9f848faSopenharmony_citypedef int usb_handle_request_t(device_t dev, const void *req, 21f9f848faSopenharmony_ci /* pointer to the device request */ void **pptr, /* data pointer */ uint16_t *plen, /* maximum transfer length */ uint16_t offset, /* data offset */ uint8_t *pstate); 22f9f848faSopenharmony_ci 23f9f848faSopenharmony_cistatic __inline int USB_HANDLE_REQUEST(device_t dev, const void *req, 24f9f848faSopenharmony_ci /* pointer to the device request */ void **pptr, /* data pointer */ uint16_t *plen, /* maximum transfer length */ uint16_t offset, /* data offset */ uint8_t *pstate) 25f9f848faSopenharmony_ci{ 26f9f848faSopenharmony_ci kobjop_t _m; 27f9f848faSopenharmony_ci KOBJOPLOOKUP(((kobj_t)dev)->ops,usb_handle_request); 28f9f848faSopenharmony_ci return ((usb_handle_request_t *) _m)(dev, req, pptr, plen, offset, pstate); 29f9f848faSopenharmony_ci} 30f9f848faSopenharmony_ci 31f9f848faSopenharmony_ci/** @brief Unique descriptor for the USB_TAKE_CONTROLLER() method */ 32f9f848faSopenharmony_ciextern struct kobjop_desc usb_take_controller_desc; 33f9f848faSopenharmony_ci/** @brief A function implementing the USB_TAKE_CONTROLLER() method */ 34f9f848faSopenharmony_citypedef int usb_take_controller_t(device_t dev); 35f9f848faSopenharmony_ci 36f9f848faSopenharmony_cistatic __inline int USB_TAKE_CONTROLLER(device_t dev) 37f9f848faSopenharmony_ci{ 38f9f848faSopenharmony_ci kobjop_t _m; 39f9f848faSopenharmony_ci KOBJOPLOOKUP(((kobj_t)dev)->ops,usb_take_controller); 40f9f848faSopenharmony_ci return ((usb_take_controller_t *) _m)(dev); 41f9f848faSopenharmony_ci} 42f9f848faSopenharmony_ci 43f9f848faSopenharmony_ci#endif /* _usb_if_h_ */ 44