circuitpython/ports
Sean Cross f3e54414e5 litex: ensure we don't re-enable interrups during ISR
During an interrupt handler, interrupts are implicitly disabled. They
will be re-enabled when the interrupt handler returns.

Due to some changes that were made, varous calls will re-enable
interrupts after they're finished. Examples of this include calling
`CALLBACK_CRITICAL_END` and getting the number of ticks with
`port_get_raw_ticks()`.

This patch prevents this from happening by doing two things:

1. Use standard calls in `port_get_raw_ticks()` to disable and re-enable
interrupts, preventing nesting issues, and
2. Increase the nesting count inside `isr()`, reflecting the implicit
call that is made by hardware when an interrupt is handled

This helps to address #3841.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-24 14:03:10 +08:00
..
atmel-samd Rev C Feather M4 CAN pin changes 2020-11-02 15:28:30 -05:00
cxd56 cxd56 needed more precise include for __packed; needed SRC_C += on some ports 2020-10-15 15:24:24 -04:00
esp32s2 Merge pull request #3555 from UnexpectedCircuitPython/main 2020-10-15 15:12:40 -07:00
litex litex: ensure we don't re-enable interrups during ISR 2020-12-24 14:03:10 +08:00
mimxrt10xx cxd56 needed more precise include for __packed; needed SRC_C += on some ports 2020-10-15 15:24:24 -04:00
nrf fix CPB SPI pin definitions 2020-10-21 17:07:30 -04:00
stm disable on winterbloom_sol and thunderpack 2020-10-15 18:48:28 -04:00
unix cxd56 needed more precise include for __packed; needed SRC_C += on some ports 2020-10-15 15:24:24 -04:00