Skip to content

Clear recv buffer by start byte #68

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

Merged
merged 2 commits into from
Jul 25, 2019
Merged

Conversation

at-wat
Copy link
Member

@at-wat at-wat commented Jul 23, 2019

Sending stream with periodic START_BYTEs without END_BYTE, like following, made the incoming data processing buffer stacked.

	@`@@@@@	@`@@@@@	@`@@@@@	@`@@@@@	@`@@@@@	@`@@@@@	@`@@@@@	@`@@@@@	@`@@@@@	@`@@@@@	@`@@@@@	@`@@@@@	@`@@@@@	@`@@@@@	@`@@@@@	@`@@@

(Some USB host controller or kernel module seems repeating last data after closing device.)

This PR clears buffer if START_BYTE is arrived.

@at-wat at-wat changed the title Clear recv buffer on start byte Clear recv buffer by start byte Jul 23, 2019
@at-wat at-wat self-assigned this Jul 23, 2019
@at-wat
Copy link
Member Author

at-wat commented Jul 25, 2019

Tested on the real system which has the problem on USB host.
It passed total 380 times of try.

Merging.

@at-wat at-wat merged commit 40ec0a3 into master Jul 25, 2019
@at-wat at-wat deleted the clear-recv-buffer-on-start-byte branch July 25, 2019 05:31
@at-wat at-wat mentioned this pull request Jul 25, 2019
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.

1 participant