Skip to content

Commit 9cb38ec

Browse files
mmahadevan108cfriedt
authored andcommitted
drivers: mcux_os_timer: Fix build failure
z_nxp_os_timer_ignore_timer_wakeup() was only added when Standby mode was enabled. Move this function out of the conditional section. Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 5945a3f commit 9cb38ec

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/timer/mcux_os_timer.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ static const struct device *counter_dev =
4343
DEVICE_DT_GET_OR_NULL(DT_INST_PHANDLE(0, deep_sleep_counter));
4444
/* Indicates if the counter is running. */
4545
static bool counter_running;
46+
static uint32_t counter_max_val;
47+
#endif
4648
/* Indicates we received a call with ticks set to wait forever */
4749
static bool wait_forever;
4850
/* Incase of counter overflow, track the remaining ticks left */
4951
static uint32_t counter_remaining_ticks;
50-
static uint32_t counter_max_val;
51-
#endif
5252

5353
static uint64_t mcux_lpc_ostick_get_compensated_timer_value(void)
5454
{
@@ -191,11 +191,6 @@ static uint32_t mcux_lpc_ostick_compensate_system_timer(void)
191191
return 0;
192192
}
193193

194-
bool z_nxp_os_timer_ignore_timer_wakeup(void)
195-
{
196-
return (wait_forever || counter_remaining_ticks);
197-
}
198-
199194
static uint32_t mcux_os_timer_set_lp_counter_timeout(void)
200195
{
201196
uint64_t timeout;
@@ -233,6 +228,11 @@ static uint32_t mcux_os_timer_set_lp_counter_timeout(void)
233228
#define mcux_os_timer_set_lp_counter_timeout(...) do { } while (0)
234229
#endif
235230

231+
bool z_nxp_os_timer_ignore_timer_wakeup(void)
232+
{
233+
return (wait_forever || counter_remaining_ticks);
234+
}
235+
236236
void sys_clock_set_timeout(int32_t ticks, bool idle)
237237
{
238238
if (!IS_ENABLED(CONFIG_TICKLESS_KERNEL)) {

0 commit comments

Comments
 (0)