This makes the DataFlash erase much faster (about 6 seconds instead of
about 60 seconds).
We need to test and ensure the behaviour is equivalent apart from the
speed
this moves out all the high level logic from ArduPlane/ArduCopter to
the library. It also adds a "config page", as the last page in the
flash. This is used to check if the flash needs erasing. We only erase
now if the DF_LOGGING_FORMAT has changed.
This patch also adds a public CardInserted() method, which is used to
disable logging on APM2 if a dataflash card is not inserted
this moves all the non-hardware specific code to the parent
DataFlash_Class class, keeping the hw specific code much smaller and
simpler.
This should prevent discrepancies creeping in between APM1 and APM2
support again
This commit is somewhat temporary as I have come up with a better scheme and will be modifying this. Just making this commit in case I need to roll back
this ensures that the DataFlash API is consistent for different CPU
architectures, which matters for the Desktop build, and will matter
for ARM and other CPUs later