Skip to content

Commit

Permalink
drivers: nrfx_rtc: Fix assertion check in tick and overflow enable
Browse files Browse the repository at this point in the history
Fix assertion check in tick and overflow enable to permit
them be callable after rtc is enabled.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
  • Loading branch information
Vinayak Kariappa Chettimada committed Dec 16, 2024
1 parent 85c444e commit 1c1a50b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/src/nrfx_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ nrfx_err_t nrfx_rtc_cc_set(nrfx_rtc_t const * p_instance,

void nrfx_rtc_tick_enable(nrfx_rtc_t const * p_instance, bool enable_irq)
{
NRFX_ASSERT(m_cb[p_instance->instance_id].state == NRFX_DRV_STATE_INITIALIZED);
NRFX_ASSERT(m_cb[p_instance->instance_id].state != NRFX_DRV_STATE_UNINITIALIZED);

nrfy_rtc_event_int_clear_enable(p_instance->p_reg,
NRF_RTC_EVENT_TICK,
Expand All @@ -244,7 +244,7 @@ void nrfx_rtc_tick_disable(nrfx_rtc_t const * p_instance)

void nrfx_rtc_overflow_enable(nrfx_rtc_t const * p_instance, bool enable_irq)
{
NRFX_ASSERT(m_cb[p_instance->instance_id].state == NRFX_DRV_STATE_INITIALIZED);
NRFX_ASSERT(m_cb[p_instance->instance_id].state != NRFX_DRV_STATE_UNINITIALIZED);

nrfy_rtc_event_int_clear_enable(p_instance->p_reg,
NRF_RTC_EVENT_OVERFLOW,
Expand Down

0 comments on commit 1c1a50b

Please sign in to comment.