mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-06 12:58:53 +08:00
Updated PX4 use / API of low level GPIO and other hardware-centric system facilities
This commit is contained in:
@@ -807,17 +807,17 @@ param_bus_lock(bool lock)
|
||||
|
||||
// XXX this would be the preferred locking method
|
||||
// if (dev == nullptr) {
|
||||
// dev = up_spiinitialize(PX4_SPI_BUS_BARO);
|
||||
// dev = px4_spibus_initialize(PX4_SPI_BUS_BARO);
|
||||
// }
|
||||
|
||||
// SPI_LOCK(dev, lock);
|
||||
|
||||
// we lock like this for Pixracer for now
|
||||
if (lock) {
|
||||
irq_state = irqsave();
|
||||
irq_state = px4_enter_critical_section();
|
||||
|
||||
} else {
|
||||
irqrestore(irq_state);
|
||||
px4_leave_critical_section(irq_state);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user