Skip to content

Fix flash write error handling; clean up safe mode message printing #2381

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
Dec 12, 2019

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Dec 12, 2019

  • nrf_nvm_safe_flash_page_write() was throwing Python exceptions, though it could be called from a non-Python context. Have it return success/failure and have the callers handle the error.
  • Add FLASH_WRITE_FAIL to possible reasons to go into safe mode.
  • Whiled adding FLASH_WRITE_FAIL, redid print_safe_mode_message() so it uses case statements and reduces the length of the messages.

This is a clean-up follow-on to #2376.

@dhalbert dhalbert requested a review from tannewt December 12, 2019 19:38
@dhalbert dhalbert force-pushed the nvm-write-safe-mode-cleanup branch from 387127b to 7889b99 Compare December 12, 2019 19:42
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@tannewt tannewt merged commit bcd03ed into adafruit:master Dec 12, 2019
@dhalbert dhalbert deleted the nvm-write-safe-mode-cleanup branch December 12, 2019 21:38
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.

2 participants