Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ST_I2S by
Diff: drivers/I2S.cpp
- Revision:
- 19:ef6ef1795e30
- Parent:
- 17:7a4a4631672c
- Child:
- 22:e04af8667cad
--- a/drivers/I2S.cpp Fri Jan 27 08:25:10 2017 +0100 +++ b/drivers/I2S.cpp Fri Jan 27 08:35:23 2017 +0100 @@ -73,7 +73,7 @@ return 0; } -int I2S::set_protocol(i2s_bitorder_t protocol) { +int I2S::protocol(i2s_bitorder_t protocol) { lock(); if (i2s_active(&_i2s)) { unlock(); @@ -86,7 +86,7 @@ return 0; } -int I2S::set_mode(i2s_mode_t mode, bool circular) { +int I2S::mode(i2s_mode_t mode, bool circular) { lock(); if (i2s_active(&_i2s)) { unlock(); @@ -186,7 +186,7 @@ } int I2S::queue_transfer(const void *tx_buffer, int tx_length, void *rx_buffer, int rx_length, const mbed::event_callback_t& callback, int event) -{ // betzw: MUST be called with lock held! +{ // NOTE: MUST be called with lock held! #if TRANSACTION_QUEUE_SIZE_I2S mbed::transaction_t t; @@ -214,7 +214,7 @@ // ignore the fact that there are multiple physical i2s's, and always update if it wasn't us last -void I2S::acquire() { // betzw: MUST be called with lock held! +void I2S::acquire() { // NOTE: MUST be called with lock held! if (_owner != this) { i2s_format(&_i2s, _dbits, _fbits, _polarity); i2s_audio_frequency(&_i2s, _hz); @@ -226,7 +226,7 @@ void I2S::start_transfer(const void *tx_buffer, int tx_length, void *rx_buffer, int rx_length, const mbed::event_callback_t& callback, int event) -{ // betzw: MUST be called with lock held! +{ // NOTE: MUST be called with lock held! acquire(); _callback = callback; _irq_tx.callback(&I2S::irq_handler_asynch_tx); @@ -241,7 +241,7 @@ #if TRANSACTION_QUEUE_SIZE_I2S void I2S::start_transaction(mbed::transaction_t *data) -{ // betzw: MUST be called with lock held! +{ // NOTE: MUST be called with lock held! start_transfer(data->tx_buffer, data->tx_length, data->rx_buffer, data->rx_length, data->callback, data->event); }