Lines Matching refs:ep_ctrl
115 struct usb_ep_ctrl_data ep_ctrl[NUM_OF_EP_MAX]; member
323 struct usb_ep_ctrl_data *ep_ctrl; in usb_dc_ep_configure() local
334 ep_ctrl = &dev_data.ep_ctrl[ep_idx]; in usb_dc_ep_configure()
336 if (ep_idx && (dev_data.ep_ctrl[ep_idx].status.in_enabled || in usb_dc_ep_configure()
337 dev_data.ep_ctrl[ep_idx].status.out_enabled)) { in usb_dc_ep_configure()
346 block = &(ep_ctrl->mblock_out); in usb_dc_ep_configure()
348 block = &(ep_ctrl->mblock_in); in usb_dc_ep_configure()
373 dev_data.ep_ctrl[ep_idx].mps_in = cfg->ep_mps; in usb_dc_ep_configure()
375 dev_data.ep_ctrl[ep_idx].mps_out = cfg->ep_mps; in usb_dc_ep_configure()
381 dev_data.ep_ctrl[ep_idx].status.out_data1 = false; in usb_dc_ep_configure()
382 dev_data.ep_ctrl[ep_idx].status.in_data1 = false; in usb_dc_ep_configure()
427 dev_data.ep_ctrl[ep_idx].status.out_stalled = 1U; in usb_dc_ep_set_stall()
429 ~dev_data.ep_ctrl[ep_idx].status.out_odd); in usb_dc_ep_set_stall()
431 dev_data.ep_ctrl[ep_idx].status.in_stalled = 1U; in usb_dc_ep_set_stall()
433 dev_data.ep_ctrl[ep_idx].status.in_odd); in usb_dc_ep_set_stall()
455 dev_data.ep_ctrl[ep_idx].status.out_stalled = 0U; in usb_dc_ep_clear_stall()
456 dev_data.ep_ctrl[ep_idx].status.out_data1 = false; in usb_dc_ep_clear_stall()
458 ~dev_data.ep_ctrl[ep_idx].status.out_odd); in usb_dc_ep_clear_stall()
462 dev_data.ep_ctrl[ep_idx].status.in_stalled = 0U; in usb_dc_ep_clear_stall()
463 dev_data.ep_ctrl[ep_idx].status.in_data1 = false; in usb_dc_ep_clear_stall()
465 dev_data.ep_ctrl[ep_idx].status.in_odd); in usb_dc_ep_clear_stall()
493 *stalled = dev_data.ep_ctrl[ep_idx].status.out_stalled; in usb_dc_ep_is_stalled()
495 *stalled = dev_data.ep_ctrl[ep_idx].status.in_stalled; in usb_dc_ep_is_stalled()
499 dev_data.ep_ctrl[ep_idx].status.in_odd); in usb_dc_ep_is_stalled()
502 ~dev_data.ep_ctrl[ep_idx].status.in_odd); in usb_dc_ep_is_stalled()
527 if (ep_idx && (dev_data.ep_ctrl[ep_idx].status.in_enabled || in usb_dc_ep_enable()
528 dev_data.ep_ctrl[ep_idx].status.out_enabled)) { in usb_dc_ep_enable()
536 dev_data.ep_ctrl[ep_idx].status.out_odd = 0U; in usb_dc_ep_enable()
537 dev_data.ep_ctrl[ep_idx].status.out_stalled = 0U; in usb_dc_ep_enable()
538 dev_data.ep_ctrl[ep_idx].status.out_data1 = false; in usb_dc_ep_enable()
539 dev_data.ep_ctrl[ep_idx].status.out_enabled = true; in usb_dc_ep_enable()
543 dev_data.ep_ctrl[ep_idx].status.in_odd = 0U; in usb_dc_ep_enable()
544 dev_data.ep_ctrl[ep_idx].status.in_stalled = 0U; in usb_dc_ep_enable()
545 dev_data.ep_ctrl[ep_idx].status.in_data1 = false; in usb_dc_ep_enable()
546 dev_data.ep_ctrl[ep_idx].status.in_enabled = true; in usb_dc_ep_enable()
573 dev_data.ep_ctrl[ep_idx].status.out_enabled = false; in usb_dc_ep_disable()
575 dev_data.ep_ctrl[ep_idx].status.in_enabled = false; in usb_dc_ep_disable()
609 odd = dev_data.ep_ctrl[ep_idx].status.in_odd; in usb_dc_ep_write()
618 if (dev_data.ep_ctrl[ep_idx].status.in_stalled) { in usb_dc_ep_write()
630 if (data_len > dev_data.ep_ctrl[ep_idx].mps_in) { in usb_dc_ep_write()
631 len_to_send = dev_data.ep_ctrl[ep_idx].mps_in; in usb_dc_ep_write()
640 dev_data.ep_ctrl[ep_idx].status.in_odd = ~odd; in usb_dc_ep_write()
641 if (dev_data.ep_ctrl[ep_idx].status.in_data1) { in usb_dc_ep_write()
650 dev_data.ep_ctrl[ep_idx].status.in_data1 ^= 1; in usb_dc_ep_write()
675 bd_idx = get_bdt_idx(ep, dev_data.ep_ctrl[ep_idx].status.out_odd); in usb_dc_ep_read_wait()
683 if (dev_data.ep_ctrl[ep_idx].status.out_stalled) { in usb_dc_ep_read_wait()
744 bd_idx = get_bdt_idx(ep, dev_data.ep_ctrl[ep_idx].status.out_odd); in usb_dc_ep_read_continue()
758 bd_idx = get_bdt_idx(ep, ~dev_data.ep_ctrl[ep_idx].status.out_odd); in usb_dc_ep_read_continue()
760 dev_data.ep_ctrl[ep_idx].status.out_data1 ^= 1; in usb_dc_ep_read_continue()
761 bdt[bd_idx].set.bc = dev_data.ep_ctrl[ep_idx].mps_out; in usb_dc_ep_read_continue()
764 if (dev_data.ep_ctrl[ep_idx].status.out_data1) { in usb_dc_ep_read_continue()
821 dev_data.ep_ctrl[ep_idx].cb_in = cb; in usb_dc_ep_set_callback()
823 dev_data.ep_ctrl[ep_idx].cb_out = cb; in usb_dc_ep_set_callback()
847 return dev_data.ep_ctrl[ep_idx].mps_in; in usb_dc_ep_mps()
849 return dev_data.ep_ctrl[ep_idx].mps_out; in usb_dc_ep_mps()
904 if (dev_data.ep_ctrl[0].status.out_stalled) { in usb_kinetis_isr_handler()
907 if (dev_data.ep_ctrl[0].status.in_stalled) { in usb_kinetis_isr_handler()
925 dev_data.ep_ctrl[ep_idx].status.out_odd = odd; in usb_kinetis_isr_handler()
933 dev_data.ep_ctrl[ep_idx].status.in_data1 = true; in usb_kinetis_isr_handler()
934 dev_data.ep_ctrl[ep_idx].status.out_data1 = false; in usb_kinetis_isr_handler()
935 dev_data.ep_ctrl[ep_idx].status.out_odd = odd; in usb_kinetis_isr_handler()
941 dev_data.ep_ctrl[ep_idx].status.out_odd = odd; in usb_kinetis_isr_handler()
1004 if (dev_data.ep_ctrl[ep_idx].cb_out) { in usb_kinetis_thread_main()
1005 dev_data.ep_ctrl[ep_idx].cb_out(msg.ep, in usb_kinetis_thread_main()
1010 if (dev_data.ep_ctrl[ep_idx].cb_out) { in usb_kinetis_thread_main()
1011 dev_data.ep_ctrl[ep_idx].cb_out(msg.ep, in usb_kinetis_thread_main()
1016 if (dev_data.ep_ctrl[ep_idx].cb_in) { in usb_kinetis_thread_main()
1017 dev_data.ep_ctrl[ep_idx].cb_in(msg.ep, in usb_kinetis_thread_main()