Lines Matching refs:ep_abs_idx

262 	uint8_t ep_abs_idx =  EP_ABS_IDX(cfg->ep_addr);  in usb_dc_ep_check_cap()  local
270 if (ep_abs_idx >= NUM_OF_EP_MAX) { in usb_dc_ep_check_cap()
280 uint8_t ep_abs_idx = EP_ABS_IDX(cfg->ep_addr); in usb_dc_ep_configure() local
282 struct usb_ep_ctrl_data *eps = &dev_state.eps[ep_abs_idx]; in usb_dc_ep_configure()
291 if (ep_abs_idx >= NUM_OF_EP_MAX) { in usb_dc_ep_configure()
296 if (dev_state.eps[ep_abs_idx].ep_enabled) { in usb_dc_ep_configure()
332 dev_state.eps[ep_abs_idx].ep_mps = cfg->ep_mps; in usb_dc_ep_configure()
347 dev_state.eps[ep_abs_idx].ep_occupied = true; in usb_dc_ep_configure()
349 dev_state.eps[ep_abs_idx].ep_enabled = true; in usb_dc_ep_configure()
357 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in usb_dc_ep_set_stall() local
360 if (ep_abs_idx >= NUM_OF_EP_MAX) { in usb_dc_ep_set_stall()
379 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in usb_dc_ep_clear_stall() local
382 if (ep_abs_idx >= NUM_OF_EP_MAX) { in usb_dc_ep_clear_stall()
399 (uint8_t *)dev_state.eps[ep_abs_idx].block, in usb_dc_ep_clear_stall()
400 (uint32_t)dev_state.eps[ep_abs_idx].ep_mps); in usb_dc_ep_clear_stall()
406 dev_state.eps[ep_abs_idx].ep_occupied = true; in usb_dc_ep_clear_stall()
414 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in usb_dc_ep_is_stalled() local
418 if (ep_abs_idx >= NUM_OF_EP_MAX) { in usb_dc_ep_is_stalled()
450 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in usb_dc_ep_enable() local
457 if (!ep_abs_idx) { in usb_dc_ep_enable()
461 if (ep_abs_idx >= NUM_OF_EP_MAX) { in usb_dc_ep_enable()
466 if (dev_state.eps[ep_abs_idx].ep_occupied) { in usb_dc_ep_enable()
475 (uint8_t *)dev_state.eps[ep_abs_idx].block, in usb_dc_ep_enable()
476 (uint32_t)dev_state.eps[ep_abs_idx].ep_mps); in usb_dc_ep_enable()
482 dev_state.eps[ep_abs_idx].ep_occupied = true; in usb_dc_ep_enable()
488 dev_state.eps[ep_abs_idx].ep_occupied = true; in usb_dc_ep_enable()
496 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in usb_dc_ep_disable() local
499 if (ep_abs_idx >= NUM_OF_EP_MAX) { in usb_dc_ep_disable()
514 dev_state.eps[ep_abs_idx].ep_enabled = false; in usb_dc_ep_disable()
515 dev_state.eps[ep_abs_idx].ep_occupied = false; in usb_dc_ep_disable()
522 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in usb_dc_ep_flush() local
524 if (ep_abs_idx >= NUM_OF_EP_MAX) { in usb_dc_ep_flush()
529 LOG_DBG("Not implemented, idx 0x%02x, ep %u", ep_abs_idx, ep); in usb_dc_ep_flush()
537 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in usb_dc_ep_write() local
542 if (ep_abs_idx >= NUM_OF_EP_MAX) { in usb_dc_ep_write()
557 buffer = (uint8_t *)dev_state.eps[ep_abs_idx].block; in usb_dc_ep_write()
559 if (data_len > dev_state.eps[ep_abs_idx].ep_mps) { in usb_dc_ep_write()
560 len_to_send = dev_state.eps[ep_abs_idx].ep_mps; in usb_dc_ep_write()
616 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in usb_dc_ep_read_wait() local
620 if (dev_state.eps[ep_abs_idx].ep_occupied) { in usb_dc_ep_read_wait()
625 if ((ep_abs_idx >= NUM_OF_EP_MAX) || in usb_dc_ep_read_wait()
641 bufp = dev_state.eps[ep_abs_idx].transfer_message.buffer; in usb_dc_ep_read_wait()
642 data_len = dev_state.eps[ep_abs_idx].transfer_message.length; in usb_dc_ep_read_wait()
685 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in usb_dc_ep_read_continue() local
688 if (ep_abs_idx >= NUM_OF_EP_MAX || in usb_dc_ep_read_continue()
694 if (dev_state.eps[ep_abs_idx].ep_occupied) { in usb_dc_ep_read_continue()
711 (uint8_t *)dev_state.eps[ep_abs_idx].block, in usb_dc_ep_read_continue()
712 dev_state.eps[ep_abs_idx].ep_mps); in usb_dc_ep_read_continue()
718 dev_state.eps[ep_abs_idx].ep_occupied = true; in usb_dc_ep_read_continue()
745 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in usb_dc_ep_set_callback() local
747 if (ep_abs_idx >= NUM_OF_EP_MAX) { in usb_dc_ep_set_callback()
755 dev_state.eps[ep_abs_idx].callback = cb; in usb_dc_ep_set_callback()
767 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in usb_dc_ep_mps() local
769 if (ep_abs_idx >= NUM_OF_EP_MAX) { in usb_dc_ep_mps()
774 return dev_state.eps[ep_abs_idx].ep_mps; in usb_dc_ep_mps()
780 uint8_t ep_abs_idx = 0; in handle_bus_reset() local
801 ep_abs_idx = EP_ABS_IDX(ep_init.endpointAddress); in handle_bus_reset()
802 dev_state.eps[ep_abs_idx].ep_mps = USB_CONTROL_EP_MPS; in handle_bus_reset()
811 dev_state.eps[ep_abs_idx].ep_occupied = false; in handle_bus_reset()
812 dev_state.eps[ep_abs_idx].ep_enabled = true; in handle_bus_reset()
815 ep_abs_idx = EP_ABS_IDX(ep_init.endpointAddress); in handle_bus_reset()
816 dev_state.eps[ep_abs_idx].ep_mps = USB_CONTROL_EP_MPS; in handle_bus_reset()
824 dev_state.eps[ep_abs_idx].ep_occupied = false; in handle_bus_reset()
825 dev_state.eps[ep_abs_idx].ep_enabled = true; in handle_bus_reset()
832 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in handle_transfer_msg() local
835 dev_state.eps[ep_abs_idx].ep_occupied = false; in handle_transfer_msg()
850 if ((dev_state.dev_struct.deviceAddress != 0) && (ep_abs_idx == 1)) { in handle_transfer_msg()
873 if (dev_state.eps[ep_abs_idx].callback) { in handle_transfer_msg()
880 dev_state.eps[ep_abs_idx].callback(ep, ep_status_code); in handle_transfer_msg()
898 uint8_t ep_abs_idx; in usb_mcux_thread_main() local
918 ep_abs_idx = EP_ABS_IDX(msg.code); in usb_mcux_thread_main()
920 if (ep_abs_idx >= NUM_OF_EP_MAX) { in usb_mcux_thread_main()
925 memcpy(&dev_state.eps[ep_abs_idx].transfer_message, &msg, in usb_mcux_thread_main()
927 handle_transfer_msg(&dev_state.eps[ep_abs_idx].transfer_message); in usb_mcux_thread_main()