ESP32-S2 USB Host CDC问题

Moderator: ESP_Bob

chegewara
Posts: 2362
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32-S2 USB Host CDC问题

Postby chegewara » Tue Jul 20, 2021 2:08 pm

I just updated usb component in that repository and now it builds, please try again.

lightsaltsign
Posts: 9
Joined: Wed Jul 14, 2021 3:21 am

Re: ESP32-S2 USB Host CDC问题

Postby lightsaltsign » Wed Jul 21, 2021 1:20 pm

chegewara wrote:
Tue Jul 20, 2021 2:08 pm
I just updated usb component in that repository and now it builds, please try again.
still build error

Code: Select all

                             ^
/Users/lvfeng/trunk/esp-refs/esp32-s2-usb-host-cdc/main/cdc_class.c: In function 'cdc_create_pipe':
/Users/lvfeng/trunk/esp-refs/esp32-s2-usb-host-cdc/main/cdc_class.c:129:40: error: 'USB_XFER_TYPE_INTR' undeclared (first use in this function); did you mean 'USB_TRANSFER_TYPE_INTR'?
     if(USB_DESC_EP_GET_XFERTYPE(ep) == USB_XFER_TYPE_INTR){
                                        ^~~~~~~~~~~~~~~~~~
                                        USB_TRANSFER_TYPE_INTR
/Users/lvfeng/trunk/esp-refs/esp32-s2-usb-host-cdc/main/cdc_class.c:129:40: note: each undeclared identifier is reported only once for each function it appears in
/Users/lvfeng/trunk/esp-refs/esp32-s2-usb-host-cdc/main/cdc_class.c:132:47: error: 'USB_XFER_TYPE_BULK' undeclared (first use in this function); did you mean 'USB_TRANSFER_TYPE_BULK'?
     } else if(USB_DESC_EP_GET_XFERTYPE(ep) == USB_XFER_TYPE_BULK && USB_DESC_EP_GET_EP_DIR(ep)){
                                               ^~~~~~~~~~~~~~~~~~
                                               USB_TRANSFER_TYPE_BULK
when I use USB_TRANSFER_TYPE_INTR instead of USB_XFER_TYPE_INTR, another build error as below

Code: Select all

    ^~~~~~~~
/Users/lvfeng/trunk/esp-refs/esp32-s2-usb-host-cdc/main/main.c: In function 'usbh_set_address_cb':
/Users/lvfeng/trunk/esp-refs/esp32-s2-usb-host-cdc/main/main.c:99:18: error: implicit declaration of function 'hcd_pipe_update'; did you mean 'hcd_pipe_update_mps'? [-Werror=implicit-function-declaration]
     if(ESP_OK != hcd_pipe_update(ctrl_pipe_hdl, DEVICE_ADDR, bMaxPacketSize0)) ESP_LOGE("", "failed to update ctrl pipe");
                  ^~~~~~~~~~~~~~~
                  hcd_pipe_update_mps
/Users/lvfeng/trunk/esp-refs/esp32-s2-usb-host-cdc/main/main.c: In function 'usbh_port_connection_cb':
/Users/lvfeng/trunk/esp-refs/esp32-s2-usb-host-cdc/main/main.c:145:22: warning: unused variable 'state' [-Wunused-variable]
     hcd_port_state_t state;

looking forwards for your reply

Who is online

Users browsing this forum: No registered users and 40 guests