HAL_ChibiOS: use chSysLock for CAN critical section

this avoids an assert in some code paths that combine with hrt
functions
This commit is contained in:
Andrew Tridgell 2023-12-30 08:52:44 +11:00
parent a52c71f380
commit c2011570f7
2 changed files with 4 additions and 4 deletions

View File

@ -73,11 +73,11 @@ class ChibiOS::CANIface : public AP_HAL::CANIface
struct CriticalSectionLocker {
CriticalSectionLocker()
{
chSysSuspend();
chSysLock();
}
~CriticalSectionLocker()
{
chSysEnable();
chSysUnlock();
}
};

View File

@ -69,11 +69,11 @@ class ChibiOS::CANIface : public AP_HAL::CANIface
struct CriticalSectionLocker {
CriticalSectionLocker()
{
chSysSuspend();
chSysLock();
}
~CriticalSectionLocker()
{
chSysEnable();
chSysUnlock();
}
};