Commit Graph

26 Commits

Author SHA1 Message Date
Andrew Tridgell 0f079deebf HAL_PX4: Storage::_timer_tick is an override 2018-02-07 20:33:45 +11:00
Andrew Tridgell 979ee67c19 HAL_PX4: cope with failed flash writes
we need to recover from possible bad flash
2018-01-15 11:46:02 +11:00
Andrew Tridgell 23480a92ad HAL_PX4: only include parts needed for build
allow for external USE_FLASH_STORAGE define in build
2016-12-02 09:58:36 +11:00
Andrew Tridgell 6bc0c76d54 HAL_PX4: update for new AP_FlashStorage API
allow flash sector erase while disarmed
2016-12-02 09:49:40 +11:00
Andrew Tridgell a66924422f HAL_PX4: implement optional flash backend for storage
this allows the last two flash sectors to be used as storage for
parameters, waypoints etc.

A change to the bootloader to not erase the last two sectors is needed
2016-12-02 09:49:39 +11:00
Andrew Tridgell b0832e6c15 HAL_PX4: factor out storage functions
ready for multiple backends
2016-12-02 09:49:39 +11:00
Andrew Tridgell d4f679f954 HAL_PX4: removed support for old storage files on microSD 2016-12-02 09:49:39 +11:00
Andrew Tridgell 4cfd63c30a HAL_PX4: refactor storage to use bitmask class 2016-12-02 09:49:39 +11:00
Lucas De Marchi 28f67f0947 AP_HAL_PX4: replace header guard with pragma once 2016-03-16 18:40:41 +11:00
Andrew Tridgell 7fede90df3 HAL_PX4: work around a bus locking issue on Pixracer
Pixracer has FRAM on the same bus as the ms5611 and the FRAM ramtron
driver does not use the same locking mechanism as other px4 SPI
drivers. We need to disable interrupts during FRAM transfers to ensure
we don't get FRAM corruption
2016-02-23 16:34:06 +11:00
Lucas De Marchi 0c3733601b AP_HAL_PX4: use init() method without arguments
Override the init() method from parent class that doesn't have a
parameter since it's not used here.
2015-12-02 14:49:11 -02:00
Gustavo Jose de Sousa 08333f1ffe AP_HAL_PX4: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:28:43 +10:00
Andrew Tridgell c864f3eed5 HAL_PX4: enable full storage size on PX4 2014-08-13 18:46:45 +10:00
Andrew Tridgell d40d0f6aec AP_HAL: removed old storage type read/write functions
not needed any more
2014-08-13 18:46:44 +10:00
Andrew Tridgell 64fbadcc21 HAL_PX4: use eeprom on PX4 FMUv1 as well
this means we no longer store params on SD at all
2014-01-15 19:33:13 +11:00
Andrew Tridgell 626086063e HAL_PX4: added a signature to FRAM
this makes for more reliable update
2014-01-14 15:06:51 +11:00
Andrew Tridgell b88bb0751c HAL_PX4: added support for MTD (FRAM) parameters
this allows us to store parameters and waypoints in FRAM, and
auto-upgrade from microSD
2014-01-14 12:46:26 +11:00
Andrew Tridgell e78e35f3bd HAL_PX4: try to use uppercase names on NuttX microSD card 2014-01-14 12:46:26 +11:00
Andrew Tridgell 9b3c54fc39 PX4: ensure storage buffer is DMA aligned
this helps for boards which use DMA for FAT IO
2013-08-30 13:01:33 +10:00
Andrew Tridgell 2316c3bd11 AP_HAL: make storage->write_block() take a const pointer 2013-06-04 14:02:13 +10:00
Andrew Tridgell e4a204d2f6 HAL_PX4: reopen storage file on any IO error 2013-01-27 13:39:11 +11:00
Andrew Tridgell 0e79b93289 HAL_PX4: added storage performance counters 2013-01-24 15:04:57 +11:00
Andrew Tridgell 6cf1d5e1ff HAL_PX4: handle IO errors on microsd
this should handle EINTR gracefully
2013-01-24 15:04:57 +11:00
Andrew Tridgell c9799fb2b7 HAL_PX4: writing more than 512 bytes at a time can cause IO errors
the vfat fs in NuttX is really very picky!
2013-01-23 16:54:44 +11:00
Andrew Tridgell 952df2fced HAL_PX4: new buffered storeage driver for microsd cards
this does all IO in the timer thread, avoids writes that don't change
data, and does all writes in multiples of 128 byte chunks. This should
be about as friendly to SD cards as we can get.
2013-01-23 16:37:40 +11:00
Andrew Tridgell ac7117245a HAL_PX4: added a storage driver
stores 'eeprom' to a sdcard file
2013-01-03 19:35:05 +11:00