Lines Matching refs:p_cb
207 static void call_event_handler(twis_control_block_t const * p_cb, in call_event_handler() argument
210 nrfx_twis_event_handler_t handler = p_cb->ev_handler; in call_event_handler()
229 static inline void nrfx_twis_process_error(twis_control_block_t * p_cb, in nrfx_twis_process_error() argument
241 p_cb->error |= error; in nrfx_twis_process_error()
243 call_event_handler(p_cb, &evdata); in nrfx_twis_process_error()
246 static void irq_handler(NRF_TWIS_Type * p_reg, twis_control_block_t * p_cb) in irq_handler() argument
251 if (p_cb->semaphore) in irq_handler()
255 p_cb->semaphore = 1; in irq_handler()
261 nrfx_twis_substate_t substate = p_cb->substate; in irq_handler()
297 call_event_handler(p_cb, &evdata); in irq_handler()
316 call_event_handler(p_cb, &evdata); in irq_handler()
324 nrfx_twis_process_error(p_cb, in irq_handler()
342 nrfx_twis_process_error(p_cb, in irq_handler()
360 call_event_handler(p_cb, &evdata); in irq_handler()
368 nrfx_twis_process_error(p_cb, in irq_handler()
387 nrfx_twis_process_error(p_cb, in irq_handler()
401 call_event_handler(p_cb, &evdata); in irq_handler()
409 nrfx_twis_process_error(p_cb, in irq_handler()
423 p_cb->substate = substate; in irq_handler()
426 p_cb->semaphore = 0; in irq_handler()
436 twis_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twis_preprocess_status() local
437 if (NULL == p_cb->ev_handler) in nrfx_twis_preprocess_status()
439 irq_handler(p_reg, p_cb); in nrfx_twis_preprocess_status()
497 twis_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twis_init() local
499 if (p_cb->state != NRFX_DRV_STATE_UNINITIALIZED) in nrfx_twis_init()
528 p_cb->ev_handler = event_handler; in nrfx_twis_init()
531 p_cb->skip_gpio_cfg = p_config->skip_gpio_cfg; in nrfx_twis_init()
547 p_cb->semaphore = 0; in nrfx_twis_init()
550 p_cb->substate = NRFX_TWIS_SUBSTATE_IDLE; in nrfx_twis_init()
551 p_cb->state = NRFX_DRV_STATE_INITIALIZED; in nrfx_twis_init()
578 twis_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twis_uninit() local
579 NRFX_ASSERT(p_cb->state != NRFX_DRV_STATE_UNINITIALIZED); in nrfx_twis_uninit()
583 if (!p_cb->skip_gpio_cfg) in nrfx_twis_uninit()
594 p_cb->ev_handler = NULL; in nrfx_twis_uninit()
595 p_cb->state = NRFX_DRV_STATE_UNINITIALIZED; in nrfx_twis_uninit()
602 twis_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twis_enable() local
603 NRFX_ASSERT(p_cb->state == NRFX_DRV_STATE_INITIALIZED); in nrfx_twis_enable()
608 if (NULL != p_cb->ev_handler) in nrfx_twis_enable()
614 p_cb->error = 0; in nrfx_twis_enable()
615 p_cb->state = NRFX_DRV_STATE_POWERED_ON; in nrfx_twis_enable()
616 p_cb->substate = NRFX_TWIS_SUBSTATE_IDLE; in nrfx_twis_enable()
623 twis_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twis_disable() local
624 NRFX_ASSERT(p_cb->state != NRFX_DRV_STATE_UNINITIALIZED); in nrfx_twis_disable()
629 p_cb->state = NRFX_DRV_STATE_INITIALIZED; in nrfx_twis_disable()
711 twis_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twis_error_get_and_clear() local
712 return nrfx_twis_error_get_and_clear_internal(&p_cb->error); in nrfx_twis_error_get_and_clear()
721 twis_control_block_t const * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twis_tx_prepare() local
724 if (p_cb->state != NRFX_DRV_STATE_POWERED_ON) in nrfx_twis_tx_prepare()
770 twis_control_block_t const * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twis_rx_prepare() local
773 if (p_cb->state != NRFX_DRV_STATE_POWERED_ON) in nrfx_twis_rx_prepare()
817 twis_control_block_t const * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twis_is_busy() local
818 return NRFX_TWIS_SUBSTATE_IDLE != p_cb->substate; in nrfx_twis_is_busy()
824 twis_control_block_t const * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twis_is_waiting_tx_buff() local
825 return NRFX_TWIS_SUBSTATE_READ_WAITING == p_cb->substate; in nrfx_twis_is_waiting_tx_buff()
831 twis_control_block_t const * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twis_is_waiting_rx_buff() local
832 return NRFX_TWIS_SUBSTATE_WRITE_WAITING == p_cb->substate; in nrfx_twis_is_waiting_rx_buff()
838 twis_control_block_t const * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twis_is_pending_tx() local
839 return NRFX_TWIS_SUBSTATE_READ_PENDING == p_cb->substate; in nrfx_twis_is_pending_tx()
845 twis_control_block_t const * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twis_is_pending_rx() local
846 return NRFX_TWIS_SUBSTATE_WRITE_PENDING == p_cb->substate; in nrfx_twis_is_pending_rx()