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

Fix bug in writeBuffer #36

Merged
merged 1 commit into from
Dec 9, 2019
Merged

Fix bug in writeBuffer #36

merged 1 commit into from
Dec 9, 2019

Conversation

mzero
Copy link
Contributor

@mzero mzero commented Dec 3, 2019

fixes #34

…he page boundary.

If the initial address to write to isn't on a page boundary, than the first chunk to write
must be smaller to only write to the end of that page.

Minor additional fix: toWrite was a uint16_t, but all calculations in this module are done
uint32_t, and the writeMemory() expects uint32_t as well.
@mzero
Copy link
Contributor Author

mzero commented Dec 3, 2019

The indenting in this file is a mad mix of tabs, spaces, and in a few cases tabs and spaces on the same line! I used spaces on these lines as that seems to be the prevailing wind. It lines up correctly when viewed with tabstop=2 (which seems to be how the file was authored). The github diff may look odd.

Copy link
Member

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect, thanks for the fix

@hathach hathach merged commit 050813a into adafruit:master Dec 9, 2019
@hathach
Copy link
Member

hathach commented Dec 9, 2019

The indenting in this file is a mad mix of tabs, spaces, and in a few cases tabs and spaces on the same line! I used spaces on these lines as that seems to be the prevailing wind. It lines up correctly when viewed with tabstop=2 (which seems to be how the file was authored). The github diff may look odd.

yeah, I mostly use spaces instead of tab, 1 indent = 2 spaces. But don't worry about that, it is not important at all. Thank you for the fix

@mzero mzero deleted the writeBuffer branch January 14, 2020 04:41
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.

writeBuffer fails with non-page aligned addresses
2 participants