Skip to content

Commit f7f84f0

Browse files
committed
include: drivers: misc: Add doxygen docs for NXP FlexIO driver
Add missing doxygen docs for the NXP FlexIO driver and "mount" into the Misc. drivers doxygen group. Signed-off-by: Benjamin Cabé <[email protected]>
1 parent c83703c commit f7f84f0

File tree

1 file changed

+40
-4
lines changed

1 file changed

+40
-4
lines changed

include/zephyr/drivers/misc/nxp_flexio/nxp_flexio.h

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,55 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
/**
8+
* @file
9+
* @brief Header file for NXP FlexIO driver
10+
* @ingroup nxp_flexio_interface
11+
*/
12+
713
#ifndef ZEPHYR_DRIVERS_MISC_NXP_FLEXIO_NXP_FLEXIO_H_
814
#define ZEPHYR_DRIVERS_MISC_NXP_FLEXIO_NXP_FLEXIO_H_
915

16+
/**
17+
* @brief NXP FlexIO driver APIs
18+
* @defgroup nxp_flexio_interface NXP FlexIO driver APIs
19+
* @ingroup misc_interfaces
20+
*
21+
* @{
22+
*/
23+
1024
#include <zephyr/device.h>
1125

1226
/**
13-
* @struct nxp_flexio_child_res
14-
* @brief Structure containing information about the required
15-
* resources for a FlexIO child.
27+
* @brief Structure containing information about the required resources for a FlexIO child.
1628
*/
1729
struct nxp_flexio_child_res {
30+
/** Output array where assigned shifter indices are stored.
31+
*
32+
* Must point to an array with at least @ref shifter_count entries. Values are 0-based
33+
* hardware indices valid for the bound FlexIO.
34+
*/
1835
uint8_t *shifter_index;
36+
/** Number of shifter indices required by the child. */
1937
uint8_t shifter_count;
38+
/** Output array where assigned timer indices are stored.
39+
*
40+
* Must point to an array with at least @ref timer_count entries. Values are 0-based
41+
* hardware indices valid for the bound FlexIO.
42+
*/
2043
uint8_t *timer_index;
44+
/** Number of timer indices required by the child. */
2145
uint8_t timer_count;
2246
};
2347

2448
/**
2549
* @typedef nxp_flexio_child_isr_t
2650
* @brief Callback API to inform API user that FlexIO triggered interrupt
2751
*
28-
* This callback is called from IRQ context.
52+
* The controller calls this from IRQ context whenever one of the child's mapped shifters or timers
53+
* has a pending and enabled interrupt.
54+
*
55+
* @param user_data Opaque pointer provided at attachment time.
2956
*/
3057
typedef int (*nxp_flexio_child_isr_t)(void *user_data);
3158

@@ -34,8 +61,13 @@ typedef int (*nxp_flexio_child_isr_t)(void *user_data);
3461
* @brief Structure containing the required child data for FlexIO
3562
*/
3663
struct nxp_flexio_child {
64+
/** ISR called from the FlexIO controller's IRQ handler.
65+
* May be @c NULL if the child does not require IRQ notifications.
66+
*/
3767
nxp_flexio_child_isr_t isr;
68+
/** Opaque pointer passed to @ref isr function when it is invoked. */
3869
void *user_data;
70+
/** Resource requirements and output indices filled by nxp_flexio_child_attach(). */
3971
struct nxp_flexio_child_res res;
4072
};
4173

@@ -85,4 +117,8 @@ int nxp_flexio_get_rate(const struct device *dev, uint32_t *rate);
85117
int nxp_flexio_child_attach(const struct device *dev,
86118
const struct nxp_flexio_child *child);
87119

120+
/**
121+
* @}
122+
*/
123+
88124
#endif /* ZEPHYR_DRIVERS_MISC_NXP_FLEXIO_NXP_FLEXIO_H_ */

0 commit comments

Comments
 (0)