Home
last modified time | relevance | path

Searched refs:p_cb (Results 1 – 15 of 15) sorted by relevance

/hal_nordic-3.5.0/nrfx/drivers/src/
Dnrfx_twi.c139 static bool xfer_completeness_check(NRF_TWI_Type * p_twi, twi_control_block_t const * p_cb) in xfer_completeness_check() argument
147 if (p_cb->bytes_transferred != p_cb->curr_length) in xfer_completeness_check()
182 twi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_twi_init() local
185 if (p_cb->state != NRFX_DRV_STATE_UNINITIALIZED) in nrfx_twi_init()
209 p_cb->handler = event_handler; in nrfx_twi_init()
210 p_cb->p_context = p_context; in nrfx_twi_init()
211 p_cb->int_mask = 0; in nrfx_twi_init()
212 p_cb->prev_suspend = TWI_NO_SUSPEND; in nrfx_twi_init()
213 p_cb->repeated = false; in nrfx_twi_init()
214 p_cb->busy = false; in nrfx_twi_init()
[all …]
Dnrfx_spi.c143 spi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_spi_init() local
146 if (p_cb->state != NRFX_DRV_STATE_UNINITIALIZED) in nrfx_spi_init()
170 p_cb->handler = handler; in nrfx_spi_init()
171 p_cb->p_context = p_context; in nrfx_spi_init()
175 p_cb->skip_gpio_cfg = p_config->skip_gpio_cfg; in nrfx_spi_init()
176 p_cb->ss_pin = p_config->ss_pin; in nrfx_spi_init()
177 p_cb->orc = p_config->orc; in nrfx_spi_init()
183 p_cb->transfer_in_progress = false; in nrfx_spi_init()
184 p_cb->state = NRFX_DRV_STATE_INITIALIZED; in nrfx_spi_init()
195 spi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_spi_reconfigure() local
[all …]
Dnrfx_uart.c150 uart_control_block_t const * p_cb = &m_cb[p_instance->drv_inst_idx]; in pins_to_default() local
163 if (!p_cb->skip_psel_cfg) in pins_to_default()
169 if (!p_cb->skip_gpio_cfg) in pins_to_default()
195 uart_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_uart_init() local
198 if (p_cb->state != NRFX_DRV_STATE_UNINITIALIZED) in nrfx_uart_init()
221 p_cb->handler = event_handler; in nrfx_uart_init()
225 p_cb->p_context = p_config->p_context; in nrfx_uart_init()
226 p_cb->skip_gpio_cfg = p_config->skip_gpio_cfg; in nrfx_uart_init()
227 p_cb->skip_psel_cfg = p_config->skip_psel_cfg; in nrfx_uart_init()
232 p_cb->rx_buffer_length = 0; in nrfx_uart_init()
[all …]
Dnrfx_twim.c134 static bool xfer_completeness_check(NRF_TWIM_Type * p_twim, twim_control_block_t const * p_cb) in xfer_completeness_check() argument
143 switch (p_cb->xfer_type) in xfer_completeness_check()
149 if (((p_cb->int_mask & NRF_TWIM_INT_SUSPENDED_MASK) && in xfer_completeness_check()
150 (nrfy_twim_txd_amount_get(p_twim) != p_cb->xfer_desc_primary.length)) || in xfer_completeness_check()
151 (!(p_cb->int_mask & NRF_TWIM_INT_SUSPENDED_MASK) && in xfer_completeness_check()
152 (nrfy_twim_txd_amount_get(p_twim) != p_cb->xfer_desc_secondary.length))) in xfer_completeness_check()
158 if ((nrfy_twim_txd_amount_get(p_twim) != p_cb->xfer_desc_primary.length) || in xfer_completeness_check()
159 (nrfy_twim_rxd_amount_get(p_twim) != p_cb->xfer_desc_secondary.length)) in xfer_completeness_check()
165 if (nrfy_twim_txd_amount_get(p_twim) != p_cb->xfer_desc_primary.length) in xfer_completeness_check()
171 if (nrfy_twim_rxd_amount_get(p_twim) != p_cb->xfer_desc_primary.length) in xfer_completeness_check()
[all …]
Dnrfx_uarte.c147 uarte_control_block_t const * p_cb = &m_cb[p_instance->drv_inst_idx]; in pins_to_default() local
152 if (!p_cb->skip_psel_cfg) in pins_to_default()
156 if (!p_cb->skip_gpio_cfg) in pins_to_default()
222 uarte_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_uarte_init() local
225 if (p_cb->state != NRFX_DRV_STATE_UNINITIALIZED) in nrfx_uarte_init()
249 p_cb->handler = event_handler; in nrfx_uarte_init()
253 p_cb->p_context = p_config->p_context; in nrfx_uarte_init()
254 p_cb->skip_gpio_cfg = p_config->skip_gpio_cfg; in nrfx_uarte_init()
255 p_cb->skip_psel_cfg = p_config->skip_psel_cfg; in nrfx_uarte_init()
260 p_cb->rx_buffer_length = 0; in nrfx_uarte_init()
[all …]
Dnrfx_i2s.c217 nrfx_i2s_cb_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_i2s_init() local
219 if (p_cb->state != NRFX_DRV_STATE_UNINITIALIZED) in nrfx_i2s_init()
269 p_cb->handler = handler; in nrfx_i2s_init()
270 p_cb->skip_gpio_cfg = p_config->skip_gpio_cfg; in nrfx_i2s_init()
271 p_cb->skip_psel_cfg = p_config->skip_psel_cfg; in nrfx_i2s_init()
280 p_cb->state = NRFX_DRV_STATE_INITIALIZED; in nrfx_i2s_init()
288 nrfx_i2s_cb_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_i2s_uninit() local
290 NRFX_ASSERT(p_cb->state != NRFX_DRV_STATE_UNINITIALIZED); in nrfx_i2s_uninit()
297 if (!p_cb->skip_gpio_cfg) in nrfx_i2s_uninit()
303 if (!p_cb->skip_psel_cfg) in nrfx_i2s_uninit()
[all …]
Dnrfx_spis.c170 spis_cb_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in spis_configure() local
174 if (p_cb->csn_pin != NRF_SPIS_PIN_NOT_CONNECTED) in spis_configure()
176 nrfx_gpiote_pin_uninit(p_cb->csn_pin); in spis_configure()
177 p_cb->csn_pin = NRF_SPIS_PIN_NOT_CONNECTED; in spis_configure()
190 .p_in_channel = &p_cb->gpiote_ch in spis_configure()
209 p_cb->csn_pin = csn_pin; in spis_configure()
239 spis_cb_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_spis_init() local
244 if (p_cb->state != NRFX_DRV_STATE_UNINITIALIZED) in nrfx_spis_init()
268 p_cb->handler = event_handler; in nrfx_spis_init()
269 p_cb->p_context = p_context; in nrfx_spis_init()
[all …]
Dnrfx_pwm.c172 pwm_control_block_t * p_cb = &m_cb[p_instance->instance_id]; in pwm_stopped_check() local
174 if (!p_cb->handler) in pwm_stopped_check()
179 p_cb->state = NRFX_DRV_STATE_INITIALIZED; in pwm_stopped_check()
183 return p_cb->state != NRFX_DRV_STATE_POWERED_ON; in pwm_stopped_check()
193 pwm_control_block_t * p_cb = &m_cb[p_instance->instance_id]; in nrfx_pwm_init() local
195 if (p_cb->state != NRFX_DRV_STATE_UNINITIALIZED) in nrfx_pwm_init()
204 p_cb->handler = handler; in nrfx_pwm_init()
205 p_cb->p_context = p_context; in nrfx_pwm_init()
209 p_cb->skip_gpio_cfg = p_config->skip_gpio_cfg; in nrfx_pwm_init()
215 p_cb->state = NRFX_DRV_STATE_INITIALIZED; in nrfx_pwm_init()
[all …]
Dnrfx_wdt.c73 wdt_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in wdt_configure() local
74 if (p_cb->wdt_event_handler) in wdt_configure()
89 wdt_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_wdt_init() local
94 p_cb->wdt_event_handler = wdt_event_handler; in nrfx_wdt_init()
97 if (p_cb->state == NRFX_DRV_STATE_UNINITIALIZED) in nrfx_wdt_init()
99 p_cb->state = NRFX_DRV_STATE_INITIALIZED; in nrfx_wdt_init()
124 wdt_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_wdt_reconfigure() local
126 if (p_cb->state == NRFX_DRV_STATE_UNINITIALIZED) in nrfx_wdt_reconfigure()
130 if (p_cb->state == NRFX_DRV_STATE_POWERED_ON) in nrfx_wdt_reconfigure()
140 wdt_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_wdt_enable() local
[all …]
Dnrfx_twis.c207 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()
[all …]
Dnrfx_spim.c199 static void spim_abort(NRF_SPIM_Type * p_spim, spim_control_block_t * p_cb) in spim_abort() argument
209 p_cb->transfer_in_progress = false; in spim_abort()
249 spim_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in configure_pins() local
251 p_cb->ss_active_high = p_config->ss_active_high; in configure_pins()
441 spim_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in spim_configure() local
449 p_cb->skip_gpio_cfg = p_config->skip_gpio_cfg; in spim_configure()
457 p_cb->ss_pin = NRF_SPIM_PIN_NOT_CONNECTED; in spim_configure()
462 p_cb->ss_pin = p_config->ss_pin; in spim_configure()
463 p_cb->ss_active_high = p_config->ss_active_high; in spim_configure()
512 spim_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_spim_init() local
[all …]
Dnrfx_qdec.c119 qdec_control_block_t * const p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_qdec_init() local
123 if (p_cb->state != NRFX_DRV_STATE_UNINITIALIZED) in nrfx_qdec_init()
132 p_cb->handler = handler; in nrfx_qdec_init()
133 p_cb->p_context = p_context; in nrfx_qdec_init()
137 p_cb->skip_gpio_cfg = p_config->skip_gpio_cfg; in nrfx_qdec_init()
141 p_cb->state = NRFX_DRV_STATE_INITIALIZED; in nrfx_qdec_init()
152 qdec_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_qdec_reconfigure() local
154 if (p_cb->state == NRFX_DRV_STATE_UNINITIALIZED) in nrfx_qdec_reconfigure()
158 if (p_cb->state == NRFX_DRV_STATE_POWERED_ON) in nrfx_qdec_reconfigure()
170 qdec_control_block_t * const p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_qdec_uninit() local
[all …]
Dnrfx_egu.c111 egu_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_egu_init() local
113 if (p_cb->state != NRFX_DRV_STATE_UNINITIALIZED) in nrfx_egu_init()
118 p_cb->state = NRFX_DRV_STATE_INITIALIZED; in nrfx_egu_init()
119 p_cb->p_context = p_context; in nrfx_egu_init()
120 p_cb->handler = event_handler; in nrfx_egu_init()
161 egu_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; in nrfx_egu_uninit() local
166 p_cb->state = NRFX_DRV_STATE_UNINITIALIZED; in nrfx_egu_uninit()
169 static void irq_handler(NRF_EGU_Type * p_reg, egu_control_block_t * p_cb) in irq_handler() argument
180 p_cb->handler(event_idx, p_cb->p_context); in irq_handler()
Dnrfx_timer.c124 timer_control_block_t * p_cb = &m_cb[p_instance->instance_id]; in nrfx_timer_init() local
128 if (p_cb->state != NRFX_DRV_STATE_UNINITIALIZED) in nrfx_timer_init()
137 p_cb->handler = timer_event_handler; in nrfx_timer_init()
141 p_cb->context = p_config->p_context; in nrfx_timer_init()
151 p_cb->state = err_code == NRFX_SUCCESS ? in nrfx_timer_init()
163 timer_control_block_t * p_cb = &m_cb[p_instance->instance_id]; in nrfx_timer_reconfigure() local
165 if (p_cb->state == NRFX_DRV_STATE_UNINITIALIZED) in nrfx_timer_reconfigure()
169 if (p_cb->state == NRFX_DRV_STATE_POWERED_ON) in nrfx_timer_reconfigure()
174 p_cb->context = p_config->p_context; in nrfx_timer_reconfigure()
335 timer_control_block_t * p_cb, in irq_handler() argument
[all …]
Dnrfx_rtc.c260 nrfx_rtc_cb_t * p_cb, in irq_handler() argument
280 p_cb->handler((nrfx_rtc_int_type_t)i); in irq_handler()
287 p_cb->handler(NRFX_RTC_INT_TICK); in irq_handler()
293 p_cb->handler(NRFX_RTC_INT_OVERFLOW); in irq_handler()