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

[Gen3] Fixes HAL_USB_USART_Send_Data() returning incorrect values #1787

Merged
merged 2 commits into from May 20, 2019

Conversation

@avtolstoy
Copy link
Member

commented May 20, 2019

Problem

HAL_USB_USART_Send_Data() should report the number of bytes scheduled for transmission, i.e. put into TX buffer, and shouldn't care about how many bytes were actually transmitted to the host. Currently it does both depending on the internal state.

Solution

Modify usb_uart_send() to simply report the number of bytes put into TX buffer.

This PR also fixes line-endings of usb_hal_cdc.c, please ignore the second commit during the review or set GitHub to ignore whitespace changes.

Steps to Test

The easiest way to reproduce the issue is to put the device into listening mode, and run s command multiple times. The responses should be the same, there should be no data loss.

Example App

N/A

References

N/A


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

  • [bugfix] [Gen3] Fixes HAL_USB_USART_Send_Data() returning incorrect values #1787

@avtolstoy avtolstoy added the bug label May 20, 2019

@avtolstoy avtolstoy added this to the 1.2.0-rc.1 milestone May 20, 2019

@avtolstoy avtolstoy requested review from sergeuz and technobly May 20, 2019

@technobly
Copy link
Member

left a comment

@avtolstoy avtolstoy merged commit 5983df4 into develop May 20, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@avtolstoy avtolstoy deleted the fix/gen3-usb-cdc-write branch May 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.