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