-
Notifications
You must be signed in to change notification settings - Fork 7.6k
I2C fix READ of zero bytes hardware hang #2294
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
daea578
Add APB change callbacks and move cpu code to own file
me-no-dev f7c56e3
Properly set esp_timer and FreeRTOS tick dividers
me-no-dev 67d5ebc
Improve updated devisors
me-no-dev 55c725f
No need to update REF_TICK yet
me-no-dev 344c76d
Add initial handling for UART baud change
me-no-dev 0532c88
fix uartWriteBuf and uartDetectBaudrate
me-no-dev 7443fe2
trigger callbacks even when APB did not change
me-no-dev c31ea22
toggle UART ISR on CPU change
me-no-dev 8b6483d
add XTAL freq getter and add cpu freq validation
me-no-dev 276faf5
Support CPU frequency changes in I2C
946e4dc
I2C fix READ of zero bytes hardware hang
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this can possibly be simplified to:
NULL is defined as zero..
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.
@atanisoft yes it could be obfuscated down to your concise example. I like to write code such that assumptions are minimized. I have found that I make more mistakes when I try to rely on assumptions.
The
!i2c
starts off wrong in my mind.!
(not) starts right off describing a boolean operation, then up comes a pointer? So, my mind says "if not a pointer" What? What's NOT a pointer? Oh!, this construct means "if the value of i2c is not zero" well why don't you just write it that way, a few extra characters in a source file don't mean squat when the hard drive is measured in terabytes.Chuck.