Lines Matching +full:bit +full:- +full:per +full:- +full:seconds

4  * SPDX-License-Identifier: Apache-2.0
9 * @brief Real-time clock control based on the DS3231 counter API.
12 * DS3231](https://www.maximintegrated.com/en/products/analog/real-time-clocks/DS3231.html)
13 * is a high-precision real-time clock with temperature-compensated
28 * functionality exposed by this header to access the real-time-clock
46 /** @brief Bit in ctrl or ctrl_stat associated with alarm 1. */
47 #define MAXIM_DS3231_ALARM1 BIT(0)
49 /** @brief Bit in ctrl or ctrl_stat associated with alarm 2. */
50 #define MAXIM_DS3231_ALARM2 BIT(1)
57 /** @brief ctrl bit for alarm 1 interrupt enable. */
60 /** @brief ctrl bit for alarm 2 interrupt enable. */
63 /** @brief ctrl bit for ISQ functionality.
68 * @note The driver expects to be able to control this bit.
70 #define MAXIM_DS3231_REG_CTRL_INTCN BIT(2)
72 /** @brief ctrl bit offset for square wave output frequency.
93 /** @brief ctrl bit to write to trigger temperature conversion. */
94 #define MAXIM_DS3231_REG_CTRL_CONV BIT(5)
96 /** @brief ctrl bit to write to enable square wave output in battery mode. */
97 #define MAXIM_DS3231_REG_CTRL_BBSQW BIT(6)
99 /** @brief ctrl bit to write to disable the oscillator. */
100 #define MAXIM_DS3231_REG_CTRL_EOSCn BIT(7),
102 /** @brief ctrl_stat bit indicating alarm1 has triggered.
104 * If an alarm callback handler is registered this bit is
110 /** @brief ctrl_stat bit indicating alarm2 has triggered.
112 * If an alarm callback handler is registered this bit is
119 #define MAXIM_DS3231_REG_STAT_BSY BIT(2)
123 * @note This is a control bit, though it is positioned within the
126 #define MAXIM_DS3231_REG_STAT_EN32kHz BIT(3)
129 #define MAXIM_DS3231_REG_STAT_OSF BIT(7)
131 /** @brief Control alarm behavior on match in seconds field.
133 * If clear the alarm fires only when the RTC seconds matches the
134 * alarm seconds.
136 * If set the alarm seconds field is ignored and an alarm will be
140 * This bit must be clear for the second alarm instance.
142 * Bit maps to A1M1 and is used in
145 #define MAXIM_DS3231_ALARM_FLAGS_IGNSE BIT(0)
150 * alarm minutes. The bit for IGNSE must be clear.
156 * Bit maps to A1M2 or A2M2 and is used in
159 #define MAXIM_DS3231_ALARM_FLAGS_IGNMN BIT(1)
167 * triggered based on IGNMN and IGNSE. The bit for IGNDA must be set.
169 * Bit maps to A1M3 or A2M3 and is used in
172 #define MAXIM_DS3231_ALARM_FLAGS_IGNHR BIT(2)
183 * Bit maps to A1M4 or A2M4 and is used in
186 #define MAXIM_DS3231_ALARM_FLAGS_IGNDA BIT(3)
193 * Bit maps to DY/DTn in corresponding
196 #define MAXIM_DS3231_ALARM_FLAGS_DOW BIT(4)
207 #define MAXIM_DS3231_ALARM_FLAGS_AUTODISABLE BIT(7)
210 * @brief RTC DS3231 Driver-Specific API
267 * component hours, minutes, seconds, day-of-week, and
268 * day-of-month fields, mediated by the corresponding #flags.
271 * determines day-of-week based on calendar date. Decoded
272 * alarm times will fall within 1978-01 since 1978-01-01
296 /** @brief User-provided pointer passed to alarm callback. */
304 * if a unit is not ignored, higher-precision units must also
306 * match on minutes and seconds must also be enabled. Failure
339 * Synchronization aligns the DS3231 real-time clock with a stable
348 * frequency of the target-specific clock is provided by
352 * kernel extensions may make a higher-resolution clock available.
354 * @note This function is *isr-ok*.
392 * @return the non-negative updated value of the register, or a
424 * @return the non-negative register value as originally read
447 * @return a non-negative value indicating successful conversion, or a
471 * @return a non-negative value on success, or a negative error code
480 * The RTC advances one tick per second with no access to sub-second
481 * precision. Synchronizing clocks at sub-second resolution requires
499 * @retval non-negative on success
500 * @retval -EBUSY if a synchronization or set is currently in progress
501 * @retval -EINVAL if notify is not provided
502 * @retval -ENOTSUP if the required interrupt is not configured
514 * @param signal pointer to a valid and ready-to-be-signalled
518 * @retval non-negative on success
519 * @retval -EBUSY if a synchronization or set is currently in progress
520 * @retval -ENOTSUP if the required interrupt is not configured
534 * @retval non-negative on success
535 * @retval -ENOENT if no syncpoint has been captured
543 * The RTC advances one tick per second with no access to sub-second
546 * clock while retaining as much sub-second accuracy as possible. It
547 * requires a synchronization point that pairs sub-second resolution
562 * @retval non-negative on success
563 * @retval -EINVAL if syncpoint or notify are null
564 * @retval -ENOTSUP if the required interrupt signal is not configured
565 * @retval -EBUSY if a synchronization or set is currently in progress
585 * @return a non-negative value that may have MAXIM_DS3231_ALARM1 and/or