summaryrefslogtreecommitdiff
path: root/src/drivers/ao_ms5607.c
Commit message (Collapse)AuthorAge
* altos: Update sensor data atomicallyKeith Packard2017-06-11
| | | | | | | | | | | Read data into a temp variable, block interrupts, then update the published value. The bug is easy to see with the HMC5883 which has to byte-swap the output of the chip, and hence can occasionally get caught with the wrong byte order data. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/ms5607: Allow applications to not use the normal data ring and threadKeith Packard2017-04-27
| | | | | | | MicroPeak V2 has tasks, but doesn't want to use another thread just for the MS5607. Signed-off-by: Keith Packard <keithp@keithp.com>
* Switch from GPLv2 to GPLv2+Keith Packard2016-07-12
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/detherm: Add ms5607 to dethermKeith Packard2016-04-13
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make MS5607 PROM a public variableKeith Packard2014-05-25
| | | | | | | This will let the fake flight code update it as necessary, without creating a new interface in ao_ms5607.c Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Check for MS5607 MISO low before sleepingKeith Packard2013-08-26
| | | | | | | If the MISO line goes low before we manage to configure the interrupts, we'll miss it entirely unless we check the pin explicitly. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use %ld and %lu for MS5607 debug outputKeith Packard2013-08-26
| | | | | | The value are 'long', so use the right printf format. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/teletiny-v2.0: Support multiple SPI busses on CC1111Keith Packard2013-08-25
| | | | | | Needed for TeleMini v2.0 Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make TeleMini v2.0 fitKeith Packard2013-08-25
| | | | | | Mash lots of storage locations and code around to shrink stuff down to size Signed-off-by: Keith Packard <keithp@keithp.com>
* Initial TeleMini bitsKeith Packard2013-08-25
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add EXTI_PIN_NOCONFIGURE to exti interface, use for MS5607Keith Packard2013-05-19
| | | | | | | | This asks the EXTI code to not mess with the pin configuration so that the MS5607 driver can get interrupts on the MISO pin while still using it for SPI. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use ao_spi_get/put_bit in MS5607 driverKeith Packard2013-05-19
| | | | | | Replace open-coded ao_spi_get/put and ao_gpio_set sequences 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: profiling on STM32LKeith Packard2012-10-25
| | | | | | Add sample-based profiling, using a 1kHz timer 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: 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: 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: 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: 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: 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: 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: Disable MS5607 interrupt in the handleraltosdroidKeith Packard2012-06-28
| | | | | | | Avoids having the interrupt re-raised multiple times until the reading task finally wakes up. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: include targe SPI speed in get requestKeith Packard2012-06-27
| | | | | | | STM needs it to be provided when enabling the SPI device, so just fix AVR and cc1111 to do the same. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up usage of port parametersKeith Packard2012-06-26
| | | | | | | | Make stm port parameters always be pointers; this avoids the confusion where some macros took '&port' and others took a bare 'port', and also unifies code to run on other processors in a consistent fashion. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Other half of the ms5607 prom reporting patchKeith Packard2012-06-04
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't start ADC ring until the other sensors have a valid valueKeith Packard2012-05-27
| | | | | | Yes, this is still an ugly kludge, but it's easy. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Finish ms5607 supportKeith Packard2012-05-18
| | | | | | | | | | This has the MS5607 polling once each tick for pressure and temperature and then saving that in a global variable. The command UI provides for dumping the prom data so that an eeprom file can have raw sensor data along with the conversion factors necessary to compute useful values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Check MS5607 CRC. Clean up MS5607 APIKeith Packard2012-05-18
| | | | | | It's not ready for flight yet, but at least it's sensible now. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add support for multiple SPI busses and sharing device driversKeith Packard2012-04-14
| | | | | | | | | | | | | | | | The STM32L151 has several SPI busses, and we want to use more than one, so add a 'bus' parameter to the SPI interfaces. To avoid wasting time on AVR and CC1111 processors which only use one SPI bus, elide those parameters from the actual functions by wrapping them with macros. Configuring chip select is now all macroized so that each chip can have its own version, allowing the STM to share the various SPI device drivers with the cc1111 and avr processors. Note that only the M25 driver has been ported; porting the others is 'trivial', but not necessary at this point. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Reduce MS5607 reset delay, increase conversion delayKeith Packard2012-04-09
| | | | | | | Reset doesn't take very long, while doing a conversion seems to take more than 10ms. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make ms5607 driver do somethingKeith Packard2012-04-09
| | | | | | | It's loading prom values and converting sensor data, but it's getting the wrong answer at present. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add DMA, SPI and MS5607 driversKeith Packard2012-04-06
Signed-off-by: Keith Packard <keithp@keithp.com>