Cosmetic changes from review of last PR
This commit is contained in:
parent
0143b3869a
commit
5c1c5079ea
@ -54,10 +54,6 @@
|
||||
#include "stm32l4_gpio.h"
|
||||
#include "stm32l4_exti.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
@ -66,10 +62,6 @@
|
||||
|
||||
static xcpt_t stm32l4_exti_callback;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
@ -100,6 +100,7 @@ struct stm32l4_lowerhalf_s
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/* Prototypes for static methods in struct rtc_ops_s */
|
||||
|
||||
static int stm32l4_rdtime(FAR struct rtc_lowerhalf_s *lower,
|
||||
@ -179,7 +180,7 @@ static void stm32l4_alarm_callback(FAR void *arg, unsigned int alarmid)
|
||||
lower = (struct stm32l4_lowerhalf_s *)arg;
|
||||
cbinfo = &lower->cbinfo[alarmid];
|
||||
|
||||
/* Sample and clear the callback information to minimize the window in
|
||||
/* Sample and clear the callback information to minimize the window in
|
||||
* time in which race conditions can occur.
|
||||
*/
|
||||
|
||||
@ -195,7 +196,6 @@ static void stm32l4_alarm_callback(FAR void *arg, unsigned int alarmid)
|
||||
{
|
||||
cb(priv, alarmid);
|
||||
}
|
||||
|
||||
}
|
||||
#endif /* CONFIG_RTC_ALARM */
|
||||
|
||||
@ -298,7 +298,7 @@ static int stm32l4_settime(FAR struct rtc_lowerhalf_s *lower,
|
||||
|
||||
#ifdef CONFIG_RTC_ALARM
|
||||
static int stm32l4_setalarm(FAR struct rtc_lowerhalf_s *lower,
|
||||
FAR const struct lower_setalarm_s *alarminfo)
|
||||
FAR const struct lower_setalarm_s *alarminfo)
|
||||
{
|
||||
FAR struct stm32l4_lowerhalf_s *priv;
|
||||
FAR struct stm32l4_cbinfo_s *cbinfo;
|
||||
@ -367,7 +367,7 @@ static int stm32l4_setalarm(FAR struct rtc_lowerhalf_s *lower,
|
||||
|
||||
#ifdef CONFIG_RTC_ALARM
|
||||
static int stm32l4_setrelative(FAR struct rtc_lowerhalf_s *lower,
|
||||
FAR const struct lower_setrelative_s *alarminfo)
|
||||
FAR const struct lower_setrelative_s *alarminfo)
|
||||
{
|
||||
struct lower_setalarm_s setalarm;
|
||||
struct tm time;
|
||||
@ -380,7 +380,7 @@ static int stm32l4_setrelative(FAR struct rtc_lowerhalf_s *lower,
|
||||
if ((alarminfo->id == RTC_ALARMA || alarminfo->id == RTC_ALARMB) &&
|
||||
alarminfo->reltime > 0)
|
||||
{
|
||||
/* Disable preemption while we do this so that we don't have to worry
|
||||
/* Disable pre-emption while we do this so that we don't have to worry
|
||||
* about being suspended and working on an old time.
|
||||
*/
|
||||
|
||||
|
@ -112,7 +112,8 @@
|
||||
(rtc_bin2bcd((tm)->tm_min) << RTC_ALRMR_MNU_SHIFT) | \
|
||||
(rtc_bin2bcd((tm)->tm_hour) << RTC_ALRMR_HU_SHIFT))
|
||||
|
||||
/* need to ignore DATE/DOW part of alarm; rtc_reg_alrmr_bin2bcd only encodes hms */
|
||||
/* Need to ignore DATE/DOW part of alarm; rtc_reg_alrmr_bin2bcd only encodes hms */
|
||||
|
||||
#define RTC_ALRMR_ENABLE (0x80000000)
|
||||
|
||||
/* Debug ****************************************************************************/
|
||||
@ -995,8 +996,6 @@ int up_rtc_initialize(void)
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32l4_rtc_getdatetime_with_subseconds
|
||||
*
|
||||
@ -1324,7 +1323,7 @@ int stm32l4_rtc_setalarm(FAR struct alm_setalarm_s *alminfo)
|
||||
* Name: stm32l4_rtc_cancelalarm
|
||||
*
|
||||
* Description:
|
||||
* Cancel an alaram.
|
||||
* Cancel an alarm.
|
||||
*
|
||||
* Input Parameters:
|
||||
* alarmid - Identifies the alarm to be cancelled
|
||||
@ -1378,7 +1377,7 @@ int stm32l4_rtc_cancelalarm(enum alm_id_e alarmid)
|
||||
break;
|
||||
|
||||
case RTC_ALARMB:
|
||||
{
|
||||
{
|
||||
/* Cancel the global callback function */
|
||||
|
||||
g_alarmcb[alarmid].ac_cb = NULL;
|
||||
@ -1405,8 +1404,8 @@ int stm32l4_rtc_cancelalarm(enum alm_id_e alarmid)
|
||||
putreg32(-1, STM32L4_RTC_ALRMBR);
|
||||
modifyreg32(STM32L4_RTC_ISR, RTC_ISR_ALRBF, 0);
|
||||
rtc_wprlock();
|
||||
ret = OK;
|
||||
}
|
||||
ret = OK;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user