diff options
Diffstat (limited to 'os/hal/src/hal_i2s.c')
-rw-r--r-- | os/hal/src/hal_i2s.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/os/hal/src/hal_i2s.c b/os/hal/src/hal_i2s.c index 2434e8477..e34068bf5 100644 --- a/os/hal/src/hal_i2s.c +++ b/os/hal/src/hal_i2s.c @@ -104,10 +104,14 @@ void i2sStop(I2SDriver *i2sp) { osalDbgCheck(i2sp != NULL);
osalSysLock();
+
osalDbgAssert((i2sp->state == I2S_STOP) || (i2sp->state == I2S_READY),
"invalid state");
+
i2s_lld_stop(i2sp);
- i2sp->state = I2S_STOP;
+ i2sp->config = NULL;
+ i2sp->state = I2S_STOP;
+
osalSysUnlock();
}
|