Skip to content

Commit baf2e7f

Browse files
mbolivar-nordiccarlescufi
authored andcommitted
api: gpio: add missing member docstrings for gpio_dt_spec
This makes the breathe output for this type useful. Signed-off-by: Martí Bolívar <[email protected]>
1 parent 4d777b4 commit baf2e7f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

include/drivers/gpio.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,23 @@ typedef uint8_t gpio_dt_flags_t;
325325
typedef uint32_t gpio_flags_t;
326326

327327
/**
328-
* @brief Provides a type to hold GPIO information specified in devicetree
328+
* @brief Container for GPIO pin information specified in devicetree
329329
*
330-
* This type is sufficient to hold a GPIO device pointer, pin number,
331-
* and the subset of the flags used to control GPIO configuration
332-
* which may be given in devicetree.
330+
* This type contains a pointer to a GPIO device, pin number for a pin
331+
* controlled by that device, and the subset of pin configuration
332+
* flags which may be given in devicetree.
333+
*
334+
* @see GPIO_DT_SPEC_GET_BY_IDX
335+
* @see GPIO_DT_SPEC_GET_BY_IDX_OR
336+
* @see GPIO_DT_SPEC_GET
337+
* @see GPIO_DT_SPEC_GET_OR
333338
*/
334339
struct gpio_dt_spec {
340+
/** GPIO device controlling the pin */
335341
const struct device *port;
342+
/** The pin's number on the device */
336343
gpio_pin_t pin;
344+
/** The pin's configuration flags as specified in devicetree */
337345
gpio_dt_flags_t dt_flags;
338346
};
339347

0 commit comments

Comments
 (0)