summaryrefslogtreecommitdiff
path: root/src/drivers
Commit message (Collapse)AuthorAge
...
* altos: Initialize MPU6000 CS pin for SPI modeKeith Packard2013-05-15
| | | | | | Without this, we can't talk to the chip very well Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: gps serial routines are called ao_gps_*, not ao_ublox_*Keith Packard2013-05-15
| | | | | | | This caused the u-blox driver to use serial port 1 instead of the project-specified serial port. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Give u-blox 3 seconds after boot before we bug itKeith Packard2013-05-15
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add 'g' command to ublox GPS code.Keith Packard2013-05-15
| | | | | | | | Take the gps_dump function from ao_gps_skytraq.c and move it to a new file so it can be shared with the u-blox driver. That affects every skytraq and u-blox user as they need to include the new file. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Set u-blox navigation settingsKeith Packard2013-05-14
| | | | | | | Airborne mode, < 4g (as good as it gets) Only use 3D fixes (2D isn't very useful) Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use symbolic names for ublox packet idKeith Packard2013-05-14
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Struct used for u-blox testing had lat/lon swappedKeith Packard2013-05-13
| | | | | | | The structs in ao_gps_ublox.h are used only by the test framework, but it's useful to have that look right anyways. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add U-Blox GPS driverKeith Packard2013-05-13
| | | | | | Uses binary mode. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Elide M25 debug output from storage info commandKeith Packard2013-05-07
| | | | | | | This is just chip-specific info that no UI actually needs. It takes a bunch of ROM to write it though, making TeleMetrum not have much space left. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Set APRS deviation to 3kHzKeith Packard2013-05-07
| | | | | | | | I finally found a bunch of references to APRS on the net and they all appear to assume a 3kHz deviation. Let's see if this works better with Yaesu radios. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Reduce stack usage of FAT driver and loggerKeith Packard2013-05-07
| | | | | | | | Move some large stack arrays to static storage. Also eliminates some printf error messages which don't seem that useful except for debugging. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make cc1120 driver return false on recv timeoutKeith Packard2013-05-07
| | | | | | Was returning an uninitialized value, which was often not zero Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Reconfigure CC1120 receiver to match our usageKeith Packard2013-05-07
| | | | | | | Open up the AGC to the full range. Set the AGC ref based on our receive BW (100kHz). Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Compute "real" RSSI value in radio code as neededKeith Packard2013-05-07
| | | | | | | | | Instead of dragging around the weird CC1111 RSSI values, just compute a dBm value in a signed 8-bit integer, ao_radio_rssi. Use that everywhere we need RSSI internally. We leave the weird CC1111 value in the packet reply as that's what the host expects. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow LCD segments to not be multiplexed across digitsKeith Packard2013-05-07
| | | | | | | This allows each LCD segment to be individually configured as to which COM and which SEG drives it, permitting maximum flexibility in wiring. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clear any broken cc1120 TX fifo bits before transmittingKeith Packard2013-05-07
| | | | | | | | This just goes and clears the transmitter before using it, just in case it got wedged somehow. It also clears the bits while waiting for the radio to go idle, otherwise it'd never make it. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make cc1120 driver wait for TX finishedKeith Packard2013-05-07
| | | | | | | | | | Otherwise, we may come in and try to use the radio again too quickly, causing it to go into a TX fifo error state. This change watches the MARC status until the transmitter is explicitly marked as finished. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Provide timeout value to ao_radio_recvKeith Packard2013-05-07
| | | | | | | | | Instead of using ao_alarm around calls to ao_radio_recv, provide an explicit timeout value as needed by radio functions with more complicated system interaction than the cc1111. The timeout is 8 bits of clock ticks. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add TeleMega v0.3 supportKeith Packard2013-04-25
| | | | | | Includes adding SPI support to the MPU6000 driver Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add MR25 everspin MRAM driverKeith Packard2013-04-25
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make SD card driver compile without radio supportKeith Packard2013-04-25
| | | | | | | | The SD card driver blocks the radio when trying to access the card as that operation appears very sensitive to RFI. This fix makes the driver work when there *isn't* a radio driver in the same device. Signed-off-by: Keith Packard <keithp@keithp.com>
* name change from MegaMetrum to TeleMegaBdale Garbee2013-04-22
|
* altos: Make sure the packet format is set reasonably for radio testKeith Packard2013-04-12
| | | | | | Dunno if this matters, but it might as well be set reasonably Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't include bufio debug commands by defaultKeith Packard2013-04-12
| | | | | | We shouldn't need these Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Stick a mutex around FAT operationsKeith Packard2013-04-12
| | | | | | This allows the command line and logging operations to occur safely in parallel Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Delay while waking up SD card a bitKeith Packard2013-04-12
| | | | | | | | This seems to make bringing the card from idle to ready mode more reliable. If you spam the card with requests, it will eventually whinge and shut down communications. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Create telebt-v1.0 product. Remove old telebt productsKeith Packard2013-04-08
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Try RDF mode for TX calibrationKeith Packard2013-04-06
| | | | | | | | Trying to get the radio to stop modulating the carrier when calibrating the radio, we'll try RDF mode which says no preamble or sync data. This might shift the frequency though? Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Shorten SD initialization timeouts.Keith Packard2013-04-02
| | | | | | This makes failure when no card is present much quicker. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Horrible kludge -- disable radio while talking with SD cardKeith Packard2013-04-01
| | | | | | | The SD card really doesn't like the RFI generated by our enormous radio, so just lock the radio out while working with the card. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Retry SD card I/O. Use time for timeouts instead of countsKeith Packard2013-04-01
| | | | | | | | | | Sometimes I/O operations may fail; give the card a chance and retry the operation in case it works the next time. Replace the loop counts with loops that check the clock so that they'll have consistent timeouts even if the CPU or SPI speed changes. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Support open on multiple simultaneous FAT filesKeith Packard2013-04-01
| | | | | | | Need to be able to see the contents of a log file, even if the logger is running. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make sure FAT cluster allocation works for size zero filesKeith Packard2013-04-01
| | | | | | | There were some rounding errors mis-computing the number of clusters needed, and the logic to figure out how to re-connect a chain was broken. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: let FAT tracing work in ao_fat_test as neededKeith Packard2013-04-01
| | | | | | | This allows the FAT DBG hooks to be enabled even if some other module turned DBG off. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Flush the on-board mega log after every sample interval.Keith Packard2013-04-01
| | | | | | | | SPI flash parts don't need flushing, but the SD card does. Make sure the SD card contents are sane after every logging interval has passed by flushing all dirty blocks to the device. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Create the log file if it doesn't already existKeith Packard2013-03-31
| | | | | | open will return failure unless the file already exists. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make ao_fat_readdir return real error values instead of 1/0Keith Packard2013-03-31
| | | | | | | This way, we can distinguish between 'something bad happened' and 'you're at the end of the directory'. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Increase SD card timeout at startup timeKeith Packard2013-03-31
| | | | | | | Sometimes the SD card takes 'a while' to go into idle mode at first power up. Just hang around waiting for a long time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix command-line FAT filename parsingKeith Packard2013-03-31
| | | | | | Pad extension with spaces Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Unmount file system after each testing pass in ao_fat_testKeith Packard2013-03-31
| | | | | | Otherwise, we use stale data and 'bad things' happen. Signed-off-by: Keith Packard <keithp@keithp.com>
* 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>