mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
boards: cxd56xx: Refactor cxd56_gs2200m.c
Summary: - This commit refactors cxd56_gs2200m.c - gs2200m_irq_enable() and gs2200m_irq_disable() are now symmetric. Impact: - All use cases which use the gs2200m driver. Testing: - Tested with spresense:wifi Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
committed by
Xiang Xiao
parent
83f6c94209
commit
e3b3d21556
@@ -116,20 +116,13 @@ static void gs2200m_irq_enable(void)
|
|||||||
|
|
||||||
wlinfo("== ec:%d called=%d \n", _enable_count, _n_called++);
|
wlinfo("== ec:%d called=%d \n", _enable_count, _n_called++);
|
||||||
|
|
||||||
if (1 == _enable_count)
|
if (0 == _enable_count)
|
||||||
{
|
|
||||||
/* NOTE: This would happen if we received an event */
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_enable_count++;
|
|
||||||
|
|
||||||
if (1 == _enable_count)
|
|
||||||
{
|
{
|
||||||
cxd56_gpioint_enable(PIN_UART2_CTS);
|
cxd56_gpioint_enable(PIN_UART2_CTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_enable_count++;
|
||||||
|
|
||||||
spin_unlock_irqrestore(flags);
|
spin_unlock_irqrestore(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user