Lines Matching refs:p_spis
155 NRF_SPIS_Type * p_spis = p_instance->p_reg; in spis_configure() local
168 nrf_spis_pins_set(p_spis, in spis_configure()
192 uint32_t csn_pin = nrf_spis_csn_pin_get(p_spis); in spis_configure()
234 nrf_spis_configure(p_spis, p_config->mode, p_config->bit_order); in spis_configure()
237 nrf_spis_def_set(p_spis, p_config->def); in spis_configure()
238 nrf_spis_orc_set(p_spis, p_config->orc); in spis_configure()
241 nrf_spis_event_clear(p_spis, NRF_SPIS_EVENT_END); in spis_configure()
242 nrf_spis_event_clear(p_spis, NRF_SPIS_EVENT_ACQUIRED); in spis_configure()
245 nrf_spis_shorts_enable(p_spis, NRF_SPIS_SHORT_END_ACQUIRE); in spis_configure()
264 NRF_SPIS_Type * p_spis = p_instance->p_reg; in nrfx_spis_init() local
283 if (nrfx_prs_acquire(p_spis, in nrfx_spis_init()
315 nrfx_prs_release(p_spis); in nrfx_spis_init()
343 nrfx_prs_release(p_spis); in nrfx_spis_init()
349 nrf_spis_rx_buffer_set(p_spis, NULL, 0); in nrfx_spis_init()
350 nrf_spis_tx_buffer_set(p_spis, NULL, 0); in nrfx_spis_init()
354 nrf_spis_int_enable(p_spis, NRF_SPIS_INT_ACQUIRED_MASK | in nrfx_spis_init()
360 nrf_spis_enable(p_spis); in nrfx_spis_init()
397 NRF_SPIS_Type * p_spis = p_instance->p_reg; in nrfx_spis_uninit() local
416 nrf_spis_disable(p_spis); in nrfx_spis_uninit()
418 nrf_spis_int_disable(p_spis, DISABLE_ALL); in nrfx_spis_uninit()
423 nrf_gpio_cfg_default(nrf_spis_sck_pin_get(p_spis)); in nrfx_spis_uninit()
424 nrf_gpio_cfg_default(nrf_spis_csn_pin_get(p_spis)); in nrfx_spis_uninit()
426 uint32_t miso_pin = nrf_spis_miso_pin_get(p_spis); in nrfx_spis_uninit()
432 uint32_t mosi_pin = nrf_spis_mosi_pin_get(p_spis); in nrfx_spis_uninit()
440 nrfx_prs_release(p_spis); in nrfx_spis_uninit()
455 static void spis_state_entry_action_execute(NRF_SPIS_Type * p_spis, in spis_state_entry_action_execute() argument
463 nrf_spis_task_trigger(p_spis, NRF_SPIS_TASK_ACQUIRE); in spis_state_entry_action_execute()
477 event.rx_amount = nrf_spis_rx_amount_get(p_spis); in spis_state_entry_action_execute()
478 event.tx_amount = nrf_spis_tx_amount_get(p_spis); in spis_state_entry_action_execute()
513 static void spis_state_change(NRF_SPIS_Type * p_spis, in spis_state_change() argument
518 spis_state_entry_action_execute(p_spis, p_cb); in spis_state_change()
581 static void irq_handler(NRF_SPIS_Type * p_spis, spis_cb_t * p_cb) in irq_handler() argument
589 if (nrf_spis_event_check(p_spis, NRF_SPIS_EVENT_ACQUIRED)) in irq_handler()
591 nrf_spis_event_clear(p_spis, NRF_SPIS_EVENT_ACQUIRED); in irq_handler()
603 nrf_spis_tx_buffer_set(p_spis, (uint8_t *)p_cb->tx_buffer, p_cb->tx_buffer_size); in irq_handler()
604 nrf_spis_rx_buffer_set(p_spis, (uint8_t *)p_cb->rx_buffer, p_cb->rx_buffer_size); in irq_handler()
610 nrf_spis_task_trigger(p_spis, NRF_SPIS_TASK_RELEASE); in irq_handler()
612 spis_state_change(p_spis, p_cb, SPIS_BUFFER_RESOURCE_CONFIGURED); in irq_handler()
622 if (nrf_spis_event_check(p_spis, NRF_SPIS_EVENT_END)) in irq_handler()
624 nrf_spis_event_clear(p_spis, NRF_SPIS_EVENT_END); in irq_handler()
630 spis_state_change(p_spis, p_cb, SPIS_XFER_COMPLETED); in irq_handler()