Skip to content

Commit 3f1868e

Browse files
kartbenfabiobaltieri
authored andcommitted
doc: drivers: i2s: doxygen cleanup
Added missing doxygen comments + fixed improperly documented structure. Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
1 parent 9de69aa commit 3f1868e

File tree

1 file changed

+16
-14
lines changed
  • include/zephyr/drivers

1 file changed

+16
-14
lines changed

include/zephyr/drivers/i2s.h

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extern "C" {
3434
* The following #defines are used to configure the I2S controller.
3535
*/
3636

37-
37+
/** I2S data stream format options */
3838
typedef uint8_t i2s_fmt_t;
3939

4040
/** Data Format bit field position. */
@@ -159,14 +159,16 @@ typedef uint8_t i2s_fmt_t;
159159
/** Invert frame clock */
160160
#define I2S_FMT_FRAME_CLK_INV BIT(5)
161161

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 */
165163
#define I2S_FMT_CLK_NF_NB (0 << I2S_FMT_CLK_FORMAT_SHIFT)
164+
/** Normal Frame, Inverted Bit Clk */
166165
#define I2S_FMT_CLK_NF_IB (1 << I2S_FMT_CLK_FORMAT_SHIFT)
166+
/** Inverted Frame, Normal Bit Clk */
167167
#define I2S_FMT_CLK_IF_NB (2 << I2S_FMT_CLK_FORMAT_SHIFT)
168+
/** Inverted Frame, Inverted Bit Clk */
168169
#define I2S_FMT_CLK_IF_IB (3 << I2S_FMT_CLK_FORMAT_SHIFT)
169170

171+
/** I2S configuration options */
170172
typedef uint8_t i2s_opt_t;
171173

172174
/** Run bit clock continuously */
@@ -287,25 +289,25 @@ enum i2s_trigger_cmd {
287289
*
288290
* @remark When I2S data format is selected parameter channels is ignored,
289291
* 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.
300292
*/
301293
struct i2s_config {
294+
/** Number of bits representing one data word. */
302295
uint8_t word_size;
296+
/** Number of words per frame. */
303297
uint8_t channels;
298+
/** Data stream format as defined by I2S_FMT_* constants. */
304299
i2s_fmt_t format;
300+
/** Configuration options as defined by I2S_OPT_* constants. */
305301
i2s_opt_t options;
302+
/** Frame clock (WS) frequency, this is sampling rate. */
306303
uint32_t frame_clk_freq;
304+
/** Memory slab to store RX/TX data. */
307305
struct k_mem_slab *mem_slab;
306+
/** Size of one RX/TX memory block (buffer) in bytes. */
308307
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+
*/
309311
int32_t timeout;
310312
};
311313

0 commit comments

Comments
 (0)