add user_data param in host class for users
This commit is contained in:
@@ -53,6 +53,8 @@ struct usbh_audio {
|
||||
uint8_t num_of_intf_altsettings;
|
||||
struct usbh_audio_module module[2];
|
||||
uint8_t module_num;
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -25,6 +25,8 @@ struct usbh_cdc_acm {
|
||||
|
||||
uint8_t intf;
|
||||
uint8_t minor;
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -23,7 +23,7 @@ struct usbh_cdc_ecm {
|
||||
uint8_t ctrl_intf; /* Control interface number */
|
||||
uint8_t data_intf; /* Data interface number */
|
||||
uint8_t minor;
|
||||
|
||||
|
||||
uint8_t mac[6];
|
||||
bool connect_status;
|
||||
uint16_t max_segment_size;
|
||||
@@ -32,6 +32,8 @@ struct usbh_cdc_ecm {
|
||||
ip_addr_t ipaddr;
|
||||
ip_addr_t netmask;
|
||||
ip_addr_t gateway;
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -36,6 +36,8 @@ struct usbh_cdc_ncm {
|
||||
ip_addr_t ipaddr;
|
||||
ip_addr_t netmask;
|
||||
ip_addr_t gateway;
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -15,9 +15,11 @@ struct usbh_hid {
|
||||
struct usbh_urb intin_urb; /* INTR IN urb */
|
||||
struct usbh_urb intout_urb; /* INTR OUT urb */
|
||||
|
||||
uint8_t report_desc[128];
|
||||
uint8_t report_desc[256];
|
||||
uint8_t intf; /* interface number */
|
||||
uint8_t minor;
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -20,6 +20,8 @@ struct usbh_msc {
|
||||
uint8_t sdchar;
|
||||
uint32_t blocknum; /* Number of blocks on the USB mass storage device */
|
||||
uint16_t blocksize; /* Block size of USB mass storage device */
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
struct usbh_msc_modeswitch_config {
|
||||
|
||||
@@ -12,6 +12,8 @@ struct usbh_xxx {
|
||||
|
||||
uint8_t intf; /* interface number */
|
||||
uint8_t minor;
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
void usbh_xxx_run(struct usbh_xxx *xxx_class);
|
||||
|
||||
2
class/vendor/net/usbh_asix.h
vendored
2
class/vendor/net/usbh_asix.h
vendored
@@ -159,6 +159,8 @@ struct usbh_asix {
|
||||
ip_addr_t ipaddr;
|
||||
ip_addr_t netmask;
|
||||
ip_addr_t gateway;
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
2
class/vendor/net/usbh_rtl8152.h
vendored
2
class/vendor/net/usbh_rtl8152.h
vendored
@@ -50,6 +50,8 @@ struct usbh_rtl8152 {
|
||||
void (*autosuspend_en)(struct usbh_rtl8152 *tp, bool enable);
|
||||
void (*change_mtu)(struct usbh_rtl8152 *tp);
|
||||
} rtl_ops;
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
2
class/vendor/serial/usbh_ch34x.h
vendored
2
class/vendor/serial/usbh_ch34x.h
vendored
@@ -51,6 +51,8 @@ struct usbh_ch34x {
|
||||
|
||||
uint8_t intf;
|
||||
uint8_t minor;
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
10
class/vendor/serial/usbh_cp210x.h
vendored
10
class/vendor/serial/usbh_cp210x.h
vendored
@@ -17,7 +17,7 @@
|
||||
#define CP210X_SET_BREAK 0x05
|
||||
#define CP210X_IMM_CHAR 0x06
|
||||
#define CP210X_SET_MHS 0x07 // Set DTR, RTS
|
||||
#define CP210X_GET_MDMSTS 0x08
|
||||
#define CP210X_GET_MDMSTS 0x08
|
||||
#define CP210X_SET_XON 0x09
|
||||
#define CP210X_SET_XOFF 0x0A
|
||||
#define CP210X_SET_EVENTMASK 0x0B
|
||||
@@ -33,9 +33,9 @@
|
||||
#define CP210X_EMBED_EVENTS 0x15
|
||||
#define CP210X_GET_EVENTSTATE 0x16
|
||||
#define CP210X_SET_CHARS 0x19
|
||||
#define CP210X_GET_BAUDRATE 0x1D
|
||||
#define CP210X_GET_BAUDRATE 0x1D
|
||||
#define CP210X_SET_BAUDRATE 0x1E // Set baudrate
|
||||
#define CP210X_VENDOR_SPECIFIC 0xFF
|
||||
#define CP210X_VENDOR_SPECIFIC 0xFF
|
||||
|
||||
struct usbh_cp210x {
|
||||
struct usbh_hubport *hport;
|
||||
@@ -45,9 +45,11 @@ struct usbh_cp210x {
|
||||
struct usbh_urb bulkin_urb;
|
||||
|
||||
struct cdc_line_coding line_coding;
|
||||
|
||||
|
||||
uint8_t intf;
|
||||
uint8_t minor;
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
2
class/vendor/serial/usbh_ftdi.h
vendored
2
class/vendor/serial/usbh_ftdi.h
vendored
@@ -51,6 +51,8 @@ struct usbh_ftdi {
|
||||
uint8_t intf;
|
||||
uint8_t minor;
|
||||
uint8_t modem_status[2];
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -55,6 +55,8 @@ struct usbh_video {
|
||||
uint8_t num_of_intf_altsettings;
|
||||
uint8_t num_of_formats;
|
||||
struct usbh_video_format format[3];
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -29,6 +29,8 @@ struct usbh_bluetooth {
|
||||
struct usbh_urb *isoout_urb; /* Bulk OUT urb */
|
||||
uint8_t num_of_intf_altsettings;
|
||||
#endif
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,6 +33,8 @@ struct usbh_rndis {
|
||||
ip_addr_t ipaddr;
|
||||
ip_addr_t netmask;
|
||||
ip_addr_t gateway;
|
||||
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user