@@ -115,7 +115,7 @@ void usbd_adb_bulk_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
|
||||
if (adb_client.common_state == ADB_STATE_READ_MSG) {
|
||||
if (nbytes != sizeof(struct adb_msg)) {
|
||||
USB_LOG_ERR("invalid adb msg size:%d\r\n", nbytes);
|
||||
USB_LOG_ERR("invalid adb msg size:%d\r\n", (unsigned int)nbytes);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ static int cdc_acm_class_interface_request_handler(uint8_t busid, struct usb_set
|
||||
memcpy(&line_coding, *data, setup->wLength);
|
||||
USB_LOG_DBG("Set intf:%d linecoding <%d %d %s %s>\r\n",
|
||||
intf_num,
|
||||
line_coding.dwDTERate,
|
||||
(unsigned int)line_coding.dwDTERate,
|
||||
line_coding.bDataBits,
|
||||
parity_name[line_coding.bParityType],
|
||||
stop_name[line_coding.bCharFormat]);
|
||||
@@ -67,7 +67,7 @@ static int cdc_acm_class_interface_request_handler(uint8_t busid, struct usb_set
|
||||
*len = 7;
|
||||
USB_LOG_DBG("Get intf:%d linecoding %d %d %d %d\r\n",
|
||||
intf_num,
|
||||
line_coding.dwDTERate,
|
||||
(unsigned int)line_coding.dwDTERate,
|
||||
line_coding.bCharFormat,
|
||||
line_coding.bParityType,
|
||||
line_coding.bDataBits);
|
||||
|
||||
@@ -62,12 +62,12 @@ static void print_ntb_parameters(struct cdc_ncm_ntb_parameters *param)
|
||||
USB_LOG_RAW("wLength: 0x%02x \r\n", param->wLength);
|
||||
USB_LOG_RAW("bmNtbFormatsSupported: %s \r\n", param->bmNtbFormatsSupported ? "NTB16" : "NTB32");
|
||||
|
||||
USB_LOG_RAW("dwNtbInMaxSize: 0x%08lx \r\n", param->dwNtbInMaxSize);
|
||||
USB_LOG_RAW("dwNtbInMaxSize: 0x%08x \r\n", (unsigned int)param->dwNtbInMaxSize);
|
||||
USB_LOG_RAW("wNdbInDivisor: 0x%02x \r\n", param->wNdbInDivisor);
|
||||
USB_LOG_RAW("wNdbInPayloadRemainder: 0x%02x \r\n", param->wNdbInPayloadRemainder);
|
||||
USB_LOG_RAW("wNdbInAlignment: 0x%02x \r\n", param->wNdbInAlignment);
|
||||
|
||||
USB_LOG_RAW("dwNtbOutMaxSize: 0x%08lx \r\n", param->dwNtbOutMaxSize);
|
||||
USB_LOG_RAW("dwNtbOutMaxSize: 0x%08x \r\n", (unsigned int)param->dwNtbOutMaxSize);
|
||||
USB_LOG_RAW("wNdbOutDivisor: 0x%02x \r\n", param->wNdbOutDivisor);
|
||||
USB_LOG_RAW("wNdbOutPayloadRemainder: 0x%02x \r\n", param->wNdbOutPayloadRemainder);
|
||||
USB_LOG_RAW("wNdbOutAlignment: 0x%02x \r\n", param->wNdbOutAlignment);
|
||||
|
||||
2
class/vendor/net/usbh_rtl8152.c
vendored
2
class/vendor/net/usbh_rtl8152.c
vendored
@@ -2045,7 +2045,7 @@ static int usbh_rtl8152_connect(struct usbh_hubport *hport, uint8_t intf)
|
||||
rtl8152_class->rtl_ops.up(rtl8152_class);
|
||||
|
||||
if (rtl8152_class->rx_buf_sz > CONFIG_USBHOST_RTL8152_ETH_MAX_RX_SIZE) {
|
||||
USB_LOG_ERR("rx_buf_sz is overflow, default is %d\r\n", CONFIG_USBHOST_RTL8152_ETH_MAX_RX_SIZE);
|
||||
USB_LOG_ERR("rx_buf_sz is overflow, default is %d\r\n", (unsigned int)CONFIG_USBHOST_RTL8152_ETH_MAX_RX_SIZE);
|
||||
return -USB_ERR_NOMEM;
|
||||
}
|
||||
|
||||
|
||||
@@ -380,10 +380,10 @@ static int usbh_rndis_connect(struct usbh_hubport *hport, uint8_t intf)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
USB_LOG_WRN("Ignore rndis query iod:%08lx\r\n", oid);
|
||||
USB_LOG_WRN("Ignore rndis query iod:%08x\r\n", (unsigned int)oid);
|
||||
continue;
|
||||
}
|
||||
USB_LOG_INFO("rndis query iod:%08lx success\r\n", oid);
|
||||
USB_LOG_INFO("rndis query iod:%08x success\r\n", (unsigned int)oid);
|
||||
}
|
||||
|
||||
uint32_t packet_filter = 0x0f;
|
||||
@@ -414,7 +414,7 @@ static int usbh_rndis_connect(struct usbh_hubport *hport, uint8_t intf)
|
||||
usbh_rndis_run(rndis_class);
|
||||
return ret;
|
||||
query_errorout:
|
||||
USB_LOG_ERR("rndis query iod:%08lx error\r\n", oid);
|
||||
USB_LOG_ERR("rndis query iod:%08x error\r\n", (unsigned int)oid);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -1228,7 +1228,7 @@ static void usbd_event_ep0_in_complete_handler(uint8_t busid, uint8_t ep, uint32
|
||||
g_usbd_core[busid].ep0_data_buf += nbytes;
|
||||
g_usbd_core[busid].ep0_data_buf_residue -= nbytes;
|
||||
|
||||
USB_LOG_DBG("EP0 send %d bytes, %d remained\r\n", nbytes, g_usbd_core[busid].ep0_data_buf_residue);
|
||||
USB_LOG_DBG("EP0 send %d bytes, %d remained\r\n", (unsigned int)nbytes, (unsigned int)g_usbd_core[busid].ep0_data_buf_residue);
|
||||
|
||||
if (g_usbd_core[busid].ep0_data_buf_residue != 0) {
|
||||
/* Start sending the remain data */
|
||||
@@ -1271,7 +1271,7 @@ static void usbd_event_ep0_out_complete_handler(uint8_t busid, uint8_t ep, uint3
|
||||
g_usbd_core[busid].ep0_data_buf += nbytes;
|
||||
g_usbd_core[busid].ep0_data_buf_residue -= nbytes;
|
||||
|
||||
USB_LOG_DBG("EP0 recv %d bytes, %d remained\r\n", nbytes, g_usbd_core[busid].ep0_data_buf_residue);
|
||||
USB_LOG_DBG("EP0 recv %d bytes, %d remained\r\n", (unsigned int)nbytes, (unsigned int)g_usbd_core[busid].ep0_data_buf_residue);
|
||||
|
||||
if (g_usbd_core[busid].ep0_data_buf_residue == 0) {
|
||||
#ifdef CONFIG_USBDEV_EP0_THREAD
|
||||
@@ -1438,7 +1438,7 @@ static void usbdev_ep0_thread(CONFIG_USB_OSAL_THREAD_SET_ARGV)
|
||||
if (ret < 0) {
|
||||
continue;
|
||||
}
|
||||
USB_LOG_DBG("event:%d\r\n", event);
|
||||
USB_LOG_DBG("event:%d\r\n", (unsigned int)event);
|
||||
|
||||
switch (event) {
|
||||
case USB_EP0_STATE_SETUP:
|
||||
|
||||
@@ -482,7 +482,7 @@ int usbh_enumerate(struct usbh_hubport *hport)
|
||||
|
||||
if (wTotalLength > CONFIG_USBHOST_REQUEST_BUFFER_LEN) {
|
||||
ret = -USB_ERR_NOMEM;
|
||||
USB_LOG_ERR("wTotalLength %d is overflow, default is %d\r\n", wTotalLength, CONFIG_USBHOST_REQUEST_BUFFER_LEN);
|
||||
USB_LOG_ERR("wTotalLength %d is overflow, default is %d\r\n", wTotalLength, (unsigned int)CONFIG_USBHOST_REQUEST_BUFFER_LEN);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ void usbd_audio_close(uint8_t busid, uint8_t intf)
|
||||
|
||||
void usbd_audio_iso_callback(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual in len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual in len:%d\r\n", (unsigned int)nbytes);
|
||||
ep_tx_busy_flag = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -315,20 +315,20 @@ void usbd_audio_close(uint8_t busid, uint8_t intf)
|
||||
|
||||
void usbd_audio_out_callback(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
usbd_ep_start_read(busid, AUDIO_OUT_EP, read_buffer, AUDIO_OUT_PACKET);
|
||||
}
|
||||
|
||||
void usbd_audio_in_callback(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual in len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual in len:%d\r\n", (unsigned int)nbytes);
|
||||
ep_tx_busy_flag = false;
|
||||
}
|
||||
|
||||
#if USING_FEEDBACK == 1
|
||||
void usbd_audio_iso_out_feedback_callback(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual feedback len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual feedback len:%d\r\n", (unsigned int)nbytes);
|
||||
uint32_t feedback_value = AUDIO_FREQ_TO_FEEDBACK_FS(AUDIO_SPEAKER_FREQ);
|
||||
AUDIO_FEEDBACK_TO_BUF_FS(s_speaker_feedback_buffer, feedback_value);
|
||||
usbd_ep_start_write(busid, AUDIO_OUT_FEEDBACK_EP, s_speaker_feedback_buffer, FEEDBACK_ENDP_PACKET_SIZE);
|
||||
|
||||
@@ -370,7 +370,7 @@ void usbd_audio_get_sampling_freq_table(uint8_t busid, uint8_t ep, uint8_t **sam
|
||||
|
||||
void usbd_audio_iso_out_callback(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
usbd_ep_start_read(busid, AUDIO_OUT_EP, read_buffer, AUDIO_OUT_PACKET);
|
||||
}
|
||||
|
||||
|
||||
@@ -331,14 +331,14 @@ void usbd_audio_get_sampling_freq_table(uint8_t busid, uint8_t ep, uint8_t **sam
|
||||
|
||||
void usbd_audio_iso_out_callback(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
usbd_ep_start_read(busid, AUDIO_OUT_EP, read_buffer, AUDIO_OUT_PACKET);
|
||||
}
|
||||
|
||||
#if USING_FEEDBACK == 1
|
||||
void usbd_audio_iso_out_feedback_callback(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual feedback len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual feedback len:%d\r\n", (unsigned int)nbytes);
|
||||
#ifdef CONFIG_USB_HS
|
||||
uint32_t feedback_value = AUDIO_FREQ_TO_FEEDBACK_HS(AUDIO_FREQ);
|
||||
AUDIO_FEEDBACK_TO_BUF_HS(s_speaker_feedback_buffer, feedback_value);
|
||||
|
||||
@@ -196,7 +196,7 @@ static void bootuf2block_state_update(struct bootuf2_STATE *STATE,
|
||||
}
|
||||
|
||||
USB_LOG_DBG("UF2 block total %d written %d index %d\r\n",
|
||||
uf2->NumberOfBlock, STATE->NumberOfWritten, uf2->BlockIndex);
|
||||
uf2->NumberOfBllock, STATE->NumberOfWritten, uf2->BlockIndex);
|
||||
}
|
||||
|
||||
static bool bootuf2block_state_check(struct bootuf2_STATE *STATE)
|
||||
|
||||
@@ -196,7 +196,7 @@ void usbd_msc_get_cap(uint8_t busid, uint8_t lun, uint32_t *block_num, uint32_t
|
||||
*block_num = bootuf2_get_sector_count();
|
||||
*block_size = bootuf2_get_sector_size();
|
||||
|
||||
USB_LOG_INFO("sector count:%d, sector size:%d\n", *block_num, *block_size);
|
||||
USB_LOG_INFO("sector count:%d, sector size:%d\n", (unsigned int)*block_num, (unsigned int)*block_size);
|
||||
}
|
||||
int usbd_msc_sector_read(uint8_t busid, uint8_t lun, uint32_t sector, uint8_t *buffer, uint32_t length)
|
||||
{
|
||||
@@ -231,6 +231,6 @@ void boot2uf2_flash_init(void)
|
||||
|
||||
int bootuf2_flash_write(uint32_t address, const uint8_t *data, size_t size)
|
||||
{
|
||||
USB_LOG_INFO("address:%08x, size:%d\n", address, size);
|
||||
USB_LOG_INFO("address:%08x, size:%d\n", (unsigned int)address, (unsigned int)size);
|
||||
return 0;
|
||||
}
|
||||
@@ -364,14 +364,14 @@ static void usbd_event_handler(uint8_t busid, uint8_t event)
|
||||
|
||||
void usbd_cdc_acm_bulk_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
/* setup next out ep read transfer */
|
||||
usbd_ep_start_read(busid, CDC_OUT_EP, read_buffer, 2048);
|
||||
}
|
||||
|
||||
void usbd_cdc_acm_bulk_in(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual in len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual in len:%d\r\n", (unsigned int)nbytes);
|
||||
|
||||
if ((nbytes % usbd_get_ep_mps(busid, ep)) == 0 && nbytes) {
|
||||
/* send zlp */
|
||||
|
||||
@@ -215,14 +215,14 @@ static void usbd_event_handler(uint8_t busid, uint8_t event)
|
||||
|
||||
void usbd_cdc_acm_bulk_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
/* setup next out ep read transfer */
|
||||
usbd_ep_start_read(busid, CDC_OUT_EP, read_buffer, 2048);
|
||||
}
|
||||
|
||||
void usbd_cdc_acm_bulk_in(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual in len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual in len:%d\r\n", (unsigned int)nbytes);
|
||||
|
||||
if ((nbytes % usbd_get_ep_mps(busid, ep)) == 0 && nbytes) {
|
||||
/* send zlp */
|
||||
|
||||
@@ -224,14 +224,14 @@ static void usbd_event_handler(uint8_t busid, uint8_t event)
|
||||
|
||||
void usbd_cdc_acm_bulk_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
/* setup next out ep read transfer */
|
||||
usbd_ep_start_read(busid, CDC_OUT_EP, read_buffer, 2048);
|
||||
}
|
||||
|
||||
void usbd_cdc_acm_bulk_in(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual in len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual in len:%d\r\n", (unsigned int)nbytes);
|
||||
|
||||
if ((nbytes % CDC_MAX_MPS) == 0 && nbytes) {
|
||||
/* send zlp */
|
||||
|
||||
@@ -203,7 +203,7 @@ static void usbd_event_handler(uint8_t busid, uint8_t event)
|
||||
|
||||
void usbd_cdc_acm_bulk_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
// for (int i = 0; i < 100; i++) {
|
||||
// printf("%02x ", read_buffer[i]);
|
||||
// }
|
||||
@@ -214,7 +214,7 @@ void usbd_cdc_acm_bulk_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
|
||||
void usbd_cdc_acm_bulk_in(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual in len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual in len:%d\r\n", (unsigned int)nbytes);
|
||||
|
||||
if ((nbytes % usbd_get_ep_mps(busid, ep)) == 0 && nbytes) {
|
||||
/* send zlp */
|
||||
|
||||
@@ -339,13 +339,13 @@ static void usbd_hid_custom_in_callback(uint8_t busid, uint8_t ep, uint32_t nbyt
|
||||
{
|
||||
(void)busid;
|
||||
(void)ep;
|
||||
USB_LOG_RAW("actual in len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual in len:%d\r\n", (unsigned int)nbytes);
|
||||
custom_state = HID_STATE_IDLE;
|
||||
}
|
||||
|
||||
static void usbd_hid_custom_out_callback(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
usbd_ep_start_read(busid, ep, read_buffer, HIDRAW_IN_EP_SIZE);
|
||||
read_buffer[0] = 0x02; /* IN: report id */
|
||||
usbd_ep_start_write(busid, HIDRAW_IN_EP, read_buffer, nbytes);
|
||||
|
||||
@@ -54,7 +54,7 @@ void usbh_cdc_acm_callback(void *arg, int nbytes)
|
||||
for (size_t i = 0; i < nbytes; i++) {
|
||||
USB_LOG_RAW("0x%02x ", cdc_buffer[i]);
|
||||
}
|
||||
USB_LOG_RAW("nbytes:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("nbytes:%d\r\n", (unsigned int)nbytes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ static void usbh_cdc_acm_thread(CONFIG_USB_OSAL_THREAD_SET_ARGV)
|
||||
}
|
||||
}
|
||||
uint32_t time_ms = xTaskGetTickCount() - start_time;
|
||||
USB_LOG_RAW("per packet len:%d, out speed:%f MB/S\r\n", test_len[j], (test_len[j] * TEST_COUNT / 1024 / 1024) * 1000 / ((float)time_ms));
|
||||
USB_LOG_RAW("per packet len:%d, out speed:%f MB/S\r\n", (unsigned int)test_len[j], (test_len[j] * TEST_COUNT / 1024 / 1024) * 1000 / ((float)time_ms));
|
||||
}
|
||||
#endif
|
||||
memset(cdc_buffer, 0x55, 4096);
|
||||
@@ -94,7 +94,7 @@ static void usbh_cdc_acm_thread(CONFIG_USB_OSAL_THREAD_SET_ARGV)
|
||||
USB_LOG_RAW("bulk out error,ret:%d\r\n", ret);
|
||||
goto delete;
|
||||
} else {
|
||||
USB_LOG_RAW("send over:%d\r\n", cdc_acm_class->bulkout_urb.actual_length);
|
||||
USB_LOG_RAW("send over:%d\r\n", (unsigned int)cdc_acm_class->bulkout_urb.actual_length);
|
||||
}
|
||||
|
||||
/* we can change cdc_acm_class->bulkin->wMaxPacketSize with 4096 for testing zlp, default is ep mps */
|
||||
@@ -123,7 +123,7 @@ void usbh_hid_callback(void *arg, int nbytes)
|
||||
for (int i = 0; i < nbytes; i++) {
|
||||
USB_LOG_RAW("0x%02x ", hid_buffer[i]);
|
||||
}
|
||||
USB_LOG_RAW("nbytes:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("nbytes:%d\r\n", (unsigned int)nbytes);
|
||||
usbh_int_urb_fill(&hid_class->intin_urb, hid_class->hport, hid_class->intin, hid_buffer, hid_class->intin->wMaxPacketSize, 0, usbh_hid_callback, hid_class);
|
||||
usbh_submit_urb(&hid_class->intin_urb);
|
||||
} else if (nbytes == -USB_ERR_NAK) { /* only dwc2 should do this */
|
||||
@@ -170,14 +170,14 @@ int usb_msc_fatfs_test()
|
||||
{
|
||||
const char *tmp_data = "cherryusb fatfs demo...\r\n";
|
||||
|
||||
USB_LOG_RAW("data len:%d\r\n", strlen(tmp_data));
|
||||
USB_LOG_RAW("data len:%d\r\n", (unsigned int)strlen(tmp_data));
|
||||
for (uint32_t i = 0; i < 100; i++) {
|
||||
memcpy(&read_write_buffer[i * 25], tmp_data, strlen(tmp_data));
|
||||
}
|
||||
|
||||
res_sd = f_mount(&fs, "2:", 1);
|
||||
if (res_sd != FR_OK) {
|
||||
USB_LOG_RAW("mount fail,res:%d\r\n", res_sd);
|
||||
USB_LOG_RAW("mount fail,res:%d\r\n", (unsigned int)res_sd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -487,13 +487,13 @@ void usbd_audio_close(uint8_t busid, uint8_t intf)
|
||||
|
||||
void usbd_audio_out_callback(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
usbd_ep_start_read(busid, AUDIO_OUT_EP, audio_read_buffer, AUDIO_OUT_PACKET);
|
||||
}
|
||||
|
||||
void usbd_audio_in_callback(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual in len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual in len:%d\r\n", (unsigned int)nbytes);
|
||||
audio_iso_tx_busy = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -444,7 +444,7 @@ static void usbd_event_handler(uint8_t busid, uint8_t event)
|
||||
|
||||
void usbd_winusb_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
// for (int i = 0; i < 100; i++) {
|
||||
// printf("%02x ", read_buffer[i]);
|
||||
// }
|
||||
@@ -456,7 +456,7 @@ void usbd_winusb_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
|
||||
void usbd_winusb_in(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual in len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual in len:%d\r\n", (unsigned int)nbytes);
|
||||
|
||||
if ((nbytes % WINUSB_EP_MPS) == 0 && nbytes) {
|
||||
/* send zlp */
|
||||
@@ -482,7 +482,7 @@ struct usbd_interface intf0;
|
||||
|
||||
void usbd_winusb_out2(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
// for (int i = 0; i < 100; i++) {
|
||||
// printf("%02x ", read_buffer[i]);
|
||||
// }
|
||||
@@ -494,7 +494,7 @@ void usbd_winusb_out2(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
|
||||
void usbd_winusb_in2(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual in len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual in len:%d\r\n", (unsigned int)nbytes);
|
||||
|
||||
if ((nbytes % usbd_get_ep_mps(busid, ep)) == 0 && nbytes) {
|
||||
/* send zlp */
|
||||
|
||||
@@ -348,7 +348,7 @@ static void usbd_event_handler(uint8_t busid, uint8_t event)
|
||||
|
||||
void usbd_winusb_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
// for (int i = 0; i < 100; i++) {
|
||||
// printf("%02x ", read_buffer[i]);
|
||||
// }
|
||||
@@ -360,7 +360,7 @@ void usbd_winusb_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
|
||||
void usbd_winusb_in(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual in len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual in len:%d\r\n", (unsigned int)nbytes);
|
||||
|
||||
if ((nbytes % usbd_get_ep_mps(busid, ep)) == 0 && nbytes) {
|
||||
/* send zlp */
|
||||
@@ -372,7 +372,7 @@ void usbd_winusb_in(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
|
||||
void usbd_cdc_acm_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
// for (int i = 0; i < 100; i++) {
|
||||
// printf("%02x ", read_buffer[i]);
|
||||
// }
|
||||
@@ -384,7 +384,7 @@ void usbd_cdc_acm_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
|
||||
void usbd_cdc_acm_in(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual in len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual in len:%d\r\n", (unsigned int)nbytes);
|
||||
|
||||
if ((nbytes % usbd_get_ep_mps(busid, ep)) == 0 && nbytes) {
|
||||
/* send zlp */
|
||||
|
||||
@@ -413,7 +413,7 @@ static void usbd_event_handler(uint8_t busid, uint8_t event)
|
||||
|
||||
void usbd_winusb_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual out len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual out len:%d\r\n", (unsigned int)nbytes);
|
||||
// for (int i = 0; i < 100; i++) {
|
||||
// printf("%02x ", read_buffer[i]);
|
||||
// }
|
||||
@@ -425,7 +425,7 @@ void usbd_winusb_out(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
|
||||
void usbd_winusb_in(uint8_t busid, uint8_t ep, uint32_t nbytes)
|
||||
{
|
||||
USB_LOG_RAW("actual in len:%d\r\n", nbytes);
|
||||
USB_LOG_RAW("actual in len:%d\r\n", (unsigned int)nbytes);
|
||||
|
||||
if ((nbytes % usbd_get_ep_mps(busid, ep)) == 0 && nbytes) {
|
||||
/* send zlp */
|
||||
|
||||
@@ -527,12 +527,12 @@ int usb_dc_init(uint8_t busid)
|
||||
endpoints = ((USB_OTG_GLB->GHWCFG2 & (0x0f << 10)) >> 10) + 1;
|
||||
|
||||
USB_LOG_INFO("========== dwc2 udc params ==========\r\n");
|
||||
USB_LOG_INFO("CID:%08x\r\n", USB_OTG_GLB->CID);
|
||||
USB_LOG_INFO("GSNPSID:%08x\r\n", USB_OTG_GLB->GSNPSID);
|
||||
USB_LOG_INFO("GHWCFG1:%08x\r\n", USB_OTG_GLB->GHWCFG1);
|
||||
USB_LOG_INFO("GHWCFG2:%08x\r\n", USB_OTG_GLB->GHWCFG2);
|
||||
USB_LOG_INFO("GHWCFG3:%08x\r\n", USB_OTG_GLB->GHWCFG3);
|
||||
USB_LOG_INFO("GHWCFG4:%08x\r\n", USB_OTG_GLB->GHWCFG4);
|
||||
USB_LOG_INFO("CID:%08x\r\n", (unsigned int)USB_OTG_GLB->CID);
|
||||
USB_LOG_INFO("GSNPSID:%08x\r\n", (unsigned int)USB_OTG_GLB->GSNPSID);
|
||||
USB_LOG_INFO("GHWCFG1:%08x\r\n", (unsigned int)USB_OTG_GLB->GHWCFG1);
|
||||
USB_LOG_INFO("GHWCFG2:%08x\r\n", (unsigned int)USB_OTG_GLB->GHWCFG2);
|
||||
USB_LOG_INFO("GHWCFG3:%08x\r\n", (unsigned int)USB_OTG_GLB->GHWCFG3);
|
||||
USB_LOG_INFO("GHWCFG4:%08x\r\n", (unsigned int)USB_OTG_GLB->GHWCFG4);
|
||||
|
||||
USB_LOG_INFO("dwc2 fsphy type:%d, hsphy type:%d, dma support:%d\r\n", fsphy_type, hsphy_type, dma_support);
|
||||
USB_LOG_INFO("dwc2 has %d endpoints and dfifo depth(32-bit words) is %d, default config: %d endpoints\r\n", endpoints, (USB_OTG_GLB->GHWCFG3 >> 16), CONFIG_USBDEV_EP_NUM);
|
||||
|
||||
@@ -482,12 +482,12 @@ int usb_hc_init(struct usbh_bus *bus)
|
||||
usb_hc_low_level_init(bus);
|
||||
|
||||
USB_LOG_INFO("========== dwc2 hcd params ==========\r\n");
|
||||
USB_LOG_INFO("CID:%08x\r\n", USB_OTG_GLB->CID);
|
||||
USB_LOG_INFO("GSNPSID:%08x\r\n", USB_OTG_GLB->GSNPSID);
|
||||
USB_LOG_INFO("GHWCFG1:%08x\r\n", USB_OTG_GLB->GHWCFG1);
|
||||
USB_LOG_INFO("GHWCFG2:%08x\r\n", USB_OTG_GLB->GHWCFG2);
|
||||
USB_LOG_INFO("GHWCFG3:%08x\r\n", USB_OTG_GLB->GHWCFG3);
|
||||
USB_LOG_INFO("GHWCFG4:%08x\r\n", USB_OTG_GLB->GHWCFG4);
|
||||
USB_LOG_INFO("CID:%08x\r\n", (unsigned int)USB_OTG_GLB->CID);
|
||||
USB_LOG_INFO("GSNPSID:%08x\r\n", (unsigned int)USB_OTG_GLB->GSNPSID);
|
||||
USB_LOG_INFO("GHWCFG1:%08x\r\n", (unsigned int)USB_OTG_GLB->GHWCFG1);
|
||||
USB_LOG_INFO("GHWCFG2:%08x\r\n", (unsigned int)USB_OTG_GLB->GHWCFG2);
|
||||
USB_LOG_INFO("GHWCFG3:%08x\r\n", (unsigned int)USB_OTG_GLB->GHWCFG3);
|
||||
USB_LOG_INFO("GHWCFG4:%08x\r\n", (unsigned int)USB_OTG_GLB->GHWCFG4);
|
||||
|
||||
USB_LOG_INFO("dwc2 has %d channels and dfifo depth(32-bit words) is %d\r\n", ((USB_OTG_GLB->GHWCFG2 & (0x0f << 14)) >> 14) + 1, (USB_OTG_GLB->GHWCFG3 >> 16));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user