mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 09:38:37 +08:00
boards: stm32f4discovery: Refactor stm32_gs2200m.c
Summary: - This commit refactors stm32_gs2200m.c - gs2200m_irq_enable() and gs2200m_irq_disable() are now symmetric. Impact: - All use cases which use the gs2200m driver. Testing: - Tested with stm32f4discovery:wifi Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
committed by
Xiang Xiao
parent
e3b3d21556
commit
f9359d3fe8
@@ -123,16 +123,7 @@ 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)
|
|
||||||
{
|
{
|
||||||
/* Check if irq has been asserted */
|
/* Check if irq has been asserted */
|
||||||
|
|
||||||
@@ -144,6 +135,8 @@ static void gs2200m_irq_enable(void)
|
|||||||
true, g_irq_handler, g_irq_arg);
|
true, g_irq_handler, g_irq_arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_enable_count++;
|
||||||
|
|
||||||
spin_unlock_irqrestore(flags);
|
spin_unlock_irqrestore(flags);
|
||||||
|
|
||||||
if (dready)
|
if (dready)
|
||||||
|
|||||||
Reference in New Issue
Block a user