SDDC_Driver
Loading...
Searching...
No Matches
usb_device_internals.h
1/*
2 * usb_device_internals.h - internal USB structures to be shared between
3 * usb_device and usb_streaming
4 *
5 * Copyright (C) 2020 by Franco Venturi
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 *
20 * SPDX-License-Identifier: GPL-3.0-or-later
21 */
22
23#ifndef __USB_DEVICE_INTERNALS_H
24#define __USB_DEVICE_INTERNALS_H
25
26#include "usb_device.h"
27
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33typedef struct usb_device {
34 libusb_device *dev;
35 libusb_device_handle *dev_handle;
36 int completed;
37 int nendpoints;
38#define MAX_ENDPOINTS (16)
39 struct libusb_endpoint_descriptor endpoints[MAX_ENDPOINTS];
40 struct libusb_ss_endpoint_companion_descriptor ss_endpoints[MAX_ENDPOINTS];
41 uint8_t bulk_in_endpoint_address;
42 uint16_t bulk_in_max_packet_size;
43 uint8_t bulk_in_max_burst;
45typedef struct usb_device usb_device_t;
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif /* __USB_DEVICE_INTERNALS_H */
Definition usb_device_internals.h:33