update host class driver struct: add hport.

This commit is contained in:
aozima
2022-03-19 11:23:40 +08:00
committed by sakumisu
parent fd574baeb7
commit 5e455c2331
6 changed files with 15 additions and 6 deletions

View File

@@ -168,6 +168,7 @@ int usbh_cdc_acm_connect(struct usbh_hubport *hport, uint8_t intf)
}
memset(cdc_acm_class, 0, sizeof(struct usbh_cdc_acm));
cdc_acm_class->hport = hport;
usbh_cdc_acm_devno_alloc(cdc_acm_class);
snprintf(hport->config.intf[intf].devname, CONFIG_USBHOST_DEV_NAMELEN, DEV_FORMAT, cdc_acm_class->minor);

View File

@@ -26,6 +26,8 @@
#include "usb_cdc.h"
struct usbh_cdc_acm {
struct usbh_hubport *hport;
struct cdc_line_coding *linecoding;
uint8_t ctrl_intf; /* Control interface number */
uint8_t data_intf; /* Data interface number */

View File

@@ -159,6 +159,7 @@ int usbh_hid_connect(struct usbh_hubport *hport, uint8_t intf)
}
memset(hid_class, 0, sizeof(struct usbh_hid));
hid_class->hport = hport;
usbh_hid_devno_alloc(hid_class);
snprintf(hport->config.intf[intf].devname, CONFIG_USBHOST_DEV_NAMELEN, DEV_FORMAT, hid_class->minor);

View File

@@ -26,6 +26,8 @@
#include "usb_hid.h"
struct usbh_hid {
struct usbh_hubport *hport;
uint8_t intf; /* interface number */
uint8_t minor;
usbh_epinfo_t intin; /* INTR IN endpoint */

View File

@@ -338,6 +338,7 @@ int usbh_msc_connect(struct usbh_hubport *hport, uint8_t intf)
}
memset(msc_class, 0, sizeof(struct usbh_msc));
msc_class->hport = hport;
usbh_msc_devno_alloc(msc_class);
snprintf(hport->config.intf[intf].devname, CONFIG_USBHOST_DEV_NAMELEN, DEV_FORMAT, msc_class->sdchar);

View File

@@ -27,6 +27,8 @@
#include "usb_scsi.h"
struct usbh_msc {
struct usbh_hubport *hport;
uint8_t intf; /* Data interface number */
uint8_t sdchar;
usbh_epinfo_t bulkin; /* Bulk IN endpoint */