rmackay9
2428cc647c
DataFlash_APM1: use spi_semaphore to avoid conflicts with optical flow
2012-10-18 17:03:50 +09:00
rmackay9
5f2c900797
DataFlash_APM2: renamed semaphore to spi3_semaphore to make it more obvious which semaphore is required.
2012-10-18 17:00:05 +09:00
Pat Hickey
0c44d02239
AP_DataFlash_test wibble
2012-10-09 11:39:09 -07:00
Pat Hickey
00243e3c6c
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.
2012-10-09 11:38:52 -07:00
rmackay9
d754804135
DataFlash: modified to use AP_Semaphore for SPI3 bus when required.
...
Also fixed test sketch which seemed broken.
2012-10-06 12:41:50 +09:00
uncrustify
d45328c98c
uncrustify libraries/DataFlash/DataFlash.h
2012-08-21 19:19:52 -07:00
uncrustify
a935bf77ce
uncrustify libraries/DataFlash/DataFlash.cpp
2012-08-21 19:19:52 -07:00
uncrustify
0d5ea8cd7f
uncrustify libraries/DataFlash/DataFlash_APM1.h
2012-08-21 19:04:23 -07:00
uncrustify
2ad28632c4
uncrustify libraries/DataFlash/DataFlash_APM2.h
2012-08-21 19:04:23 -07:00
uncrustify
0fd0f46568
uncrustify libraries/DataFlash/DataFlash_APM1.cpp
2012-08-21 19:04:23 -07:00
uncrustify
a32a9bd986
uncrustify libraries/DataFlash/DataFlash_APM2.cpp
2012-08-21 19:04:23 -07:00
uncrustify
97927f5f5a
uncrustify libraries/DataFlash/examples/DataFlash_test/DataFlash_test.pde
2012-08-21 19:04:10 -07:00
rmackay9
cef3e1d732
DataFlash: revert delay callbacks to use "unsigned long"
2012-08-18 20:28:31 +09:00
rmackay9
ba48bffb46
DataFlash: change "unsigned long" to "uint32_t" in callback functions
2012-08-18 19:22:14 +09:00
rmackay9
9973e4ae13
DataFlash: replaced "int" with "int16_t"
2012-08-18 18:31:20 +09:00
Andrew Tridgell
84c39774fa
DataFlash: fixed SITL build
2012-08-17 16:27:19 +10:00
Jason Short
ff32718d9b
Dataflash fix for missing card error
2012-08-16 15:37:28 -07:00
Jason Short
a6b874b591
DataFlash : Removed Chip Erase - relying on Block erase only
2012-08-15 21:04:24 -07:00
Jason Short
44b715af9b
Dataflash Logs : Fixed block erase on APM2
...
Byte order for 512 vs 528 was reversed.
2012-08-15 21:04:24 -07:00
Craig Elder
0534ac12b1
DataFlash: The current method for checking if chip erase worked is producing false positives. We are forcing the block erase until we have a deterministic test method.
2012-07-09 15:23:35 -07:00
Andrew Tridgell
c6ff292721
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
c2fb8a7a98
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
346ca5c865
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
98f3386ea0
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
Doug Weibel
22d2db53d8
Repair dataflash test
2012-01-08 21:29:19 -07:00
Andrew Tridgell
65fbeea6d1
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
089470a671
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
42eb62cc46
DataFlash: fixed sense of card detect
2011-12-28 16:00:48 +11:00
Andrew Tridgell
9f5718bcfa
added in DataFlash.cpp
...
forgot this ....
2011-12-26 19:34:06 +11:00
Andrew Tridgell
dd26ef3089
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
8bf05982ae
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
a9dfc68bc0
libraries: rename purple to APM2
2011-11-25 20:00:19 -08:00
Andrew Tridgell
8e5f64f8b6
DataFlash_Purple: added new logging methods needed for ArduPlane
...
builds, but not tested yet
2011-11-25 20:00:18 -08:00
Andrew Tridgell
49b768f2f3
DataFlash_APM1: re-add defines lost from merge
2011-11-25 20:00:18 -08:00
Andrew Tridgell
01cd9cc6d6
dataflash: fixed datatypes to be compatible with desktop build
2011-11-25 20:00:17 -08:00
Pat Hickey
afef359ee9
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
2011-11-25 20:00:16 -08:00
Doug Weibel
a11ea12ca8
Change to logging file system.
...
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
2011-11-17 21:25:51 -07:00
Andrew Tridgell
5410dff523
DataFlash: use CPU independent data types
...
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
2011-11-07 22:56:13 +11:00
James Goppert
ac3e73f5c0
Optional recursion added.
2011-09-30 17:17:51 -04:00
James Goppert
112d5e9531
Improvements to cmake.
2011-09-29 21:23:26 -04:00
James Goppert
3a00ceb593
Added ArduBoat/ ArduRover/ and APO library.
2011-09-29 14:12:15 -04:00
unknown
9f028bb5a0
Adding CMake support
2011-09-14 15:44:55 +02:00
tridge60@gmail.com
7ac3544573
dataflash: fixed some compiler warnings
...
tmp is not needed
Pair-Programmed-With: Mike Smith
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3230 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-09-04 06:39:14 +00:00
rmackay9@yahoo.com
b930b892c2
DataFlash library - changed to use standard arduino SPI library
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2928 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-19 23:00:18 +00:00
rmackay9@yahoo.com
3b87530b74
DataFlash - backed out recent changes to make it use SPI while I figure out the cause of some people's compile errors
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1936 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-05-01 02:27:18 +00:00
rmackay9@yahoo.com
3ef57bf3bf
DataFlash - modified to use Arduino SPI interface instead of directly using registers. Also moved "dataflash_CS_inactive" calls to end of functions instead of beginning so that it doesn't monopolize the SPI bus.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1931 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-04-30 03:25:31 +00:00
mich146@hotmail.com
f76f81cfd9
update dataflash for 528 and 512 byte pages
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1906 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-04-18 11:19:31 +00:00
james.goppert@gmail.com
58118ef9f0
Eclipse makefile support for examples.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1860 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-04-09 19:38:12 +00:00
jasonshort
6512531bf9
updated formatting, baud
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1642 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-02-14 00:43:11 +00:00
deweibel@gmail.com
343c6565db
Add FinishWrite method to the DataFlash class to support using an index system.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1575 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-30 01:53:04 +00:00