summaryrefslogtreecommitdiff
path: root/src/drivers
Commit message (Collapse)AuthorAge
...
* altos: Don't add fat commands when building ao_fat_testKeith Packard2013-03-31
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Do not release interrupts from any pollchar functionKeith Packard2013-03-31
| | | | | | | | | | | getchar relies on interrupts being blocked across the pollchar calls and into the sleep call or it may go to sleep with data pending. This prefixes all pollchar functions with _ to indicate that they are to be called with interrupts blocked and eliminates all interrupt manipulation calls from within the pollchar functions. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add sdcard read/write tracingKeith Packard2013-03-31
| | | | | | This just dumps info in trace mode about read and write commands Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Move fat mount information to separate command.Keith Packard2013-03-31
| | | | | | | This makes the mount report precise error information and then prints that with the 'M' command. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Disable CC115L debug commandsKeith Packard2013-03-31
| | | | | | now that it appears to work, leave these disabled by default Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add SD card writing functionKeith Packard2013-03-31
| | | | | | | Now that the FAT code seems to be operational, go back and add SD writing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add logging and telem to telegpsKeith Packard2013-03-30
| | | | | | | | | | | | This turns on telemetry, APRS, RDF and data logging for telegps. Data is logged as soon as GPS has a date to create the right filename, using files of the form YYYYMMDD.LOG which just barely fits in a FAT filename. Telemetry/RDF/APRS are all separately controllable. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Export ao_fat_sync and ao_fat_full functionsKeith Packard2013-03-30
| | | | | | | ao_fat_sync() flushes the bufio data to disk along with any fsinfo changes. ao_fat_full() returns whether the file system is full. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Lock cc115l radio mutex when using global radio valuesKeith Packard2013-03-30
| | | | | | | This moves the locking up above the global state variable uses so that multiple radio users (as if we had any) won't collide. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Configure cc115l sync byte count for each radio modeKeith Packard2013-03-30
| | | | | | two sync bytes for packet mode, disable sync for rdf/aprs mode. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Get CC115L radio working.Keith Packard2013-03-29
| | | | | | | | | | | | | | | | This involved figuring out which GPIO signal would reliably indicate that the transmitter was finished; I ended up using the PA_PD bit for this. This also converts all of the radio users to the long packet support as the CC115L has only a 64-byte fifo, not large enough to hold either an RDF tone or a regular AltOS telemetry packet. This also renames the public API for sending APRS packets from ao_radio_send_lots to ao_radio_send_aprs, which is at least more accurate. The workings of that API haven't changed, just the name. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add temporary RF power settingsKeith Packard2013-03-29
| | | | | | | | | | These expose the raw cc115l and rfpa0133 register settings so that we can calibrate them against measured power outputs. I've tested them to verify that they change how much power the board consumes, so they're clearly doing something... Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add FAT32 support. And lots more testing.Keith Packard2013-03-29
| | | | | | | | Generalizes the FAT code to deal with either 16-bit or 32-bit versions. The testing code now runs over a variety of disk images to check for compatibility on all of them. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: seek forward on FAT cluster chain instead of restartingKeith Packard2013-03-28
| | | | | | | | This improves sequential file performance by taking advantage of any previous cached cluster/offset pair and starting from there when the cluster changes rather than starting from scratch at the begining again. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add a simple cache for the FAT position->cluster computationKeith Packard2013-03-28
| | | | | | | This improves read/write performance with large files by not re-walking the cluster chain for every operation Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up fat driver API. Improve fat testKeith Packard2013-03-28
| | | | | | | | Make FAT api provide reasonable error return values, change the tests to write and then read a pile of files, checking that the contents are correct (using md5sum). Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add sanity checking to busy counts in bufio driverKeith Packard2013-03-28
| | | | | | Make sure the busy counts don't underflow or overflow. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add SDCARD and FAT16 filesystem supportKeith Packard2013-03-27
| | | | | | | This adds a fairly primitive FAT16 file system implementation along with support for SD cards. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Improve CC115L driver. Generates carrier now.Keith Packard2013-03-26
| | | | | | Still no data, but at least the carrier comes up on frequency now. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add RFPA0133 amplifier driverKeith Packard2013-03-26
| | | | | | No configuration of power level yet, just the bare driver. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add cc115l driver (untested)Keith Packard2013-03-24
| | | | | | Includes support for sending telemetry, RDF and APRS tones Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/driver: Make HMC5883 driver build againKeith Packard2013-02-24
| | | | | | Adapt to changes in OS interfaces Signed-off-by: Keith Packard <keithp@keithp.com>
* Merge branch 'telescience-v0.2'Keith Packard2013-02-24
|\
| * altos: Change CC1120 SPI speed to 4MHz.Keith Packard2013-01-13
| | | | | | | | | | | | | | | | Most of the chip can run at 8MHz, but extended register access is limited to 6.1MHz. Instead of pushing things, just run the SPI bus at 4MHz. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Document which MPU6000 revs have broken accel valuesKeith Packard2013-02-04
|/ | | | | | | | | From Tridge -- MPU6000 rev C4 and C5 are broken, having accelerometer values in the wrong range. This commit just adds comments which note this; experimentation will be required to actually sort out what's going on. Signed-off-by: Keith Packard <keithp@keithp.com>
* Merge remote-tracking branch 'origin/micropeak-logging'Keith Packard2013-01-10
|\
| * Allow CC1120 to sit on other SPI bussesKeith Packard2012-12-31
| | | | | | | | | | | | | | | | Reading the incoming data bypasses the SPI API and touches the SPI data register directly; which port that is needs to be specified in the pins file Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Time out reading packet data from cc1120 after 100msKeith Packard2013-01-10
|/ | | | | | | | | | Sometimes the radio will give a spurious wakeup indicating that a preamble seems to have arrived, but no packet data will appear. In this case, abandon the packet reception and go back to waiting for a preamble again. This releases the SPI bus for other users and also avoids missing packets. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix cc1120 debug code to build on megadongleKeith Packard2012-12-28
| | | | | | RDF function had changed, and APRS isn't available on megadongle. Signed-off-by: Keith Packard <keithp@gag.com>
* altos: Wire up another CC1120 GPIO to get MARC status changesKeith Packard2012-12-16
| | | | | | | | | | | | | When the radio drops out of RX or TX mode due to an error, it changes the MARC status, and sends pulse down a configured GPIO. Use this to tell when something 'bad' happened during TX or RX so that we can recover from losing the SPI bus in the middle of transmission or reception. Without this, the radio would change state and we'd never know, leaving the radio code waiting for an interrupt that would never arrive. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Document what HAS_BOOT_RADIO does in the m25 driverKeith Packard2012-12-16
| | | | | | | HAS_BOOT_RADIO causes the m25 driver to abort any ongoing receive in case that is holding the SPI bus. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Round APRS data correctlyKeith Packard2012-12-16
| | | | | | | Apply rounding once at the start of the computation, then truncate after that. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix aprs test to not allow callsign configurationKeith Packard2012-12-07
| | | | | | There's no configuration to take a callsign from... Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use configured callsign in APRS packetsKeith Packard2012-12-07
| | | | | | Instead of hard-coding my own call sign... Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make APRS interval configurableKeith Packard2012-12-07
| | | | | | | This provides a separate configuration value for APRS, allowing the interval between APRS reports to vary. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix up APRS packet sending code in cc1120 driverKeith Packard2012-12-07
| | | | | | | | This fixes the FIFO management, ensuring that the data are streamed into the radio fast enough to keep the packet continuous. Sounds like it works, but testing with an actual APRS receiver is required. Signed-off-by: Keith Packard <keithp@keithp.com>
* Merge branch 'master' into aprsKeith Packard2012-12-07
|\
| * altos: fix functions calling pollchar to use 'int' to hold the valueKeith Packard2012-12-07
| | | | | | | | | | | | | | | | AO_READ_AGAIN doesn't fit in a char anymore now that stdio is 8-bit clean, everyone using pollchar must use an 'int' variable to capture the whole value from pollchar. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Hook up APRS to telemetry loopKeith Packard2012-12-06
| | | | | | | | | | | | Send APRS packet once every 2 seconds Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Hook APRS up to the radioKeith Packard2012-12-06
| | | | | | | | | | | | | | This adds an arbitrary-length packet writing function to the radio code. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Prepare APRS for use within altos itselfKeith Packard2012-12-05
| | | | | | | | | | | | | | Make all variables static, const-ify constants, change the public name of the single entry point. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Start restructuring APRS code to create and send packetsKeith Packard2012-12-05
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Remove a bunch of time bits from the APRS codeKeith Packard2012-12-05
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Remove APRS sine-wave tableKeith Packard2012-12-05
| | | | | | | | | | | | | | We're generating a lovely square wave, which appears to be decoded just fine thankyouverymuch. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: More APRS trimmingKeith Packard2012-12-05
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Remove more unused APRS codeKeith Packard2012-12-05
| | | | | | | | | | | | Getting down to a reasonable amount of code. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Reduce printf calls in APRS packet generationKeith Packard2012-12-05
| | | | | | | | | | | | Merge all of the data into a single printf call Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Strip out everything but the basic position reporting from APRSKeith Packard2012-12-05
| | | | | | | | | | | | | | Any useful data will be sent over the digital link; APRS is strictly for position tracking Signed-off-by: Keith Packard <keithp@keithp.com>
* | Signed-off-by: Keith Packard <keithp@keithp.com>Keith Packard2012-12-05
| | | | | | | | | | | | altos: Switch APRS to standard position reporting form Stop using NMEA sentences for position
* | altos: Add missing ao_aprs.h fileKeith Packard2012-12-05
| | | | | | | | | | | | This has defines for the planned APRS interface Signed-off-by: Keith Packard <keithp@keithp.com>