Skip to content

PR1 review: Add STM32RTC library sources files #2

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

Merged
merged 16 commits into from
Apr 25, 2018

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Apr 24, 2018

Review of #1

This fix and enhance the preview PR:

  • Use scoped enumerations to unified enumerations definitions and hardened the code.
  • Init properly members during begin()
  • Fix alarm match parameters usage. Before only MATCH_DHHMMSS was partially managed (match only one time not every month). Now all possible Alarm_Match value are handled.
  • Remove getHours(void)/getAlarmHours(void)
    Use same methods with its default parameters value.
    • uint8_t getHours(RTC_AM_PM *period = NULL);
    • uint8_t getAlarmHours(RTC_AM_PM *period = NULL);
  • Add private methods to factorize code:
    • syncTime()
    • syncDate()
    • syncAlarmTime()
  • Add public methods:
    • end()
    • getPrediv()
    • setPrediv

fpr and others added 9 commits October 26, 2017 16:59
Signed-off-by: fpr <[email protected]>
Signed-off-by: fpr <[email protected]>
Signed-off-by: fpr <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
Unified enumerations definitions and hardened the code.

Signed-off-by: Frederic.Pillon <[email protected]>
Use same methods with its default parameters value.
 * uint8_t getHours(RTC_AM_PM *period = NULL);
 * uint8_t getAlarmHours(RTC_AM_PM *period = NULL);

Signed-off-by: Frederic.Pillon <[email protected]>
@fpistm fpistm added the enhancement New feature or request label Apr 24, 2018
@fpistm fpistm self-assigned this Apr 24, 2018
fpistm added 7 commits April 24, 2018 14:38
Add syncTime, syncDate and syncAlarmTime to factorize code.

Signed-off-by: Frederic.Pillon <[email protected]>
_day  -> _wday is a week day (1 to 7)
_date -> _day is the day (1 to 31)
_alarmDate -> _alarmDay is the alarm day (1 to 31)

Signed-off-by: Frederic.Pillon <[email protected]>
Before only MATCH_DHHMMSS was done.

Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
Added:
isConfigured
getPrediv
setPrediv
IS_CLOCK_SOURCE
IS_HOUR_FORMAT
MATCH_OFF
MATCH_SS
MATCH_MMSS
MATCH_HHMMSS
MATCH_DHHMMSS
MATCH_MMDDHHMMSS
MATCH_YYMMDDHHMMSS

Updated enum value:
RTC_HOUR_12
RTC_HOUR_24
RTC_AM
RTC_PM

Signed-off-by: Frederic.Pillon <[email protected]>
@fpistm fpistm merged commit fa452ad into stm32duino:master Apr 25, 2018
@fpistm fpistm deleted the pr177-review branch April 25, 2018 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant