mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
pmw3901 driver: lock bus during transfers (avoid conflicts with sd card on crazyflie)
This commit is contained in:
committed by
Beat Küng
parent
b822966e8e
commit
2359b73d1f
@@ -342,6 +342,9 @@ PMW3901::init()
|
||||
{
|
||||
int ret = PX4_ERROR;
|
||||
|
||||
/* For devices competing with NuttX SPI drivers on a bus (Crazyflie SD Card expansion board) */
|
||||
SPI::set_lockmode(LOCK_THREADS);
|
||||
|
||||
/* do I2C init (and probe) first */
|
||||
if (SPI::init() != OK) {
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user