Skip to content

Commit

Permalink
fix(cherryusb): fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
sakumisu authored and Rbb666 committed Sep 2, 2024
1 parent a40f2a6 commit 2d26674
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/drivers/usb/cherryusb/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ if GetDepend(['RT_CHERRYUSB_DEVICE']):
LIBS = ['libpusb2_dc_a32_softfp_neon.a']

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']):
src += Glob('class/hid/usbd_hid.c')
if GetDepend(['RT_CHERRYUSB_DEVICE_MSC']):
Expand Down
2 changes: 2 additions & 0 deletions components/drivers/usb/cherryusb/class/msc/usbd_msc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
#if defined(CONFIG_USBDEV_MSC_THREAD)
usb_osal_mq_send(g_usbd_msc[busid].usbd_msc_mq, MSC_DATA_IN);
return true;
#elif defined(CONFIG_USBDEV_MSC_POLLING)
chry_ringbuffer_write_byte(&g_usbd_msc[busid].msc_rb, MSC_DATA_IN);
return true;
Expand Down Expand Up @@ -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;
#if defined(CONFIG_USBDEV_MSC_THREAD)
usb_osal_mq_send(g_usbd_msc[busid].usbd_msc_mq, MSC_DATA_IN);
return true;
#elif defined(CONFIG_USBDEV_MSC_POLLING)
chry_ringbuffer_write_byte(&g_usbd_msc[busid].msc_rb, MSC_DATA_IN);
return true;
Expand Down
4 changes: 2 additions & 2 deletions components/drivers/usb/cherryusb/port/ehci/usb_glue_ma35d0.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void usb_hc_low_level_init(struct usbh_bus *bus)
SYS->MISCFCR0 &= ~SYS_MISCFCR0_UHOVRCURH_Msk;
while (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 */

timeout--;
Expand Down Expand Up @@ -88,7 +88,7 @@ void usb_hc_low_level_init(struct usbh_bus *bus)
SYS->MISCFCR0 &= ~SYS_MISCFCR0_UHOVRCURH_Msk;
while (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 */

timeout--;
Expand Down

0 comments on commit 2d26674

Please sign in to comment.