Commit Graph

14 Commits

Author SHA1 Message Date
rmackay9 2b24e422de DataFlash: revert delay callbacks to use "unsigned long" 2012-08-18 20:28:31 +09:00
rmackay9 20cb2e56a0 DataFlash: change "unsigned long" to "uint32_t" in callback functions 2012-08-18 19:22:14 +09:00
Jason Short bd91215770 Dataflash fix for missing card error 2012-08-16 15:37:28 -07:00
Jason Short ce2a608706 Dataflash Logs : Fixed block erase on APM2
Byte order for 512 vs 528 was reversed.
2012-08-15 21:04:24 -07:00
Andrew Tridgell dd24330645 DataFlash: fallback to BlockErase if ChipErase fails
The errata on the APM2 dataflash chip says that ChipErase may not work
on some chips
2012-07-04 12:42:46 +10:00
Andrew Tridgell fc73fd6531 DataFlash: use ChipErase() instead of PageErase() on all pages
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
2012-05-22 19:29:02 -07:00
rmackay9 c45b124cbe DataFlash_APM2 - moved CS_inactive call (which disables the dataflash) from the beginning to the end of all methods. This means the dataflash does not monopolize the SPI bus.
Also formatting changes to use tab instead of space. Sorry, should have done this as a separate check-in to the above changes.
2012-04-21 20:14:45 +09:00
Randy Mackay ed19c25a97 Arduino 1.0 - changed all #includes of "WProgram.h", "wiring.h" and "WConstants.h to "Arduino.h".
Modified FastSerial's write function to return size_t (number of bytes written).
2012-01-28 12:25:47 +09:00
Andrew Tridgell 880c7e6411 DataFlash: cope with older dataflash chips
some of the APM2 DataFlash cards use an older chip with only 4096
pages, and a density code of 6. Doug has one of these.
2012-01-04 16:16:35 +11:00
Andrew Tridgell 5e4f66e525 DataFlash: moved high level logging logic to library
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
2011-12-28 16:00:48 +11:00
Andrew Tridgell bd9488f1e4 DataFlash: fixed sense of card detect 2011-12-28 16:00:48 +11:00
Andrew Tridgell 977326e991 dataflash: reworked classes to move most code to parent class
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
2011-12-26 19:17:11 +11:00
Andrew Tridgell 13b2ddcbe1 dataflash: fixed APM2 flash logging
we had log wrap disabled on APM2, and also had the wrong log size. The
mainline code assumed 4096, but it is 8192 pages long.
2011-12-26 19:17:11 +11:00
Andrew Tridgell 02f25ac36d libraries: rename purple to APM2 2011-11-25 20:00:19 -08:00