usb_dev.h (189906) | usb_dev.h (190181) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/usb_dev.h 189906 2009-03-17 01:46:40Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb/usb_dev.h 190181 2009-03-20 21:50:54Z thompsa $ */ |
2/*- 3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 120 unchanged lines hidden (view full) --- 130 struct usb2_xfer *xfer[2]; 131 struct usb2_xfer **fs_xfer; 132 struct mtx *priv_mtx; /* client data */ 133 /* set if FIFO is opened by a FILE: */ 134 struct usb2_cdev_privdata *curr_cpd; 135 void *priv_sc0; /* client data */ 136 void *priv_sc1; /* client data */ 137 void *queue_data; | 2/*- 3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 120 unchanged lines hidden (view full) --- 130 struct usb2_xfer *xfer[2]; 131 struct usb2_xfer **fs_xfer; 132 struct mtx *priv_mtx; /* client data */ 133 /* set if FIFO is opened by a FILE: */ 134 struct usb2_cdev_privdata *curr_cpd; 135 void *priv_sc0; /* client data */ 136 void *priv_sc1; /* client data */ 137 void *queue_data; |
138 uint32_t timeout; /* timeout in milliseconds */ 139 uint32_t bufsize; /* BULK and INTERRUPT buffer size */ 140 uint16_t nframes; /* for isochronous mode */ | 138 usb2_timeout_t timeout; /* timeout in milliseconds */ 139 usb2_frlength_t bufsize; /* BULK and INTERRUPT buffer size */ 140 usb2_frcount_t nframes; /* for isochronous mode */ |
141 uint16_t dev_ep_index; /* our device endpoint index */ 142 uint8_t flag_sleeping; /* set if FIFO is sleeping */ 143 uint8_t flag_iscomplete; /* set if a USB transfer is complete */ 144 uint8_t flag_iserror; /* set if FIFO error happened */ 145 uint8_t flag_isselect; /* set if FIFO is selected */ 146 uint8_t flag_flushing; /* set if FIFO is flushing data */ 147 uint8_t flag_short; /* set if short_ok or force_short 148 * transfer flags should be set */ --- 21 unchanged lines hidden (view full) --- 170void usb2_fifo_free_buffer(struct usb2_fifo *f); 171int usb2_fifo_attach(struct usb2_device *udev, void *priv_sc, 172 struct mtx *priv_mtx, struct usb2_fifo_methods *pm, 173 struct usb2_fifo_sc *f_sc, uint16_t unit, uint16_t subunit, 174 uint8_t iface_index, uid_t uid, gid_t gid, int mode); 175void usb2_fifo_detach(struct usb2_fifo_sc *f_sc); 176uint32_t usb2_fifo_put_bytes_max(struct usb2_fifo *fifo); 177void usb2_fifo_put_data(struct usb2_fifo *fifo, struct usb2_page_cache *pc, | 141 uint16_t dev_ep_index; /* our device endpoint index */ 142 uint8_t flag_sleeping; /* set if FIFO is sleeping */ 143 uint8_t flag_iscomplete; /* set if a USB transfer is complete */ 144 uint8_t flag_iserror; /* set if FIFO error happened */ 145 uint8_t flag_isselect; /* set if FIFO is selected */ 146 uint8_t flag_flushing; /* set if FIFO is flushing data */ 147 uint8_t flag_short; /* set if short_ok or force_short 148 * transfer flags should be set */ --- 21 unchanged lines hidden (view full) --- 170void usb2_fifo_free_buffer(struct usb2_fifo *f); 171int usb2_fifo_attach(struct usb2_device *udev, void *priv_sc, 172 struct mtx *priv_mtx, struct usb2_fifo_methods *pm, 173 struct usb2_fifo_sc *f_sc, uint16_t unit, uint16_t subunit, 174 uint8_t iface_index, uid_t uid, gid_t gid, int mode); 175void usb2_fifo_detach(struct usb2_fifo_sc *f_sc); 176uint32_t usb2_fifo_put_bytes_max(struct usb2_fifo *fifo); 177void usb2_fifo_put_data(struct usb2_fifo *fifo, struct usb2_page_cache *pc, |
178 uint32_t offset, uint32_t len, uint8_t what); | 178 usb2_frlength_t offset, usb2_frlength_t len, uint8_t what); |
179void usb2_fifo_put_data_linear(struct usb2_fifo *fifo, void *ptr, | 179void usb2_fifo_put_data_linear(struct usb2_fifo *fifo, void *ptr, |
180 uint32_t len, uint8_t what); 181uint8_t usb2_fifo_put_data_buffer(struct usb2_fifo *f, void *ptr, uint32_t len); | 180 usb2_size_t len, uint8_t what); 181uint8_t usb2_fifo_put_data_buffer(struct usb2_fifo *f, void *ptr, usb2_size_t len); |
182void usb2_fifo_put_data_error(struct usb2_fifo *fifo); 183uint8_t usb2_fifo_get_data(struct usb2_fifo *fifo, struct usb2_page_cache *pc, | 182void usb2_fifo_put_data_error(struct usb2_fifo *fifo); 183uint8_t usb2_fifo_get_data(struct usb2_fifo *fifo, struct usb2_page_cache *pc, |
184 uint32_t offset, uint32_t len, uint32_t *actlen, uint8_t what); | 184 usb2_frlength_t offset, usb2_frlength_t len, usb2_frlength_t *actlen, 185 uint8_t what); |
185uint8_t usb2_fifo_get_data_linear(struct usb2_fifo *fifo, void *ptr, | 186uint8_t usb2_fifo_get_data_linear(struct usb2_fifo *fifo, void *ptr, |
186 uint32_t len, uint32_t *actlen, uint8_t what); | 187 usb2_size_t len, usb2_size_t *actlen, uint8_t what); |
187uint8_t usb2_fifo_get_data_buffer(struct usb2_fifo *f, void **pptr, | 188uint8_t usb2_fifo_get_data_buffer(struct usb2_fifo *f, void **pptr, |
188 uint32_t *plen); | 189 usb2_size_t *plen); |
189void usb2_fifo_get_data_error(struct usb2_fifo *fifo); 190uint8_t usb2_fifo_opened(struct usb2_fifo *fifo); 191void usb2_fifo_free(struct usb2_fifo *f); 192void usb2_fifo_reset(struct usb2_fifo *f); 193void usb2_fifo_wakeup(struct usb2_fifo *f); 194struct usb2_symlink *usb2_alloc_symlink(const char *target); 195void usb2_free_symlink(struct usb2_symlink *ps); 196int usb2_read_symlink(uint8_t *user_ptr, uint32_t startentry, 197 uint32_t user_len); 198void usb2_fifo_set_close_zlp(struct usb2_fifo *, uint8_t); 199 200#endif /* _USB2_DEV_H_ */ | 190void usb2_fifo_get_data_error(struct usb2_fifo *fifo); 191uint8_t usb2_fifo_opened(struct usb2_fifo *fifo); 192void usb2_fifo_free(struct usb2_fifo *f); 193void usb2_fifo_reset(struct usb2_fifo *f); 194void usb2_fifo_wakeup(struct usb2_fifo *f); 195struct usb2_symlink *usb2_alloc_symlink(const char *target); 196void usb2_free_symlink(struct usb2_symlink *ps); 197int usb2_read_symlink(uint8_t *user_ptr, uint32_t startentry, 198 uint32_t user_len); 199void usb2_fifo_set_close_zlp(struct usb2_fifo *, uint8_t); 200 201#endif /* _USB2_DEV_H_ */ |