Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: nrfx_rtc: Fix assertion check in tick and overflow enable #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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