diff options
author | px4dev <px4@purgatory.org> | 2013-09-12 23:56:53 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-09-12 23:56:53 -0700 |
commit | 19fdaf2009d41885923b586432cb2506a24ca5b3 (patch) | |
tree | e8abf0ea4859b1adf70d007bacb3a6a612d86e53 /src/drivers/ms5611/ms5611_spi.cpp | |
parent | 379623596715d0dce47192329ae9aceabb9ded11 (diff) | |
download | px4-firmware-19fdaf2009d41885923b586432cb2506a24ca5b3.tar.gz px4-firmware-19fdaf2009d41885923b586432cb2506a24ca5b3.tar.bz2 px4-firmware-19fdaf2009d41885923b586432cb2506a24ca5b3.zip |
Use the generic device::SPI locking strategy.
Diffstat (limited to 'src/drivers/ms5611/ms5611_spi.cpp')
-rw-r--r-- | src/drivers/ms5611/ms5611_spi.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/drivers/ms5611/ms5611_spi.cpp b/src/drivers/ms5611/ms5611_spi.cpp index 21caed2ff..e547c913b 100644 --- a/src/drivers/ms5611/ms5611_spi.cpp +++ b/src/drivers/ms5611/ms5611_spi.cpp @@ -142,23 +142,15 @@ MS5611_SPI::init() goto out; } - /* disable interrupts, make this section atomic */ - flags = irqsave(); /* send reset command */ ret = _reset(); - /* re-enable interrupts */ - irqrestore(flags); if (ret != OK) { debug("reset failed"); goto out; } - /* disable interrupts, make this section atomic */ - flags = irqsave(); /* read PROM */ ret = _read_prom(); - /* re-enable interrupts */ - irqrestore(flags); if (ret != OK) { debug("prom readout failed"); goto out; @@ -270,13 +262,7 @@ MS5611_SPI::_reg16(unsigned reg) int MS5611_SPI::_transfer(uint8_t *send, uint8_t *recv, unsigned len) { - irqstate_t flags = irqsave(); - - int ret = transfer(send, recv, len); - - irqrestore(flags); - - return ret; + return transfer(send, recv, len); } #endif /* PX4_SPIDEV_BARO */ |