Skip to content

Commit 418da35

Browse files
Bjarki Arge Andreasencarlescufi
Bjarki Arge Andreasen
authored andcommitted
include/drivers/rtc.h: Refined documentation
Hid type definitions of API functions from documentation using INTERNAL_HIDDEN condition. Changed nested groups inside rtc_interface group to use @name instead. Use @anchor to reference definitions for RTC_ALARM_TIME_MASK. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent 9575132 commit 418da35

File tree

1 file changed

+17
-15
lines changed
  • include/zephyr/drivers

1 file changed

+17
-15
lines changed

include/zephyr/drivers/rtc.h

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ extern "C" {
3030

3131
/**
3232
* @brief Mask for alarm time fields to enable when setting alarm time
33-
* @defgroup rtc_alarm_time_mask RTC Alarm Time Mask
33+
* @name RTC Alarm Time Mask
34+
* @anchor RTC_ALARM_TIME_MASK
3435
* @{
3536
*/
3637
#define RTC_ALARM_TIME_MASK_SECOND BIT(0)
@@ -87,6 +88,12 @@ typedef void (*rtc_update_callback)(const struct device *dev, void *user_data);
8788
*/
8889
typedef void (*rtc_alarm_callback)(const struct device *dev, uint16_t id, void *user_data);
8990

91+
/**
92+
* @cond INTERNAL_HIDDEN
93+
*
94+
* For internal driver use only, skip these in public documentation.
95+
*/
96+
9097
/**
9198
* @typedef rtc_api_set_time
9299
* @brief API for setting RTC time
@@ -174,6 +181,8 @@ __subsystem struct rtc_driver_api {
174181
#endif /* CONFIG_RTC_CALIBRATION */
175182
};
176183

184+
/** @endcond */
185+
177186
/**
178187
* @brief API for setting RTC time.
179188
*
@@ -213,9 +222,7 @@ static inline int z_impl_rtc_get_time(const struct device *dev, struct rtc_time
213222
}
214223

215224
/**
216-
* @brief RTC Interface Alarm
217-
* @defgroup rtc_interface_alarm RTC Interface Alarm
218-
* @ingroup rtc_interface
225+
* @name RTC Interface Alarm
219226
* @{
220227
*/
221228
#if defined(CONFIG_RTC_ALARM) || defined(__DOXYGEN__)
@@ -227,7 +234,7 @@ static inline int z_impl_rtc_get_time(const struct device *dev, struct rtc_time
227234
* @param id Id of the alarm
228235
* @param mask Mask of fields in the alarm time which are supported
229236
*
230-
* @note Bits in the mask param are defined here \ref rtc_alarm_time_mask
237+
* @note Bits in the mask param are defined here @ref RTC_ALARM_TIME_MASK.
231238
*
232239
* @return 0 if successful
233240
* @return -EINVAL if id is out of range or time is invalid
@@ -265,7 +272,7 @@ static inline int z_impl_rtc_alarm_get_supported_fields(const struct device *dev
265272
*
266273
* @note The timeptr param may be NULL if the mask param is 0
267274
* @note Only the enabled fields in the timeptr param need to be configured
268-
* @note Bits in the mask param are defined here \ref rtc_alarm_time_mask
275+
* @note Bits in the mask param are defined here @ref RTC_ALARM_TIME_MASK
269276
*
270277
* @return 0 if successful
271278
* @return -EINVAL if id is out of range or time is invalid
@@ -295,7 +302,7 @@ static inline int z_impl_rtc_alarm_set_time(const struct device *dev, uint16_t i
295302
* @param mask Destination for mask of fields which are enabled in the alarm time
296303
* @param timeptr Destination for the alarm time
297304
*
298-
* @note Bits in the mask param are defined here \ref rtc_alarm_time_mask
305+
* @note Bits in the mask param are defined here @ref RTC_ALARM_TIME_MASK
299306
*
300307
* @return 0 if successful
301308
* @return -EINVAL if id is out of range
@@ -392,9 +399,7 @@ static inline int z_impl_rtc_alarm_set_callback(const struct device *dev, uint16
392399
*/
393400

394401
/**
395-
* @brief RTC Interface Update
396-
* @defgroup rtc_interface_update RTC Interface Update
397-
* @ingroup rtc_interface
402+
* @name RTC Interface Update
398403
* @{
399404
*/
400405
#if defined(CONFIG_RTC_UPDATE) || defined(__DOXYGEN__)
@@ -439,9 +444,7 @@ static inline int z_impl_rtc_update_set_callback(const struct device *dev,
439444
*/
440445

441446
/**
442-
* @brief RTC Interface Calibration
443-
* @defgroup rtc_interface_calibration RTC Interface Calibration
444-
* @ingroup rtc_interface
447+
* @name RTC Interface Calibration
445448
* @{
446449
*/
447450
#if defined(CONFIG_RTC_CALIBRATION) || defined(__DOXYGEN__)
@@ -504,8 +507,7 @@ static inline int z_impl_rtc_get_calibration(const struct device *dev, int32_t *
504507
*/
505508

506509
/**
507-
* @brief RTC Interface Helpers
508-
* @ingroup rtc_interface
510+
* @name RTC Interface Helpers
509511
* @{
510512
*/
511513

0 commit comments

Comments
 (0)