aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/src')
-rw-r--r--os/hal/src/i2s.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/os/hal/src/i2s.c b/os/hal/src/i2s.c
index e0c547847..99e4246ad 100644
--- a/os/hal/src/i2s.c
+++ b/os/hal/src/i2s.c
@@ -128,12 +128,31 @@ void i2sStartExchange(I2SDriver *i2sp) {
chDbgCheck(i2sp != NULL "i2sStartExchange");
chSysLock();
- chDbgAssert(i2sp->state == I2S_READY, "i2sStartExchange(), #1", "not ready");
+ chDbgAssert(i2sp->state == I2S_READY,
+ "i2sStartExchange(), #1", "not ready");
i2sStartExchangeI(i2sp);
chSysUnlock();
}
/**
+ * @brief Starts a I2S data exchange in continuous mode.
+ *
+ * @param[in] i2sp pointer to the @p I2SDriver object
+ *
+ * @api
+ */
+void i2sStartExchangeContinuous(I2SDriver *i2sp) {
+
+ chDbgCheck(i2sp != NULL "i2sStartExchangeContinuous");
+
+ chSysLock();
+ chDbgAssert(i2sp->state == I2S_READY,
+ "i2sStartExchangeContinuous(), #1", "not ready");
+ i2sStartExchangeContinuousI(i2sp);
+ chSysUnlock();
+}
+
+/**
* @brief Stops the ongoing data exchange.
* @details The ongoing data exchange, if any, is stopped, if the driver
* was not active the function does nothing.