mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
arch/: Make sure the up_irq_enable() is available on all architectures. I will not be able to test all of these new versions of this function so this may break things for awhile.
This commit is contained in:
@@ -70,6 +70,7 @@ extern "C"
|
||||
|
||||
irqstate_t up_irq_save(void);
|
||||
void up_irq_restore(irqstate_t flags);
|
||||
irqstate_t up_irq_enable(void);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -82,6 +82,7 @@ void lm32_irq_initialize(void)
|
||||
* Name: up_irq_save
|
||||
*
|
||||
* Description:
|
||||
* Return the current interrupt enable state and disable all interrupts.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@@ -103,6 +104,7 @@ irqstate_t up_irq_save(void)
|
||||
* Name: up_irq_restore
|
||||
*
|
||||
* Description:
|
||||
* Restore saved interrupt state
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@@ -113,6 +115,28 @@ void up_irq_restore(irqstate_t flags)
|
||||
irq_setie(flags);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_irq_enable
|
||||
*
|
||||
* Description:
|
||||
* Return the current interrupt enable state and enable all interrupts
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
irqstate_t up_irq_restore(irqstate_t flags)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
/* Get the previous value of IE */
|
||||
|
||||
flags = irq_getie();
|
||||
|
||||
/* Enable interrupts and return the previous interrupt state */
|
||||
|
||||
irq_setie(1);
|
||||
return flags;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_disable_irq
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user