Peter Barker
723c37bcf7
DataFlash: backend/frontend split
10 years ago
Daniel Frenzel
74460cd526
DataFlash: Delete unused BufferRead function
...
Signed-off-by: Daniel Frenzel <dgdanielf@gmail.com>
11 years ago
Andrew Tridgell
1e2214f8d1
DataFlash: fix for HAL_GPIO_*
11 years ago
Andrew Tridgell
e6bafa2d8f
DataFlash: added structures to Init() of dataflash
...
this will allow the get_log_data() call to add FMT headers if a log
has wrapped
11 years ago
Andrew Tridgell
97b7130bb9
libraries: update license header to GPLv3
...
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
12 years ago
Andrew Tridgell
987cdaf3e1
DataFlash: make it safe to do DataFlash logging from timers
...
this uses a non-blocking semaphore take if we are in a timer
process. Useful for logging failsafe events
12 years ago
Andrew Tridgell
20825cc903
DataFlash: removed the byte and word based interfaces
...
simplifing ready for PX4 flash logging
12 years ago
Andrew Tridgell
f3005c4267
DataFlash: use bulk SPI transfer() method
...
this reduces the per-byte overhead of flash logging to about 3.9 usec
12 years ago
Andrew Tridgell
28a0ba6c4a
DataFlash: added block based dataflash writes
...
these are about 10x faster than the old writes
12 years ago
Pat Hickey
390e96311e
DataFlash: change to new style Semaphore library
12 years ago
Pat Hickey
aaffd9d96e
DataFlash: APM2 ported to AP_HAL SPIDeviceDriver
12 years ago
Pat Hickey
cc699a2a4e
DataFlash: conform to ordinary stdint types
...
* s/unsigned char/uint8_t/g
* changed all type 'byte' to uint8_t
12 years ago
Andrew Tridgell
17c115d2aa
SITL: don't define __AVR_ATmega2560__ on desktop build
...
this allows us to properly separate the desktop build in the code
12 years ago
rmackay9
785d9ca6a7
DataFlash_APM2: renamed semaphore to spi3_semaphore to make it more obvious which semaphore is required.
12 years ago
Pat Hickey
605f89fa69
DataFlash_APM2: private AP_Semaphore* rather than use extern AP_Semaphore_spi3
...
The AP_Semaphore* argument to the constructor can be null (and is by
default for compatibility). Semaphore is only used when non-null.
13 years ago
rmackay9
b9963f5b5c
DataFlash: modified to use AP_Semaphore for SPI3 bus when required.
...
Also fixed test sketch which seemed broken.
13 years ago
uncrustify
eb9d6b259b
uncrustify libraries/DataFlash/DataFlash_APM2.cpp
13 years ago
rmackay9
2b24e422de
DataFlash: revert delay callbacks to use "unsigned long"
13 years ago
rmackay9
20cb2e56a0
DataFlash: change "unsigned long" to "uint32_t" in callback functions
13 years ago
Jason Short
bd91215770
Dataflash fix for missing card error
13 years ago
Jason Short
ce2a608706
Dataflash Logs : Fixed block erase on APM2
...
Byte order for 512 vs 528 was reversed.
13 years ago
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
13 years ago
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
13 years ago
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.
13 years ago
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).
13 years ago
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.
13 years ago
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
13 years ago
Andrew Tridgell
bd9488f1e4
DataFlash: fixed sense of card detect
13 years ago
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
13 years ago
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.
13 years ago
Andrew Tridgell
02f25ac36d
libraries: rename purple to APM2
13 years ago
Andrew Tridgell
2b7e0c8494
DataFlash_Purple: added new logging methods needed for ArduPlane
...
builds, but not tested yet
13 years ago
Andrew Tridgell
bb7af8c15a
dataflash: fixed datatypes to be compatible with desktop build
13 years ago
Pat Hickey
82e7551c90
purple: rework DataFlash to separate purple and APM1 hardware support
...
the purple support is still a work in progress, but the APM1 support
should be fine
13 years ago