@@ -280,34 +280,37 @@ typedef uint16_t spi_operation_t;
280
280
281
281
/**
282
282
* @brief SPI controller configuration structure
283
- *
284
- * @param frequency is the bus frequency in Hertz
285
- * @param operation is a bit field with the following parts:
286
- *
287
- * operational mode [ 0 ] - master or slave.
288
- * mode [ 1 : 3 ] - Polarity, phase and loop mode.
289
- * transfer [ 4 ] - LSB or MSB first.
290
- * word_size [ 5 : 10 ] - Size of a data frame in bits.
291
- * duplex [ 11 ] - full/half duplex.
292
- * cs_hold [ 12 ] - Hold on the CS line if possible.
293
- * lock_on [ 13 ] - Keep resource locked for the caller.
294
- * cs_active_high [ 14 ] - Active high CS logic.
295
- * format [ 15 ] - Motorola or TI frame format (optional).
296
- * if @kconfig{CONFIG_SPI_EXTENDED_MODES} is defined:
297
- * lines [ 16 : 17 ] - MISO lines: Single/Dual/Quad/Octal.
298
- * reserved [ 18 : 31 ] - reserved for future use.
299
- * @param slave is the slave number from 0 to host controller slave limit.
300
- * @param cs GPIO chip-select line (optional, must be initialized to zero if not
301
- * used).
302
- * @warning Most drivers use pointer comparison to determine whether a
303
- * passed configuration is different from one used in a previous
304
- * transaction. Changes to fields in the structure may not be
305
- * detected.
306
283
*/
307
284
struct spi_config {
308
- uint32_t frequency ;
309
- spi_operation_t operation ;
310
- uint16_t slave ;
285
+ /** @brief Bus frequency in Hertz. */
286
+ uint32_t frequency ;
287
+ /**
288
+ * @brief Operation flags.
289
+ *
290
+ * It is a bit field with the following parts:
291
+ *
292
+ * - 0: Master or slave.
293
+ * - 1..3: Polarity, phase and loop mode.
294
+ * - 4: LSB or MSB first.
295
+ * - 5..10: Size of a data frame in bits.
296
+ * - 11: Full/half duplex.
297
+ * - 12: Hold on the CS line if possible.
298
+ * - 13: Keep resource locked for the caller.
299
+ * - 14: Active high CS logic.
300
+ * - 15: Motorola or TI frame format (optional).
301
+ *
302
+ * If @kconfig{CONFIG_SPI_EXTENDED_MODES} is enabled:
303
+ *
304
+ * - 16..17: MISO lines (Single/Dual/Quad/Octal).
305
+ * - 18..31: Reserved for future use.
306
+ */
307
+ spi_operation_t operation ;
308
+ /** @brief Slave number from 0 to host controller slave limit. */
309
+ uint16_t slave ;
310
+ /**
311
+ * @brief GPIO chip-select line (optional, must be initialized to zero
312
+ * if not used).
313
+ */
311
314
struct spi_cs_control cs ;
312
315
};
313
316
0 commit comments