kopia lustrzana https://github.com/micropython/micropython
ports/rp2/machine_i2s.c: Detect and deinitialize I2S instances on boot.
During early init some I2S instances may still be present in buffer. This issue would cause system to hang when using soft_reset without deinitializing I2S instance first.pull/14345/head
rodzic
d11ca092f7
commit
007c84b840
|
@ -167,6 +167,9 @@ static mp_obj_t machine_i2s_deinit(mp_obj_t self_in);
|
|||
|
||||
void machine_i2s_init0(void) {
|
||||
for (uint8_t i = 0; i < MAX_I2S_RP2; i++) {
|
||||
if (MP_STATE_PORT(machine_i2s_obj[i]) != NULL) {
|
||||
mp_machine_i2s_deinit(MP_STATE_PORT(machine_i2s_obj[i]));
|
||||
}
|
||||
MP_STATE_PORT(machine_i2s_obj[i]) = NULL;
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue