stm32h7: Addresses tickless PR review comments
This commit is contained in:
parent
896435e7c9
commit
baeb2e9af7
@ -90,10 +90,10 @@ CHIP_CSRCS = stm32_allocateheap.c stm32_exti_gpio.c stm32_gpio.c stm32_irq.c
|
||||
CHIP_CSRCS += stm32_start.c stm32_rcc.c stm32_lowputc.c stm32_serial.c
|
||||
CHIP_CSRCS += stm32_uid.c
|
||||
|
||||
ifneq ($(CONFIG_SCHED_TICKLESS),y)
|
||||
CHIP_CSRCS += stm32_timerisr.c
|
||||
else
|
||||
ifeq ($(CONFIG_SCHED_TICKLESS),y)
|
||||
CHIP_CSRCS += stm32_tickless.c
|
||||
else
|
||||
CHIP_CSRCS += stm32_timerisr.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_STM32H7_ONESHOT),y)
|
||||
|
@ -541,10 +541,10 @@ void up_timer_initialize(void)
|
||||
g_tickless.overflow = 0;
|
||||
|
||||
tmrinfo("timer=%d channel=%d frequency=%lu Hz\n",
|
||||
g_tickless.timer, g_tickless.channel, g_tickless.frequency);
|
||||
g_tickless.timer, g_tickless.channel, g_tickless.frequency);
|
||||
|
||||
g_tickless.tch = stm32_tim_init(g_tickless.timer);
|
||||
if (!g_tickless.tch)
|
||||
if (g_tickless.tch == NULL)
|
||||
{
|
||||
tmrerr("ERROR: Failed to allocate TIM%d\n", g_tickless.timer);
|
||||
DEBUGASSERT(0);
|
||||
@ -640,7 +640,7 @@ int up_timer_gettime(FAR struct timespec *ts)
|
||||
|
||||
/* Timer not initialized yet, return zero */
|
||||
|
||||
if (g_tickless.tch == 0)
|
||||
if (g_tickless.tch == NULL)
|
||||
{
|
||||
ts->tv_nsec = 0;
|
||||
ts->tv_sec = 0;
|
||||
@ -817,7 +817,7 @@ int up_timer_cancel(FAR struct timespec *ts)
|
||||
* (as when pre-emption is enabled and disabled).
|
||||
*/
|
||||
|
||||
if (ts)
|
||||
if (ts != NULL)
|
||||
{
|
||||
ts->tv_sec = 0;
|
||||
ts->tv_nsec = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user