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:
Angus Gratton 2016-04-20 15:04:29 +10:00
parent 1fe6586189
commit cb78ecd0e2
2 changed files with 598 additions and 585 deletions

View file

@ -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;
}

File diff suppressed because it is too large Load diff