@@ -34,7 +34,7 @@ extern "C" {
34
34
* The following #defines are used to configure the I2S controller.
35
35
*/
36
36
37
-
37
+ /** I2S data stream format options */
38
38
typedef uint8_t i2s_fmt_t ;
39
39
40
40
/** Data Format bit field position. */
@@ -159,14 +159,16 @@ typedef uint8_t i2s_fmt_t;
159
159
/** Invert frame clock */
160
160
#define I2S_FMT_FRAME_CLK_INV BIT(5)
161
161
162
- /** NF represents "Normal Frame" whereas IF represents "Inverted Frame"
163
- * NB represents "Normal Bit Clk" whereas IB represents "Inverted Bit clk"
164
- */
162
+ /** Normal Frame, Normal Bit Clk */
165
163
#define I2S_FMT_CLK_NF_NB (0 << I2S_FMT_CLK_FORMAT_SHIFT)
164
+ /** Normal Frame, Inverted Bit Clk */
166
165
#define I2S_FMT_CLK_NF_IB (1 << I2S_FMT_CLK_FORMAT_SHIFT)
166
+ /** Inverted Frame, Normal Bit Clk */
167
167
#define I2S_FMT_CLK_IF_NB (2 << I2S_FMT_CLK_FORMAT_SHIFT)
168
+ /** Inverted Frame, Inverted Bit Clk */
168
169
#define I2S_FMT_CLK_IF_IB (3 << I2S_FMT_CLK_FORMAT_SHIFT)
169
170
171
+ /** I2S configuration options */
170
172
typedef uint8_t i2s_opt_t ;
171
173
172
174
/** Run bit clock continuously */
@@ -287,25 +289,25 @@ enum i2s_trigger_cmd {
287
289
*
288
290
* @remark When I2S data format is selected parameter channels is ignored,
289
291
* number of words in a frame is always 2.
290
- *
291
- * @param word_size Number of bits representing one data word.
292
- * @param channels Number of words per frame.
293
- * @param format Data stream format as defined by I2S_FMT_* constants.
294
- * @param options Configuration options as defined by I2S_OPT_* constants.
295
- * @param frame_clk_freq Frame clock (WS) frequency, this is sampling rate.
296
- * @param mem_slab memory slab to store RX/TX data.
297
- * @param block_size Size of one RX/TX memory block (buffer) in bytes.
298
- * @param timeout Read/Write timeout. Number of milliseconds to wait in case TX
299
- * queue is full or RX queue is empty, or 0, or SYS_FOREVER_MS.
300
292
*/
301
293
struct i2s_config {
294
+ /** Number of bits representing one data word. */
302
295
uint8_t word_size ;
296
+ /** Number of words per frame. */
303
297
uint8_t channels ;
298
+ /** Data stream format as defined by I2S_FMT_* constants. */
304
299
i2s_fmt_t format ;
300
+ /** Configuration options as defined by I2S_OPT_* constants. */
305
301
i2s_opt_t options ;
302
+ /** Frame clock (WS) frequency, this is sampling rate. */
306
303
uint32_t frame_clk_freq ;
304
+ /** Memory slab to store RX/TX data. */
307
305
struct k_mem_slab * mem_slab ;
306
+ /** Size of one RX/TX memory block (buffer) in bytes. */
308
307
size_t block_size ;
308
+ /** Read/Write timeout. Number of milliseconds to wait in case TX queue
309
+ * is full or RX queue is empty, or 0, or SYS_FOREVER_MS.
310
+ */
309
311
int32_t timeout ;
310
312
};
311
313
0 commit comments