Commit Graph

12 Commits

Author SHA1 Message Date
Andrew Tridgell d2c9db3f1f AP_FlashStorage: fixed build error with -O0 2019-05-15 15:33:48 +10:00
Andrew Tridgell 6e1e89bb70 AP_FlashStorage: fixed a corruption bug
many thanks to @sh83 for tracking down this bug. When write_all() is
called with non-zero offset in init it ends up calling write with an
invalid offset, triggering a full reset

This fixes issue #10874
2019-03-28 14:33:44 +11:00
Andrew Tridgell 91e5f56242 AP_FlashStorage: fixed a race condition
fixes #7670

thanks to night-ghost for the bug report
2019-01-21 20:59:00 +11:00
Peter Barker 2ed8118cda AP_FlashStorage: adjust example so it does not exit 2018-09-19 22:40:20 -07:00
Andrew Tridgell 985a319c42 AP_FlashStorage: fixed build of example on small memory boards 2018-07-11 10:07:38 +10:00
Andrew Tridgell 14cf54b2f0 AP_FlashStorage: fixed build warning 2018-05-07 11:43:23 +10:00
Andrew Tridgell 1513246040 AP_FlashStorage: fixed two bugs found by night-ghost
this fixes two issues found by night-ghost. The first occurs if a 16
bit flash write is not atomic and only the first byte is written. Then
we could end up declaring the data invalid on reboot and erasing.

The second is a race in switching sectors. If power off occurs at the
wrong time we would trigger en erase on reboot.
2018-02-02 14:19:12 +09:00
Andrew Tridgell 3b5f66fd9f AP_FlashStorage: fixed size of flash storage 2018-01-15 11:46:02 +11:00
Andrew Tridgell 0bfbc4bf72 AP_FlashStorage: added re_initialise() API 2018-01-15 11:46:02 +11:00
Andrew Tridgell bfd137e36a AP_FlashStorage: added erase_ok callback
this allows for simpler operation when application wants to allow
erase while disarmed.
2016-12-02 09:49:40 +11:00
Andrew Tridgell 0e00c3cf9b AP_FlashStorage: reduced sector size for example
allows it to fit in SRAM on PX4
2016-12-02 09:49:40 +11:00
Andrew Tridgell fc21e0f16f AP_FlashStorage: a flash storage driver
this will allow for a storage backend using flash sectors in a log
structure
2016-12-02 09:49:38 +11:00