esp32_free_cpuint: Fix an assertion

The original assertion was wrong because:

* cpuint numbers for edge interrupts are not dense
  (while ESP32_CPUINT_NEDGEPERIPHS is 4, EPS32_CPUINT_EDGESET is not 0xf.)

* This function is used for level interrupts too
This commit is contained in:
YAMAMOTO Takashi 2021-01-21 13:20:24 +09:00 committed by Abdelatif Guettouche
parent c3a3fa7715
commit 8c02b366f8

View File

@ -520,7 +520,7 @@ void esp32_free_cpuint(int cpuint)
uint32_t *freeints;
uint32_t bitmask;
DEBUGASSERT(cpuint >= 0 && cpuint < ESP32_CPUINT_NEDGEPERIPHS);
DEBUGASSERT(cpuint >= 0 && cpuint <= ESP32_CPUINT_MAX);
/* Mark the CPU interrupt as available */