From c7bfb855848e5885b329acd13e2f29dce7de0a34 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Sat, 21 Nov 2020 09:52:03 +0900 Subject: [PATCH] arch/arm/src/stm32f0l0g0/stm32_tim_lowerhalf.c: Appease nxstyle --- .../arm/src/stm32f0l0g0/stm32_tim_lowerhalf.c | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/arch/arm/src/stm32f0l0g0/stm32_tim_lowerhalf.c b/arch/arm/src/stm32f0l0g0/stm32_tim_lowerhalf.c index f2b75582bdd..3622b6bcf62 100644 --- a/arch/arm/src/stm32f0l0g0/stm32_tim_lowerhalf.c +++ b/arch/arm/src/stm32f0l0g0/stm32_tim_lowerhalf.c @@ -206,7 +206,6 @@ static struct stm32_lowerhalf_s g_tim8_lowerhalf = }; #endif - #ifdef CONFIG_STM32F0L0G0_TIM12 static struct stm32_lowerhalf_s g_tim12_lowerhalf = { @@ -300,8 +299,8 @@ static int stm32_timer_handler(int irq, void * context, void * arg) * Start the timer, resetting the time to the current timeout, * * Input Parameters: - * lower - A pointer the publicly visible representation of the "lower-half" - * driver state structure. + * lower - A pointer the publicly visible representation of the + * "lower-half" driver state structure. * * Returned Value: * Zero on success; a negated errno value on failure. @@ -340,8 +339,8 @@ static int stm32_start(FAR struct timer_lowerhalf_s *lower) * Stop the timer * * Input Parameters: - * lower - A pointer the publicly visible representation of the "lower-half" - * driver state structure. + * lower - A pointer the publicly visible representation of the + * "lower-half" driver state structure. * * Returned Value: * Zero on success; a negated errno value on failure. @@ -407,6 +406,7 @@ static int stm32_getstatus(FAR struct timer_lowerhalf_s *lower, } /* Get timeout */ + clock = STM32_TIM_GETCLOCK(priv->tim); period = STM32_TIM_GETPERIOD(priv->tim); @@ -422,6 +422,7 @@ static int stm32_getstatus(FAR struct timer_lowerhalf_s *lower, status->timeout = timeout; /* Get the time remaining until the timer expires (in microseconds) */ + counter = STM32_TIM_GETCOUNTER(priv->tim); status->timeleft = ((uint64_t) (timeout - counter) * clock) / 1000000; tmrinfo("timeout=%u counter=%u\n", timeout, counter); @@ -473,7 +474,8 @@ static int stm32_settimeout(FAR struct timer_lowerhalf_s *lower, period = (uint32_t) timeout; } - tmrinfo(" clock=%lu period=%lu maxtimeout=%lu\n", clock, period, (uint32_t) maxtimeout); + tmrinfo(" clock=%lu period=%lu maxtimeout=%lu\n", clock, period, + (uint32_t)maxtimeout); STM32_TIM_SETCLOCK(priv->tim, clock); STM32_TIM_SETPERIOD(priv->tim, period); @@ -487,8 +489,8 @@ static int stm32_settimeout(FAR struct timer_lowerhalf_s *lower, * Call this user provided timeout callback. * * Input Parameters: - * lower - A pointer the publicly visible representation of the "lower- - * half" driver state structure. + * lower - A pointer the publicly visible representation of the + * "lower-half" driver state structure. * callback - The new timer expiration function pointer. If this * function pointer is NULL, then the reset-on-expiration * behavior is restored, @@ -627,7 +629,7 @@ int stm32_timer_initialize(FAR const char *devpath, int timer) break; #endif default: - return -ENODEV;; + return -ENODEV; } /* Initialize the elements of lower half state structure */