-
Notifications
You must be signed in to change notification settings - Fork 1k
PR 177 review: Add RTC driver #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: fpr <[email protected]>
Signed-off-by: fpr <[email protected]>
#if defined(STM32L100xBA) || defined (STM32L151xBA) || defined (STM32L152xBA) ||\ defined(STM32L100xC) || defined (STM32L151xC) || defined (STM32L152xC) ||\ defined (STM32L162xC) || defined(STM32L151xCA) || defined (STM32L151xD) ||\ defined (STM32L152xCA) || defined (STM32L152xD) || defined (STM32L162xCA) ||\ defined (STM32L162xD) || defined(STM32L151xE) || defined(STM32L151xDX) ||\ defined (STM32L152xE) || defined (STM32L152xDX) || defined (STM32L162xE) ||\ defined (STM32L162xDX) #define STM32L1_ULPH #endif Signed-off-by: Frederic.Pillon <[email protected]>
day -> wday is a week day (1 to 7) date -> day is day (1 to 31). Mainly named "date" in HAL side format -> period is day period AM or PM. Mainly named "time format" in HAL side Signed-off-by: Frederic.Pillon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only minor comments - LGTM
cores/arduino/stm32/rtc.c
Outdated
@@ -546,7 +546,7 @@ void RTC_GetDate(uint8_t *year, uint8_t *month, uint8_t *day, uint8_t *wday) | |||
* @param period: AM or PM if in 12 hours mode else ignored. | |||
* @retval None | |||
*/ | |||
void RTC_StartAlarm(uint8_t day, uint8_t hours, uint8_t minutes, uint8_t seconds, uint32_t subSeconds, hourAM_PM_t period) | |||
void RTC_StartAlarm(uint8_t day, uint8_t hours, uint8_t minutes, uint8_t seconds, uint32_t subSeconds, hourAM_PM_t period, uint8_t mask) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the "mask" parameter description of the function - need to clarify how this is going to be used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
RTC_SetClockSource() exported RTC_getPrediv() exported RTC_computePrediv() added Hardened code Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
Add RTC driver
Review of #177
This fix and enhance the preview PR:
To do in a further update manage the second alarm: RTC_ALARM_B