bugfix: Fix some compilation errors
This commit is contained in:
2
Kconfig
2
Kconfig
@@ -118,6 +118,7 @@ if CHERRYUSB
|
|||||||
config CHERRYUSB_DEVICE_CDC_NCM
|
config CHERRYUSB_DEVICE_CDC_NCM
|
||||||
bool
|
bool
|
||||||
prompt "Enable usb cdc ncm device"
|
prompt "Enable usb cdc ncm device"
|
||||||
|
depends on !IDF_CMAKE
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config CHERRYUSB_DEVICE_MTP
|
config CHERRYUSB_DEVICE_MTP
|
||||||
@@ -338,6 +339,7 @@ if CHERRYUSB
|
|||||||
config CHERRYUSB_HOST_BLUETOOTH
|
config CHERRYUSB_HOST_BLUETOOTH
|
||||||
bool
|
bool
|
||||||
prompt "Enable usb bluetooth driver"
|
prompt "Enable usb bluetooth driver"
|
||||||
|
depends on !IDF_CMAKE
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config CHERRYUSB_HOST_ASIX
|
config CHERRYUSB_HOST_ASIX
|
||||||
|
|||||||
@@ -176,9 +176,6 @@ int usbh_aoa_register_hid(struct usbh_aoa *aoa_class, uint16_t id, uint8_t *repo
|
|||||||
int usbh_aoa_send_hid_event(struct usbh_aoa *aoa_class, uint16_t id, uint8_t *event, uint32_t event_len)
|
int usbh_aoa_send_hid_event(struct usbh_aoa *aoa_class, uint16_t id, uint8_t *event, uint32_t event_len)
|
||||||
{
|
{
|
||||||
struct usb_setup_packet *setup;
|
struct usb_setup_packet *setup;
|
||||||
int ret;
|
|
||||||
uint8_t len;
|
|
||||||
uint32_t offset;
|
|
||||||
|
|
||||||
if (!aoa_class || !aoa_class->hport) {
|
if (!aoa_class || !aoa_class->hport) {
|
||||||
return -USB_ERR_INVAL;
|
return -USB_ERR_INVAL;
|
||||||
@@ -198,7 +195,6 @@ int usbh_aoa_send_hid_event(struct usbh_aoa *aoa_class, uint16_t id, uint8_t *ev
|
|||||||
static int usbh_aoa_connect(struct usbh_hubport *hport, uint8_t intf)
|
static int usbh_aoa_connect(struct usbh_hubport *hport, uint8_t intf)
|
||||||
{
|
{
|
||||||
struct usb_endpoint_descriptor *ep_desc;
|
struct usb_endpoint_descriptor *ep_desc;
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
struct usbh_aoa *aoa_class = &g_aoa_class;
|
struct usbh_aoa *aoa_class = &g_aoa_class;
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,6 @@ static void dfu_request_upload(struct usb_setup_packet *setup, uint8_t **data, u
|
|||||||
{
|
{
|
||||||
struct usb_setup_packet *req = setup;
|
struct usb_setup_packet *req = setup;
|
||||||
uint32_t addr;
|
uint32_t addr;
|
||||||
uint8_t *phaddr;
|
|
||||||
/* Data setup request */
|
/* Data setup request */
|
||||||
if (req->wLength > 0U) {
|
if (req->wLength > 0U) {
|
||||||
if ((g_usbd_dfu.dev_state == DFU_STATE_DFU_IDLE) || (g_usbd_dfu.dev_state == DFU_STATE_DFU_UPLOAD_IDLE)) {
|
if ((g_usbd_dfu.dev_state == DFU_STATE_DFU_IDLE) || (g_usbd_dfu.dev_state == DFU_STATE_DFU_UPLOAD_IDLE)) {
|
||||||
@@ -143,7 +142,7 @@ static void dfu_request_upload(struct usb_setup_packet *setup, uint8_t **data, u
|
|||||||
addr = ((g_usbd_dfu.wblock_num - 2U) * USBD_DFU_XFER_SIZE) + g_usbd_dfu.data_ptr;
|
addr = ((g_usbd_dfu.wblock_num - 2U) * USBD_DFU_XFER_SIZE) + g_usbd_dfu.data_ptr;
|
||||||
|
|
||||||
/* Return the physical address where data are stored */
|
/* Return the physical address where data are stored */
|
||||||
phaddr = dfu_read_flash((uint8_t *)addr, g_usbd_dfu.buffer.d8, g_usbd_dfu.wlength);
|
dfu_read_flash((uint8_t *)addr, g_usbd_dfu.buffer.d8, g_usbd_dfu.wlength);
|
||||||
|
|
||||||
/* Send the status data over EP0 */
|
/* Send the status data over EP0 */
|
||||||
memcpy(*data, g_usbd_dfu.buffer.d8, g_usbd_dfu.wlength);
|
memcpy(*data, g_usbd_dfu.buffer.d8, g_usbd_dfu.wlength);
|
||||||
|
|||||||
6
class/vendor/net/usbh_rtl8152.c
vendored
6
class/vendor/net/usbh_rtl8152.c
vendored
@@ -1034,17 +1034,17 @@ static int generic_ocp_read(struct usbh_rtl8152 *tp, uint16_t index, uint16_t si
|
|||||||
static int generic_ocp_write(struct usbh_rtl8152 *tp, uint16_t index, uint16_t byteen,
|
static int generic_ocp_write(struct usbh_rtl8152 *tp, uint16_t index, uint16_t byteen,
|
||||||
uint16_t size, void *data, uint16_t type)
|
uint16_t size, void *data, uint16_t type)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret = -USB_ERR_INVAL;
|
||||||
uint16_t byteen_start, byteen_end, byen;
|
uint16_t byteen_start, byteen_end, byen;
|
||||||
uint16_t limit = 512;
|
uint16_t limit = 512;
|
||||||
uint8_t *buf = data;
|
uint8_t *buf = data;
|
||||||
|
|
||||||
/* both size and indix must be 4 bytes align */
|
/* both size and indix must be 4 bytes align */
|
||||||
if ((size & 3) || !size || (index & 3) || !buf)
|
if ((size & 3) || !size || (index & 3) || !buf)
|
||||||
return -USB_ERR_INVAL;
|
return ret;
|
||||||
|
|
||||||
if ((uint32_t)index + (uint32_t)size > 0xffff)
|
if ((uint32_t)index + (uint32_t)size > 0xffff)
|
||||||
return -USB_ERR_INVAL;
|
return ret;
|
||||||
|
|
||||||
byteen_start = byteen & BYTE_EN_START_MASK;
|
byteen_start = byteen & BYTE_EN_START_MASK;
|
||||||
byteen_end = byteen & BYTE_EN_END_MASK;
|
byteen_end = byteen & BYTE_EN_END_MASK;
|
||||||
|
|||||||
@@ -149,9 +149,6 @@
|
|||||||
#define CONFIG_USBDEV_RNDIS_VENDOR_DESC "CherryUSB"
|
#define CONFIG_USBDEV_RNDIS_VENDOR_DESC "CherryUSB"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CONFIG_USBDEV_RNDIS_USING_LWIP
|
|
||||||
#define CONFIG_USBDEV_CDC_ECM_USING_LWIP
|
|
||||||
|
|
||||||
/* ================ USB HOST Stack Configuration ================== */
|
/* ================ USB HOST Stack Configuration ================== */
|
||||||
|
|
||||||
#define CONFIG_USBHOST_MAX_RHPORTS 1
|
#define CONFIG_USBHOST_MAX_RHPORTS 1
|
||||||
|
|||||||
Reference in New Issue
Block a user