Remove building with NOCRYPTO option
[minix3.git] / minix / drivers / usb / usb_storage / urb_helper.h
blobc9033c93b5e5cb492d8bdc0407a604a7b997f974
1 /*
2 * URB formatting related definitions
3 */
5 #ifndef _URB_HELPER_H_
6 #define _URB_HELPER_H_
8 #include <ddekit/usb.h>
9 #include <ddekit/semaphore.h>
11 /* Possible values for attach_urb_data's buf_type */
12 /* Both may be used for single URB */
13 #define URB_BUF_TYPE_DATA 0 /* attached buffer is data buffer */
14 #define URB_BUF_TYPE_SETUP 1 /* attached buffer is setup structure */
16 /* Possible values for blocking_urb_submit's check_len */
17 /* Use URB_SUBMIT_CHECK_LEN when actual data buffer length returned
18 * by HCD must match expected length, supplied in attach_urb_data */
19 #define URB_SUBMIT_CHECK_LEN 0 /* return error on length mismatch */
20 #define URB_SUBMIT_ALLOW_MISMATCH 1 /* ignore length check */
22 /* Endpoint configuration related */
23 #define URB_INVALID_EP (-1) /* default for unset endpoint */
25 /*---------------------------*
26 * declared types *
27 *---------------------------*/
28 /* URB's endpoint configuration */
29 typedef struct urb_ep_config {
31 ddekit_int32_t ep_num;
32 ddekit_int32_t direction;
33 ddekit_int32_t type;
34 ddekit_int32_t max_packet_size;
35 ddekit_int32_t interval;
37 urb_ep_config;
39 /*---------------------------*
40 * declared functions *
41 *---------------------------*/
42 void init_urb(struct ddekit_usb_urb *, struct ddekit_usb_dev *,
43 urb_ep_config *);
44 void attach_urb_data(struct ddekit_usb_urb *, int, void *, ddekit_uint32_t);
45 int blocking_urb_submit(struct ddekit_usb_urb *, ddekit_sem_t *, int);
47 #endif /* !_URB_HELPER_H_ */