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.
|
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: dev@ziggurat29.com
|
* Author: dev@ziggurat29.com
|
||||||
@ -62,7 +62,6 @@
|
|||||||
#define STM32L4_RTC_ALRMBSSR_OFFSET 0x0048 /* RTC alarm B sub second register */
|
#define STM32L4_RTC_ALRMBSSR_OFFSET 0x0048 /* RTC alarm B sub second register */
|
||||||
#define STM32L4_RTC_OR_OFFSET 0x004c /* RTC option register */
|
#define STM32L4_RTC_OR_OFFSET 0x004c /* RTC option register */
|
||||||
|
|
||||||
|
|
||||||
#define STM32L4_RTC_BKR_OFFSET(n) (0x0050+((n)<<2))
|
#define STM32L4_RTC_BKR_OFFSET(n) (0x0050+((n)<<2))
|
||||||
#define STM32L4_RTC_BK0R_OFFSET 0x0050 /* RTC backup register 0 */
|
#define STM32L4_RTC_BK0R_OFFSET 0x0050 /* RTC backup register 0 */
|
||||||
#define STM32L4_RTC_BK1R_OFFSET 0x0054 /* RTC backup register 1 */
|
#define STM32L4_RTC_BK1R_OFFSET 0x0054 /* RTC backup register 1 */
|
||||||
|
@ -52,13 +52,10 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_RTC_DRIVER
|
#ifdef CONFIG_RTC_DRIVER
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* This is the private type for the RTC state. It must be cast compatible
|
/* This is the private type for the RTC state. It must be cast compatible
|
||||||
* with struct rtc_lowerhalf_s.
|
* with struct rtc_lowerhalf_s.
|
||||||
*/
|
*/
|
||||||
@ -89,6 +86,7 @@ static int stm32l4_settime(FAR struct rtc_lowerhalf_s *lower,
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* STM32 RTC driver operations */
|
/* STM32 RTC driver operations */
|
||||||
|
|
||||||
static const struct rtc_ops_s g_rtc_ops =
|
static const struct rtc_ops_s g_rtc_ops =
|
||||||
|
@ -63,6 +63,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/* Configuration ********************************************************************/
|
/* Configuration ********************************************************************/
|
||||||
/* This RTC implementation supports only date/time RTC hardware */
|
/* This RTC implementation supports only date/time RTC hardware */
|
||||||
|
|
||||||
@ -111,10 +112,6 @@
|
|||||||
# define rtcllvdbg(x...)
|
# define rtcllvdbg(x...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Private Types
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
@ -136,6 +133,7 @@ volatile bool g_rtc_enabled = false;
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: rtc_dumpregs
|
* 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)
|
static void rtc_wprunlock(void)
|
||||||
{
|
{
|
||||||
/* Enable write access to the backup domain.
|
/* Enable write access to the backup domain. */
|
||||||
*/
|
|
||||||
|
|
||||||
(void)stm32l4_pwr_enablebkp(true);
|
(void)stm32l4_pwr_enablebkp(true);
|
||||||
|
|
||||||
@ -260,8 +257,7 @@ static inline void rtc_wprlock(void)
|
|||||||
|
|
||||||
putreg32(0xff, STM32L4_RTC_WPR);
|
putreg32(0xff, STM32L4_RTC_WPR);
|
||||||
|
|
||||||
/* Disable write access to the backup domain.
|
/* Disable write access to the backup domain. */
|
||||||
*/
|
|
||||||
|
|
||||||
(void)stm32l4_pwr_enablebkp(false);
|
(void)stm32l4_pwr_enablebkp(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user