Lines Matching refs:p_cb

575 static nrfx_gpiote_handler_config_t const * channel_handler_get(gpiote_control_block_t * p_cb,  in channel_handler_get()  argument
578 int32_t handler_id = PIN_GET_HANDLER_ID(p_cb->pin_flags[get_pin_idx(pin)]); in channel_handler_get()
585 return &p_cb->handlers[handler_id]; in channel_handler_get()
804 gpiote_control_block_t * p_cb = get_cb(p_instance->drv_inst_idx); in gpiote_init() local
808 (int)p_cb->channels_number, (int)p_cb->available_channels_mask); in gpiote_init()
810 if (p_cb->state != NRFX_DRV_STATE_UNINITIALIZED) in gpiote_init()
823 memset(p_cb->pin_flags, 0, sizeof(p_cb->pin_flags)); in gpiote_init()
829 p_cb->channels_number); in gpiote_init()
831 p_cb->state = NRFX_DRV_STATE_INITIALIZED; in gpiote_init()
832 p_cb->available_evt_handlers = NRFX_BIT_MASK(NRFX_GPIOTE_CONFIG_NUM_OF_EVT_HANDLERS); in gpiote_init()
1082 gpiote_control_block_t * p_cb = get_cb(p_instance->drv_inst_idx); in nrfx_gpiote_channels_number_get() local
1084 return p_cb->channels_number; in nrfx_gpiote_channels_number_get()
1407 static void call_handler(gpiote_control_block_t * p_cb, in call_handler() argument
1411 nrfx_gpiote_handler_config_t const * handler = channel_handler_get(p_cb, pin); in call_handler()
1417 if (p_cb->global_handler.handler) in call_handler()
1419 p_cb->global_handler.handler(pin, trigger, p_cb->global_handler.p_context); in call_handler()
1423 static void next_sense_cond_call_handler(gpiote_control_block_t * p_cb, in next_sense_cond_call_handler() argument
1430 call_handler(p_cb, pin, trigger); in next_sense_cond_call_handler()
1456 call_handler(p_cb, pin, trigger); in next_sense_cond_call_handler()
1482 static void port_event_handle(NRF_GPIOTE_Type * p_gpiote, gpiote_control_block_t * p_cb) in port_event_handle() argument
1486 latch_pending_read_and_check(latch, p_cb->available_gpio_ports); in port_event_handle()
1491 if (nrf_bitmask_bit_is_set(port_index[i], &p_cb->available_gpio_ports)) in port_event_handle()
1501 PIN_FLAG_TRIG_MODE_GET(p_cb->pin_flags[get_pin_idx(abs_pin)]); in port_event_handle()
1506 next_sense_cond_call_handler(p_cb, abs_pin, trigger, sense); in port_event_handle()
1520 p_cb->channels_number); in port_event_handle()
1521 } while (latch_pending_read_and_check(latch, p_cb->available_gpio_ports)); in port_event_handle()
1559 static void port_event_handle(NRF_GPIOTE_Type * p_gpiote, gpiote_control_block_t * p_cb) in port_event_handle() argument
1569 if (nrf_bitmask_bit_is_set(port_index[port_idx], &p_cb->available_gpio_ports)) in port_event_handle()
1572 pins_to_check[port_idx] = p_cb->port_pins[port_idx]; in port_event_handle()
1589 trigger = PIN_FLAG_TRIG_MODE_GET(p_cb->pin_flags[get_pin_idx(pin)]); in port_event_handle()
1597 next_sense_cond_call_handler(p_cb, pin, trigger, sense); in port_event_handle()
1604 if (nrf_bitmask_bit_is_set(port_index[port_idx], &p_cb->available_gpio_ports)) in port_event_handle()
1608 pins_to_check[port_idx] = p_cb->port_pins[port_idx]; in port_event_handle()
1623 trigger = PIN_FLAG_TRIG_MODE_GET(p_cb->pin_flags[get_pin_idx(pin)]); in port_event_handle()
1639 p_cb->channels_number); in port_event_handle()
1640 } while (input_read_and_check(input, pins_to_check, p_cb->available_gpio_ports)); in port_event_handle()
1645 gpiote_control_block_t * p_cb, in gpiote_evt_handle() argument
1655 call_handler(p_cb, pin, gpiote_polarity_to_trigger(polarity)); in gpiote_evt_handle()
1659 static void irq_handler(NRF_GPIOTE_Type * p_gpiote, gpiote_control_block_t * p_cb) in irq_handler() argument
1666 p_cb->channels_number); in irq_handler()
1671 port_event_handle(p_gpiote, p_cb); in irq_handler()
1676 gpiote_evt_handle(p_gpiote, p_cb, evt_mask); in irq_handler()