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
0caab973a5
commit
640609c3f5
2 changed files with 598 additions and 585 deletions
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
_xt_isr isr[16];
|
_xt_isr isr[16];
|
||||||
|
|
||||||
|
bool esp_in_isr;
|
||||||
|
|
||||||
void IRAM _xt_isr_attach(uint8_t i, _xt_isr func)
|
void IRAM _xt_isr_attach(uint8_t i, _xt_isr func)
|
||||||
{
|
{
|
||||||
isr[i] = 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)
|
uint16_t IRAM _xt_isr_handler(uint16_t intset)
|
||||||
{
|
{
|
||||||
|
esp_in_isr = true;
|
||||||
|
|
||||||
/* WDT has highest priority (occasional WDT resets otherwise) */
|
/* WDT has highest priority (occasional WDT resets otherwise) */
|
||||||
if(intset & BIT(INUM_WDT)) {
|
if(intset & BIT(INUM_WDT)) {
|
||||||
_xt_clear_ints(BIT(INUM_WDT));
|
_xt_clear_ints(BIT(INUM_WDT));
|
||||||
|
@ -35,5 +39,7 @@ uint16_t IRAM _xt_isr_handler(uint16_t intset)
|
||||||
intset -= mask;
|
intset -= mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
esp_in_isr = false;
|
||||||
|
|
||||||
return 0;
|
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