mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-05 12:10:36 +08:00
LPC11C24: Removed compiler-dependent code
This commit is contained in:
@@ -314,7 +314,7 @@ uavcan::int16_t CanDriver::select(uavcan::CanSelectMasks& inout_masks, uavcan::M
|
||||
* break WFE every once in a while.
|
||||
*/
|
||||
#if !UAVCAN_LPC11C24_NO_WFE
|
||||
asm volatile ("wfe");
|
||||
__WFE();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@ const int32_t MaxUtcSpeedCorrectionX16 = 100 * 16;
|
||||
|
||||
}
|
||||
|
||||
__attribute((noreturn))
|
||||
#if __GNUC__
|
||||
__attribute__((noreturn))
|
||||
#endif
|
||||
void fail()
|
||||
{
|
||||
while (true) { }
|
||||
|
||||
@@ -17,11 +17,11 @@ struct CriticalSectionLocker
|
||||
{
|
||||
CriticalSectionLocker()
|
||||
{
|
||||
__asm volatile ("cpsid i");
|
||||
__disable_irq();
|
||||
}
|
||||
~CriticalSectionLocker()
|
||||
{
|
||||
__asm volatile ("cpsie i");
|
||||
__enable_irq();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -32,7 +32,9 @@ uavcan::Logger& getLogger()
|
||||
return logger;
|
||||
}
|
||||
|
||||
#if __GNUC__
|
||||
__attribute__((noreturn))
|
||||
#endif
|
||||
void die()
|
||||
{
|
||||
while (true) { }
|
||||
|
||||
Reference in New Issue
Block a user