risc-v/esp32-c3:free cpu in case it was preallocated in wdt driver
This commit is contained in:
parent
938b1daf02
commit
d00e97cbca
@ -681,6 +681,12 @@ static int32_t esp32c3_wdt_setisr(struct esp32c3_wdt_dev_s *dev,
|
||||
/* Disable the provided CPU interrupt to configure it. */
|
||||
|
||||
up_disable_irq(wdt->cpuint);
|
||||
|
||||
/* Free CPU interrupt that is attached to this peripheral
|
||||
* because we will get another from esp32c3_request_irq()
|
||||
*/
|
||||
|
||||
esp32c3_free_cpuint(wdt->periph);
|
||||
}
|
||||
|
||||
wdt->cpuint = esp32c3_request_irq(wdt->periph,
|
||||
|
Loading…
Reference in New Issue
Block a user