Trivial changes from review of last PR
This commit is contained in:
parent
8b1bcecbb1
commit
eb6fbc3059
@ -1,5 +1,5 @@
|
||||
/************************************************************************************
|
||||
* arch/arm/src/stm32l4/chip/stm32l4_rtcc.h.h
|
||||
* arch/arm/src/stm32l4/chip/stm32l4_rtcc.h
|
||||
*
|
||||
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||
* Author: dev@ziggurat29.com
|
||||
@ -62,7 +62,6 @@
|
||||
#define STM32L4_RTC_ALRMBSSR_OFFSET 0x0048 /* RTC alarm B sub second register */
|
||||
#define STM32L4_RTC_OR_OFFSET 0x004c /* RTC option register */
|
||||
|
||||
|
||||
#define STM32L4_RTC_BKR_OFFSET(n) (0x0050+((n)<<2))
|
||||
#define STM32L4_RTC_BK0R_OFFSET 0x0050 /* RTC backup register 0 */
|
||||
#define STM32L4_RTC_BK1R_OFFSET 0x0054 /* RTC backup register 1 */
|
||||
|
@ -52,13 +52,10 @@
|
||||
|
||||
#ifdef CONFIG_RTC_DRIVER
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/* This is the private type for the RTC state. It must be cast compatible
|
||||
* with struct rtc_lowerhalf_s.
|
||||
*/
|
||||
@ -82,13 +79,14 @@ struct stm32l4_lowerhalf_s
|
||||
/* Prototypes for static methods in struct rtc_ops_s */
|
||||
|
||||
static int stm32l4_rdtime(FAR struct rtc_lowerhalf_s *lower,
|
||||
FAR struct rtc_time *rtctime);
|
||||
FAR struct rtc_time *rtctime);
|
||||
static int stm32l4_settime(FAR struct rtc_lowerhalf_s *lower,
|
||||
FAR const struct rtc_time *rtctime);
|
||||
FAR const struct rtc_time *rtctime);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/* STM32 RTC driver operations */
|
||||
|
||||
static const struct rtc_ops_s g_rtc_ops =
|
||||
@ -156,7 +154,7 @@ static struct stm32l4_lowerhalf_s g_rtc_lowerhalf =
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32l4_rdtime(FAR struct rtc_lowerhalf_s *lower,
|
||||
FAR struct rtc_time *rtctime)
|
||||
FAR struct rtc_time *rtctime)
|
||||
{
|
||||
/* This operation depends on the fact that struct rtc_time is cast
|
||||
* compatible with struct tm.
|
||||
@ -182,7 +180,7 @@ static int stm32l4_rdtime(FAR struct rtc_lowerhalf_s *lower,
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32l4_settime(FAR struct rtc_lowerhalf_s *lower,
|
||||
FAR const struct rtc_time *rtctime)
|
||||
FAR const struct rtc_time *rtctime)
|
||||
{
|
||||
/* This operation depends on the fact that struct rtc_time is cast
|
||||
* compatible with struct tm.
|
||||
|
@ -63,6 +63,7 @@
|
||||
/************************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
|
||||
/* Configuration ********************************************************************/
|
||||
/* This RTC implementation supports only date/time RTC hardware */
|
||||
|
||||
@ -111,10 +112,6 @@
|
||||
# define rtcllvdbg(x...)
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Private Types
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Private Data
|
||||
************************************************************************************/
|
||||
@ -136,6 +133,7 @@ volatile bool g_rtc_enabled = false;
|
||||
/************************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: rtc_dumpregs
|
||||
*
|
||||
@ -222,8 +220,7 @@ static void rtc_dumptime(FAR const struct tm *tp, FAR const char *msg)
|
||||
|
||||
static void rtc_wprunlock(void)
|
||||
{
|
||||
/* Enable write access to the backup domain.
|
||||
*/
|
||||
/* Enable write access to the backup domain. */
|
||||
|
||||
(void)stm32l4_pwr_enablebkp(true);
|
||||
|
||||
@ -260,8 +257,7 @@ static inline void rtc_wprlock(void)
|
||||
|
||||
putreg32(0xff, STM32L4_RTC_WPR);
|
||||
|
||||
/* Disable write access to the backup domain.
|
||||
*/
|
||||
/* Disable write access to the backup domain. */
|
||||
|
||||
(void)stm32l4_pwr_enablebkp(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user