summaryrefslogtreecommitdiff
path: root/src/drivers
Commit message (Collapse)AuthorAge
* 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>
* | altos: Generate all of the APRS messagesKeith Packard2012-12-05
| | | | | | | | | | | | | | Note that two of them are in NMEA form, which some receivers appear not to parse Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Add test scaffolding for APRSKeith Packard2012-12-05
| | | | | | | | | | | | | | | | This moves some test code out of ao_aprs.c and into ao_aprs_test.c, and then adds Makefile fragments to compile and run the resulting program, creating a wav file as output Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Make aprs code output encoded packets to stdoutKeith Packard2012-12-05
| | | | | | | | | | | | | | This generates a .wav file containing a single APRS packet. This has been tested and appears to be successfully decoded by an APRS receiver. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Add Pico Beacon code as ao_aprs.cKeith Packard2012-12-05
|/ | | | | | | | | | | | Pico Beacon hooks a GPS to an AD9954 DDS radio chip with a PIC. It directly synthesizes the necessary AX.25 packets to do APRS reporting. We're going to appropriate the code for use in Mega Metrum to (optionally) broadcast APRS packets. http://ad7zj.net/kd7lmo/aprsbeacon_code.html Signed-off-by: Keith Packard <keithp@keithp.com> (
* altos: Break out GPS speed resetting sequenceKeith Packard2012-12-04
| | | | | | | To set the GPS speed, we delay for 1/2 sec, change speed, then delay for another 1/2 sec. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: shrink ao_companion_status by merging printf callsKeith Packard2012-12-04
| | | | | | | Multiple printf calls are longer than one big one, so merge these together to save some code space Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make skytraq reflashing code try both 9600 and 4800 baudKeith Packard2012-11-30
| | | | | | | This lets it communicate with the ROM code which boots at 4800 baud instead of 9600 baud. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add support for reflashing skytraq GPS chipsKeith Packard2012-11-30
| | | | | | | | | | This simply switches the skytraq port to 115200 baud and then essentially connects it directly to the USB port by forwarding bytes in both directions. Once started, the only way out is to reboot the board. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make stdio 8-bit clean by making pollchar return intKeith Packard2012-11-30
| | | | | | | | | | We were stealing one value (0xff) in the return value from pollchar to indicate 'not ready yet'. Instead of doing that, use the integer value -1 and have pollchar return an int instead of a char. That necessitated cleaning a few other bits to make sure that 0xff wouldn't get promoted to -1 on accident. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: fix cc1120 radio test - state wasn't made staticKeith Packard2012-11-18
| | | | | | so whether the radio got turned on was random. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/micropeak: Run MS5607 at max resolution for micropeakKeith Packard2012-10-30
| | | | | | We've got lots of time, so get the highest resolution baro data available. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Switch drivers to ao_arch_block/release_interruptsKeith Packard2012-10-25
| | | | | | Stop using cli/sei, which are avr-specific Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Replace __critical usage with ao_arch_critical as neededKeith Packard2012-10-25
| | | | | | | | | | | | | sdcc offers __critical as a machine-independent way to block interrupts, but as gcc doesn't, we need to use a compiler-independent construct instead. ao_arch_critical has been around since the AVR port, but some old __critical usages remained. This fixes a bunch of random hangs when communicating with MM over USB or the radio as the various stdio loops were running without interrupts blocked between the test and the sleep. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: profiling on STM32LKeith Packard2012-10-25
| | | | | | Add sample-based profiling, using a 1kHz timer Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: When slave mode first starts, accept any packetKeith Packard2012-10-25
| | | | | | | | This eliminates the packet sequence matching for the first packet, allowing outstanding send data to arrive from the master instead of ignoring packets with data until they match the seqno Signed-off-by: Keith Packard <keithp@keithp.com>
* Merge branch 'master' into mm-ms5611Keith Packard2012-10-18
|\ | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/telelco: 10ms is not enough time to get a packet backKeith Packard2012-10-15
| | | | | | | | | | | | Not reliable, so bump to 20ms Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/telelco: Crank up SPI speed to cc1111Keith Packard2012-10-15
| | | | | | | | | | | | | | | | The cc1111 can handle up to 3MHz, so use 2MHz. Also, crank down the packet wait time to 10ms, which should be plenty long for the remote box to receive and return a packet. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/telefire: Report valid channels instead of valid pinsKeith Packard2012-10-14
| | | | | | | | | | | | | | Now that pins don't match channels 1:1, make sure that the report back to the LCO names the channels instead of the pin numbers. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Define full-scale gyro and accel values for MPU6000Keith Packard2012-10-13
| | | | | | | | | | | | This lets other code convert MPU6000 readings into canonical units Signed-off-by: Keith Packard <keithp@keithp.com>