Browse Source

关闭全部中断更改成只关闭串口中断

external_Interrupt
tianjialong 2 years ago
parent
commit
1a7a83f400
  1. 2
      MDK-ARM/LWIP.uvguix.29643
  2. 6
      usersrc/zport.c

2
MDK-ARM/LWIP.uvguix.29643

@ -3697,7 +3697,7 @@
<Doc> <Doc>
<Name>..\usersrc\zport.c</Name> <Name>..\usersrc\zport.c</Name>
<ColumnNumber>0</ColumnNumber> <ColumnNumber>0</ColumnNumber>
<TopLine>68</TopLine>
<TopLine>69</TopLine>
<CurrentLine>102</CurrentLine> <CurrentLine>102</CurrentLine>
<Folding>1</Folding> <Folding>1</Folding>
<ContractedFolders></ContractedFolders> <ContractedFolders></ContractedFolders>

6
usersrc/zport.c

@ -87,7 +87,8 @@ void sys_critical_enter(void)
{ {
if (g_port_exit_critical_count == 0) if (g_port_exit_critical_count == 0)
{ {
__disable_irq();
// __disable_irq();
HAL_NVIC_DisableIRQ(USART1_IRQn);
} }
g_port_exit_critical_count++; g_port_exit_critical_count++;
} }
@ -96,6 +97,7 @@ void sys_critical_exit(void)
g_port_exit_critical_count--; g_port_exit_critical_count--;
if (g_port_exit_critical_count == 0) if (g_port_exit_critical_count == 0)
{ {
__enable_irq();
// __enable_irq();
HAL_NVIC_EnableIRQ(USART1_IRQn);
} }
} }
Loading…
Cancel
Save