-
Notifications
You must be signed in to change notification settings - Fork 1.2k
host/dwc2: fix bitfields access width #3070
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
Conversation
Signed-off-by: HiFiPhile <[email protected]>
thank you, I am thinking, maybe we just remove the struct/bitfield in the register typedef i.e leaving only uint32_t. bitfield struct can be use with local variale only. Will try that when I got sometime, |
Yes we can do let this. Adding a macro makes the thing complicate and losing the interest of bitfields. |
sure, I will do this later if you are busy. I need to fix an racing issue with pio-usb when overclocking rp2350 to 264mhz first :) |
Signed-off-by: HiFiPhile <[email protected]>
Signed-off-by: HiFiPhile <[email protected]>
Signed-off-by: HiFiPhile <[email protected]>
I've updated the refactor. |
Signed-off-by: HiFiPhile <[email protected]>
Signed-off-by: HiFiPhile <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect, thank you. I couldn't done it any better. I change dwc2_ep/channel_count() to inline function to avoid forcing gnu standard. The rest is mostly clean up
Describe the PR
Fix gcc-riscv issue about volatile bitfields are incorrectly accessed using an access width not appropriate to the type of its container.
Tested on
espressif_s3_devkitm
withdevice_info
andcdc_msc_freertos
examples.For the host I've tested an usb key and an FTDI usb-uart.
Disconnection detection needs #2960 to work otherwise device index will go up 1,2,3,4...
Fix #3047