forked from PX4/PX4-Autopilot
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CRC code to every block stored in px4_24xxxx_mtd.c
An EEPROM behind and i2c media is not 100% failure proof. But any errors in e.g. mtd_params reading can cause catastrophic failures in flight. Mitigate any possible errors in px4 mtd_params reading by adding crc code to every page on EEPROM In addition: - Read every block into a temporary buffer before copying to clients buffer; this fixes some issues with memory protected builds when writing directly to user buffers from i2c driver interrupt handler - If a read request fails, don't return any partially filled buffer to user Signed-off-by: Jukka Laitinen <[email protected]>
- Loading branch information
Showing
2 changed files
with
33 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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