lwip sys_arch: Add functional xInsideISR implementation
Relies on global flags set when the user ISR is executing. Unclear if this fixes any bugs as ISR code may not have been calling into LWIP, but the previous implementation was broken.
This commit is contained in:
parent
1fe6586189
commit
cb78ecd0e2
2 changed files with 598 additions and 585 deletions
|
@ -9,6 +9,8 @@
|
|||
|
||||
_xt_isr isr[16];
|
||||
|
||||
bool esp_in_isr;
|
||||
|
||||
void IRAM _xt_isr_attach(uint8_t i, _xt_isr func)
|
||||
{
|
||||
isr[i] = func;
|
||||
|
@ -20,6 +22,8 @@ void IRAM _xt_isr_attach(uint8_t i, _xt_isr func)
|
|||
*/
|
||||
uint16_t IRAM _xt_isr_handler(uint16_t intset)
|
||||
{
|
||||
esp_in_isr = true;
|
||||
|
||||
/* WDT has highest priority (occasional WDT resets otherwise) */
|
||||
if(intset & BIT(INUM_WDT)) {
|
||||
_xt_clear_ints(BIT(INUM_WDT));
|
||||
|
@ -35,5 +39,7 @@ uint16_t IRAM _xt_isr_handler(uint16_t intset)
|
|||
intset -= mask;
|
||||
}
|
||||
|
||||
esp_in_isr = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
1177
lwip/sys_arch.c
1177
lwip/sys_arch.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue