7d1bfb51ae
A Cortex-M specific function (sys_clock_isr()) was defined as a weak function, so in practice it was always available when system clock was enabled, even if no Cortex-M systick was available. This patch introduces an auxiliary Kconfig option that, when selected, the ISR function gets installed. External SysTick drivers can also make use of this function, thus achieving the same functionality offered today but in a cleaner way. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
28 lines
495 B
C
28 lines
495 B
C
/*
|
|
* Copyright (c) 2015 Wind River Systems, Inc.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* @brief Initialize system clock driver
|
|
*
|
|
* Initializing the timer driver is done in this module to reduce code
|
|
* duplication.
|
|
*/
|
|
|
|
#include <kernel.h>
|
|
#include <init.h>
|
|
#include <drivers/timer/system_timer.h>
|
|
|
|
/* Weak-linked noop defaults for optional driver interfaces*/
|
|
|
|
void __weak sys_clock_set_timeout(int32_t ticks, bool idle)
|
|
{
|
|
}
|
|
|
|
void __weak sys_clock_idle_exit(void)
|
|
{
|
|
}
|