Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复./core/usbd_core.c以及./port/musb/usbd_dc_musb.c中的bug #57

Closed
wants to merge 2 commits into from

Conversation

fuyunezu
Copy link

  1. 修复./core/usbd_core.c中bug
  • line 370,#ifdef CONFIG_USBDEV_TEST_MODE改为#if CONFIG_USBDEV_TEST_MODE
  • line897,添加memcpy(usbd_core_cfg.req_data, usbd_core_cfg.ep0_data_buf, nbytes)用于在循环读取数据时将数据备份到数组usbd_core_cfg.req_data中,以便数据读取结束后进行后续的请求处理。
  1. 修复./port/musb/usbd_dc_musb.c中的bug
  • 修复读8bit寄存器时按16bit读取的问题
  • 删除对只读寄存器的写操作
  • 优化中断程序的控制流程

@sakumisu
Copy link
Collaborator

  • 需要使用 ifdef
  • usbd_core_cfg.ep0_data_buf 等价于 usbd_core_cfg.req_data,无需copy
  • TXIS 等寄存器标准 的musb 为 16位

@fuyunezu
Copy link
Author

本次pr总结如下:

  1. TXIS 等寄存器问题保留
  2. 不需要额外memcpy的操作
  3. ./port/musb/usbd_dc_musb.c中函数handle_ep0中case uasb_ep0_state_out_data中缺少调用musb_read_packet操作的问题需要修复

@fuyunezu fuyunezu closed this Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants