PX4 SPI default to thread locking mode

This commit is contained in:
Daniel Agar
2019-08-20 21:36:21 -04:00
parent 7d248e0f45
commit 5d813224c8
6 changed files with 23 additions and 73 deletions
+1 -8
View File
@@ -124,14 +124,7 @@ MS5611_SPI::MS5611_SPI(uint8_t bus, uint32_t device, ms5611::prom_u &prom_buf) :
int
MS5611_SPI::init()
{
int ret;
#if defined(PX4_SPI_BUS_RAMTRON) && \
(PX4_SPI_BUS_BARO == PX4_SPI_BUS_RAMTRON)
SPI::set_lockmode(LOCK_THREADS);
#endif
ret = SPI::init();
int ret = SPI::init();
if (ret != OK) {
PX4_DEBUG("SPI init failed");
@@ -341,9 +341,6 @@ PMW3901::init()
_yaw_rotation = (enum Rotation)val;
}
/* For devices competing with NuttX SPI drivers on a bus (Crazyflie SD Card expansion board) */
SPI::set_lockmode(LOCK_THREADS);
/* do SPI init (and probe) first */
if (SPI::init() != OK) {
goto out;