forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: rtc: Wrong alarm mask in rtc_alarm_get_time
Fixing 3 issues: 1. The mask can be wrong if the alarm register is set to a MAX value because the alarm bit is the highest in the alarm register. The mask is now generated by checking the AE_x bits in the time registers. 2. Fixing possible NULL pointer exception in alarm_set_time API. timeptr can be set to NULL with mask 0 in the alarm_set_time function. The regs variable for the I2C communication is written with the correct value from timeptr only when the right bit in the mask is set. 3. rv8263c8_alarm_set_time() now resets the alarm status. 4. Interrupts are now enabled by using rv8263c8_alarm_set_time() rather than when setting an alarm callback. Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
- Loading branch information
1 parent
ebc7a4a
commit e5d4b66
Showing
1 changed file
with
42 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters