summaryrefslogtreecommitdiff
path: root/src/drivers
Commit message (Collapse)AuthorAge
...
* 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>
| * altos: Split out ms5607 conversion code for use in ao_flight_testKeith Packard2012-10-13
| | | | | | | | | | | | Makes the conversion code available even where the driver isn't needed Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Add (untested) driver for AT24C i2c flash partsKeith Packard2012-10-12
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Prepare ms5607 driver for use in non-tasking productsKeith Packard2012-10-12
| | | | | | | | | | | | Micropeak doesn't have tasking, prepare the ms5607 driver for that Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/telefire: Add siren/strobe supportKeith Packard2012-10-10
| | | | | | | | | | | | | | This also involved hacking up the code to allow for non-zero offsets for the pad firing and continuity pins. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/telefire: Make sure armed alarm goes off on timeKeith Packard2012-10-06
| | | | | | | | | | | | | | | | | | | | Instead of turning the alarm off when a packet is received after the deadline, just do it in the thread which is awake all of the time. This prevents the alarm from sticking on when the LCO box is turned off while the arming key is on. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Fix up ms5607 and mma655x commands to work againKeith Packard2012-10-08
| | | | | | | | | | | | These just display the most recently fetched values Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Go back to recording sensor data in globalsmm-ms5611Keith Packard2012-10-08
| | | | | | | | | | | | | | | | Instead of trying to get things into the ring from a variety of functions, go back to the simpler method of storing them in globals and having the ADC code just pluck out the most recent values. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos/drivers: Use data ring values for MS5607 presentationKeith Packard2012-10-06
|/ | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Re-enable the ms5607 and mma655x acquisition threadsKeith Packard2012-10-03
| | | | | | These were disabled to help with testing in Argonia Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Provide MS5611 configuration option, HAS_MS5611Keith Packard2012-10-03
| | | | | | | | | MS5611 and MS5607 use slightly different conversion functions. Alas, there doesn't appear to be a way to tell them apart in software. This patch adds the necessary conversion changes and makes them depend on a compile-time configuration option. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telelco: Search for available firing nodes at boot timeKeith Packard2012-09-09
| | | | | | Query for available firing nodes, limiting device selections to those found. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telefire: Add steady warble when the LCO arm switch is onKeith Packard2012-09-09
| | | | | | And make debugging a run-time option too. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Try to get remote cmac time closer to realityKeith Packard2012-09-09
| | | | | | | | Record the time after the packet was sent, but before the return packet arrives to try and more closely approximate the time the packet arrived at the other end. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix radio slave to run lights in the normal wayKeith Packard2012-09-06
| | | | | | These were left in a debug mode, toggling instead of flashing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Get mma655x driver limping alongKeith Packard2012-08-31
| | | | | | This appears to drive the chip correctly to see values from the accelerometer. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add custom panic noise for self-test failuresKeith Packard2012-08-31
| | | | | | Make it easier to tell which component is failing self test Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Shuffle LCO functions around, add telelco first cutKeith Packard2012-08-30
| | | | | | | | | Pull LCO functions shared between LCO UI and command line into ao_lco_funcs.c. Import bits for telelco. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Disable debug printfs and fix pad ignite time for telefireKeith Packard2012-08-30
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: SPI radio - use 1->0 for 'done' and 0->1 for 'ready'Keith Packard2012-08-29
| | | | | | | | | | This changes how the SPI radio protocol uses the interrupt line. Instead of a pulse indicating operation done, this now uses a 0 value for done and a 1 value for ready. The key distinction is that the master can tell when the slave is waiting for the next command instead of hoping that it got done 'soon enough'. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: fix ao_pad debug output for query commandKeith Packard2012-08-29
| | | | | | Igniter status is an array these days. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use updated pad protocol for lco commandsKeith Packard2012-08-29
| | | | | | | Stop using the older single-channel protocol and switch to the new multi-channel protocol Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Mostly working SPI radio linkKeith Packard2012-08-28
| | | | | | | | This includes long delays to avoid overrunning the cc1111 input, otherwise it works pretty well. The delays mean that we can't capture the reply to a cmac command though, so more work is needed. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Track protocol changes to ao_pad debug messagesKeith Packard2012-08-28
| | | | | | Make the debug output build again. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Stop providing debug commands in seven-segment driverKeith Packard2012-08-28
| | | | | | The radio_cmac debug commands use the same letter, and this code works now... Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Move radio_cmac test funcs from ao_lco_cmd.c to new fileKeith Packard2012-08-28
| | | | | | | These are useful in the firing node for testing as well, so move them to be shared. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add SPI linked radio APIKeith Packard2012-08-27
| | | | | | Forward the necessary radio functions over the SPI link Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up radio APIsKeith Packard2012-08-27
| | | | | | | Move api to ao_radio_cmac.h include file. Expose ao_radio_test as standard API. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Test multiple quadrature devices. Export quadrature count.Keith Packard2012-08-27
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Seven segment display driverKeith Packard2012-08-27
| | | | | | Hex numbers and the decimal point. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Rename drivers/ao_lco to drivers/ao_lco_cmdKeith Packard2012-08-27
| | | | | | | | These contain command line functions for testing the cmac and lco features. Now that there's a telelco-specific ao_lco interface file, it's useful to have both for testing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Trigger sample complete when all data are readyKeith Packard2012-08-26
| | | | | | | This has each sensor mark a bit in the current data record which is then sent for processing when all of the data are present. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make 'pad' driver useful with telefire v0.1Keith Packard2012-08-26
| | | | | | | | This reports correct status bits over the radio and to the LEDs for all four channels, and also makes the firing test command control all four relays. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add debug command for 74hc597 driverKeith Packard2012-08-26
| | | | | | | | | This dumps the current state of the 74hc597 chip. Note that this shows that the 74hc597 driver doesn't work, and that the circuit used in telefire v0.1 can't work. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Get ao_pad.c working on telefire v0.1Keith Packard2012-08-24
| | | | | | | Monitor all four channels, allow any channel to be fired. Turn on power LED at startup time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Split out LCO functions from ao_radio_cmac.c to ao_lco.cKeith Packard2012-08-24
| | | | | | | These functions are not used in the telelaunch or telefire nodes, so don't force them to be included. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add 'ao_led_set_mask' in the PCA9922 driverKeith Packard2012-08-24
| | | | | | This lets a subset of the LEDs be controlled independent of other LED settings. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Disable telefire 'pad' listener when testing radioKeith Packard2012-08-24
| | | | | | | Ensures that the radio testing won't block waiting for a firing mode packet to arrive. Signed-off-by: Keith Packard <keithp@keithp.com>
* Here's the button driver and event queue logicKeith Packard2012-08-18
| | | | | | These were neglected in the commit which was supposed to include them Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add MMA655X driverKeith Packard2012-08-18
| | | | | | Just debug code at this point, will complete on real hardware Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use split SPI bus for MS5607 sensorKeith Packard2012-08-18
| | | | | | | Leave CS low while releasing the SPI bus when waiting for conversion complete -- other SPI bus users will use another set of pins. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add button driver and event queueKeith Packard2012-08-06
| | | | | | | With this, a single task can wait for any button or quadrature input device. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Support multiple quadrature encoders.Keith Packard2012-08-06
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>