fix(cherryusb): fix build error
This commit is contained in:
parent
a40f2a62ef
commit
2d266742e0
|
@ -84,7 +84,7 @@ if GetDepend(['RT_CHERRYUSB_DEVICE']):
|
||||||
LIBS = ['libpusb2_dc_a32_softfp_neon.a']
|
LIBS = ['libpusb2_dc_a32_softfp_neon.a']
|
||||||
|
|
||||||
if GetDepend(['RT_CHERRYUSB_DEVICE_CDC_ACM']):
|
if GetDepend(['RT_CHERRYUSB_DEVICE_CDC_ACM']):
|
||||||
src += Glob('class/cdc/usbd_cdc.c')
|
src += Glob('class/cdc/usbd_cdc_acm.c')
|
||||||
if GetDepend(['RT_CHERRYUSB_DEVICE_HID']):
|
if GetDepend(['RT_CHERRYUSB_DEVICE_HID']):
|
||||||
src += Glob('class/hid/usbd_hid.c')
|
src += Glob('class/hid/usbd_hid.c')
|
||||||
if GetDepend(['RT_CHERRYUSB_DEVICE_MSC']):
|
if GetDepend(['RT_CHERRYUSB_DEVICE_MSC']):
|
||||||
|
|
|
@ -537,6 +537,7 @@ static bool SCSI_read10(uint8_t busid, uint8_t **data, uint32_t *len)
|
||||||
g_usbd_msc[busid].stage = MSC_DATA_IN;
|
g_usbd_msc[busid].stage = MSC_DATA_IN;
|
||||||
#if defined(CONFIG_USBDEV_MSC_THREAD)
|
#if defined(CONFIG_USBDEV_MSC_THREAD)
|
||||||
usb_osal_mq_send(g_usbd_msc[busid].usbd_msc_mq, MSC_DATA_IN);
|
usb_osal_mq_send(g_usbd_msc[busid].usbd_msc_mq, MSC_DATA_IN);
|
||||||
|
return true;
|
||||||
#elif defined(CONFIG_USBDEV_MSC_POLLING)
|
#elif defined(CONFIG_USBDEV_MSC_POLLING)
|
||||||
chry_ringbuffer_write_byte(&g_usbd_msc[busid].msc_rb, MSC_DATA_IN);
|
chry_ringbuffer_write_byte(&g_usbd_msc[busid].msc_rb, MSC_DATA_IN);
|
||||||
return true;
|
return true;
|
||||||
|
@ -574,6 +575,7 @@ static bool SCSI_read12(uint8_t busid, uint8_t **data, uint32_t *len)
|
||||||
g_usbd_msc[busid].stage = MSC_DATA_IN;
|
g_usbd_msc[busid].stage = MSC_DATA_IN;
|
||||||
#if defined(CONFIG_USBDEV_MSC_THREAD)
|
#if defined(CONFIG_USBDEV_MSC_THREAD)
|
||||||
usb_osal_mq_send(g_usbd_msc[busid].usbd_msc_mq, MSC_DATA_IN);
|
usb_osal_mq_send(g_usbd_msc[busid].usbd_msc_mq, MSC_DATA_IN);
|
||||||
|
return true;
|
||||||
#elif defined(CONFIG_USBDEV_MSC_POLLING)
|
#elif defined(CONFIG_USBDEV_MSC_POLLING)
|
||||||
chry_ringbuffer_write_byte(&g_usbd_msc[busid].msc_rb, MSC_DATA_IN);
|
chry_ringbuffer_write_byte(&g_usbd_msc[busid].msc_rb, MSC_DATA_IN);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -57,7 +57,7 @@ void usb_hc_low_level_init(struct usbh_bus *bus)
|
||||||
SYS->MISCFCR0 &= ~SYS_MISCFCR0_UHOVRCURH_Msk;
|
SYS->MISCFCR0 &= ~SYS_MISCFCR0_UHOVRCURH_Msk;
|
||||||
while (1) {
|
while (1) {
|
||||||
rt_thread_mdelay(1);
|
rt_thread_mdelay(1);
|
||||||
if ((SYS->USBPMISCR & SYS_USBPMISCR_PHY0HSTCKSTB_Msk) &&)
|
if (SYS->USBPMISCR & SYS_USBPMISCR_PHY0HSTCKSTB_Msk)
|
||||||
break; /* both USB PHY0 and PHY1 clock 60MHz UTMI clock stable */
|
break; /* both USB PHY0 and PHY1 clock 60MHz UTMI clock stable */
|
||||||
|
|
||||||
timeout--;
|
timeout--;
|
||||||
|
@ -88,7 +88,7 @@ void usb_hc_low_level_init(struct usbh_bus *bus)
|
||||||
SYS->MISCFCR0 &= ~SYS_MISCFCR0_UHOVRCURH_Msk;
|
SYS->MISCFCR0 &= ~SYS_MISCFCR0_UHOVRCURH_Msk;
|
||||||
while (1) {
|
while (1) {
|
||||||
rt_thread_mdelay(1);
|
rt_thread_mdelay(1);
|
||||||
if ((SYS->USBPMISCR & SYS_USBPMISCR_PHY1HSTCKSTB_Msk))
|
if (SYS->USBPMISCR & SYS_USBPMISCR_PHY1HSTCKSTB_Msk)
|
||||||
break; /* both USB PHY0 and PHY1 clock 60MHz UTMI clock stable */
|
break; /* both USB PHY0 and PHY1 clock 60MHz UTMI clock stable */
|
||||||
|
|
||||||
timeout--;
|
timeout--;
|
||||||
|
|
Loading…
Reference in New Issue