diff --git a/libraries/AP_HAL_ChibiOS/CANFDIface.h b/libraries/AP_HAL_ChibiOS/CANFDIface.h index 9b21444161..81815fdaa0 100644 --- a/libraries/AP_HAL_ChibiOS/CANFDIface.h +++ b/libraries/AP_HAL_ChibiOS/CANFDIface.h @@ -73,11 +73,11 @@ class ChibiOS::CANIface : public AP_HAL::CANIface struct CriticalSectionLocker { CriticalSectionLocker() { - chSysSuspend(); + chSysLock(); } ~CriticalSectionLocker() { - chSysEnable(); + chSysUnlock(); } }; diff --git a/libraries/AP_HAL_ChibiOS/CANIface.h b/libraries/AP_HAL_ChibiOS/CANIface.h index 47809fa79b..b85ed4e538 100644 --- a/libraries/AP_HAL_ChibiOS/CANIface.h +++ b/libraries/AP_HAL_ChibiOS/CANIface.h @@ -69,11 +69,11 @@ class ChibiOS::CANIface : public AP_HAL::CANIface struct CriticalSectionLocker { CriticalSectionLocker() { - chSysSuspend(); + chSysLock(); } ~CriticalSectionLocker() { - chSysEnable(); + chSysUnlock(); } };