@@ -321,7 +321,7 @@ void RTC_init(hourFormat_t format, sourceClock_t source)
321
321
RTC_SetDate (17 , 1 , 1 , 7 );
322
322
323
323
/*at 0:0:0*/
324
- RTC_SetTime (0 ,0 ,0 ,0 ,AM );
324
+ RTC_SetTime (0 ,0 ,0 ,0 ,HOUR_AM );
325
325
326
326
#if !defined(STM32F1xx ) && !defined(STM32F2xx ) && !defined(STM32L1xx ) || defined(STM32L1_ULPH )
327
327
/* Enable Direct Read of the calendar registers (not through Shadow) */
@@ -349,7 +349,7 @@ void RTC_DeInit(void)
349
349
* @param minutes: 0-59
350
350
* @param seconds: 0-59
351
351
* @param subSeconds: 0-999
352
- * @param period: select AM or PM period in case RTC is set in 12 hours mode. Else ingored.
352
+ * @param period: select HOUR_AM or HOUR_PM period in case RTC is set in 12 hours mode. Else ingored.
353
353
* @retval None
354
354
*/
355
355
void RTC_SetTime (uint8_t hours , uint8_t minutes , uint8_t seconds , uint32_t subSeconds , hourAM_PM_t period )
@@ -358,7 +358,7 @@ void RTC_SetTime(uint8_t hours, uint8_t minutes, uint8_t seconds, uint32_t subSe
358
358
359
359
/* Ignore time AM PM configuration if in 24 hours format */
360
360
if (initFormat == HOUR_FORMAT_24 ) {
361
- period = AM ;
361
+ period = HOUR_AM ;
362
362
}
363
363
364
364
if ((((initFormat == HOUR_FORMAT_24 ) && IS_RTC_HOUR24 (hours )) || IS_RTC_HOUR12 (hours ))
@@ -367,7 +367,7 @@ void RTC_SetTime(uint8_t hours, uint8_t minutes, uint8_t seconds, uint32_t subSe
367
367
RTC_TimeStruct .Minutes = minutes ;
368
368
RTC_TimeStruct .Seconds = seconds ;
369
369
#if !defined(STM32F1xx )
370
- if (period == PM ) {
370
+ if (period == HOUR_PM ) {
371
371
RTC_TimeStruct .TimeFormat = RTC_HOURFORMAT12_PM ;
372
372
} else {
373
373
RTC_TimeStruct .TimeFormat = RTC_HOURFORMAT12_AM ;
@@ -395,7 +395,7 @@ void RTC_SetTime(uint8_t hours, uint8_t minutes, uint8_t seconds, uint32_t subSe
395
395
* @param minutes: 0-59
396
396
* @param seconds: 0-59
397
397
* @param subSeconds: 0-999 (optional could be NULL)
398
- * @param period: AM or PM period in case RTC is set in 12 hours mode (optional could be NULL).
398
+ * @param period: HOUR_AM or HOUR_PM period in case RTC is set in 12 hours mode (optional could be NULL).
399
399
* @retval None
400
400
*/
401
401
void RTC_GetTime (uint8_t * hours , uint8_t * minutes , uint8_t * seconds , uint32_t * subSeconds , hourAM_PM_t * period )
@@ -410,9 +410,9 @@ void RTC_GetTime(uint8_t *hours, uint8_t *minutes, uint8_t *seconds, uint32_t *s
410
410
#if !defined(STM32F1xx )
411
411
if (period != NULL ) {
412
412
if (RTC_TimeStruct .TimeFormat == RTC_HOURFORMAT12_PM ) {
413
- * period = PM ;
413
+ * period = HOUR_PM ;
414
414
} else {
415
- * period = AM ;
415
+ * period = HOUR_AM ;
416
416
}
417
417
}
418
418
#if (!defined(STM32F2xx ) && !defined(STM32L1xx )) || defined(STM32L1_ULPH )
@@ -478,7 +478,7 @@ void RTC_GetDate(uint8_t *year, uint8_t *month, uint8_t *day, uint8_t *wday)
478
478
* @param minutes: 0-59
479
479
* @param seconds: 0-59
480
480
* @param subSeconds: 0-999
481
- * @param period: AM or PM if in 12 hours mode else ignored.
481
+ * @param period: HOUR_AM or HOUR_PM if in 12 hours mode else ignored.
482
482
* @param mask: configure alarm behavior using alarmMask_t combination.
483
483
* See AN4579 Table 5 for possible values.
484
484
* @retval None
@@ -489,7 +489,7 @@ void RTC_StartAlarm(uint8_t day, uint8_t hours, uint8_t minutes, uint8_t seconds
489
489
490
490
/* Ignore time AM PM configuration if in 24 hours format */
491
491
if (initFormat == HOUR_FORMAT_24 ) {
492
- period = AM ;
492
+ period = HOUR_AM ;
493
493
}
494
494
495
495
if ((((initFormat == HOUR_FORMAT_24 ) && IS_RTC_HOUR24 (hours )) || IS_RTC_HOUR12 (hours ))
@@ -507,7 +507,7 @@ void RTC_StartAlarm(uint8_t day, uint8_t hours, uint8_t minutes, uint8_t seconds
507
507
#else
508
508
UNUSED (subSeconds );
509
509
#endif /* !STM32F2xx && !STM32L1xx || STM32L1_ULPH */
510
- if (period == PM ) {
510
+ if (period == HOUR_PM ) {
511
511
RTC_AlarmStructure .AlarmTime .TimeFormat = RTC_HOURFORMAT12_PM ;
512
512
} else {
513
513
RTC_AlarmStructure .AlarmTime .TimeFormat = RTC_HOURFORMAT12_AM ;
@@ -567,7 +567,7 @@ void RTC_StopAlarm(void)
567
567
* @param minutes: 0-59
568
568
* @param seconds: 0-59
569
569
* @param subSeconds: 0-999 (optional could be NULL)
570
- * @param period: AM or PM (optional could be NULL)
570
+ * @param period: HOUR_AM or HOUR_PM (optional could be NULL)
571
571
* @param mask: alarm behavior using alarmMask_t combination (optional could be NULL)
572
572
* See AN4579 Table 5 for possible values
573
573
* @retval None
@@ -589,9 +589,9 @@ void RTC_GetAlarm(uint8_t *day, uint8_t *hours, uint8_t *minutes, uint8_t *secon
589
589
}
590
590
if (period != NULL ) {
591
591
if (RTC_AlarmStructure .AlarmTime .TimeFormat == RTC_HOURFORMAT12_PM ) {
592
- * period = PM ;
592
+ * period = HOUR_PM ;
593
593
} else {
594
- * period = AM ;
594
+ * period = HOUR_AM ;
595
595
}
596
596
}
597
597
#if !defined(STM32F2xx ) && !defined(STM32L1xx ) || defined(STM32L1_ULPH )
0 commit comments