/Zephyr-Core-2.7.6/drivers/usb/device/ |
D | usb_dc_native_posix.c | 67 static uint8_t usbip_ep_is_valid(uint8_t ep) in usbip_ep_is_valid() argument 69 uint8_t ep_idx = USB_EP_GET_IDX(ep); in usbip_ep_is_valid() 72 if ((USB_EP_DIR_IS_OUT(ep)) && in usbip_ep_is_valid() 75 } else if ((USB_EP_DIR_IS_IN(ep)) && in usbip_ep_is_valid() 83 static uint8_t usbip_ep_is_enabled(uint8_t ep) in usbip_ep_is_enabled() argument 85 uint8_t ep_idx = USB_EP_GET_IDX(ep); in usbip_ep_is_enabled() 87 LOG_DBG("ep %x", ep); in usbip_ep_is_enabled() 90 if ((USB_EP_DIR_IS_OUT(ep)) && in usbip_ep_is_enabled() 93 } else if ((USB_EP_DIR_IS_IN(ep)) && in usbip_ep_is_enabled() 185 uint8_t ep = cfg->ep_addr; in usb_dc_ep_configure() local [all …]
|
D | usb_dc_dw.c | 91 static uint8_t usb_dw_ep_is_valid(uint8_t ep) in usb_dw_ep_is_valid() argument 93 uint8_t ep_idx = USB_EP_GET_IDX(ep); in usb_dw_ep_is_valid() 96 if ((USB_EP_DIR_IS_OUT(ep)) && ep_idx < USB_DW_OUT_EP_NUM) { in usb_dw_ep_is_valid() 98 } else if ((USB_EP_DIR_IS_IN(ep)) && ep_idx < USB_DW_IN_EP_NUM) { in usb_dw_ep_is_valid() 105 static uint8_t usb_dw_ep_is_enabled(uint8_t ep) in usb_dw_ep_is_enabled() argument 107 uint8_t ep_idx = USB_EP_GET_IDX(ep); in usb_dw_ep_is_enabled() 110 if ((USB_EP_DIR_IS_OUT(ep)) && in usb_dw_ep_is_enabled() 113 } else if ((USB_EP_DIR_IS_IN(ep)) && in usb_dw_ep_is_enabled() 165 static void usb_dw_flush_tx_fifo(int ep) in usb_dw_flush_tx_fifo() argument 167 int fnum = usb_dw_ctrl.in_ep_ctrl[ep].fifo_num; in usb_dw_flush_tx_fifo() [all …]
|
D | usb_dc_stm32.c | 158 static struct usb_dc_stm32_ep_state *usb_dc_stm32_get_ep_state(uint8_t ep) in usb_dc_stm32_get_ep_state() argument 162 if (USB_EP_GET_IDX(ep) >= USB_NUM_BIDIR_ENDPOINTS) { in usb_dc_stm32_get_ep_state() 166 if (USB_EP_DIR_IS_OUT(ep)) { in usb_dc_stm32_get_ep_state() 172 return ep_state_base + USB_EP_GET_IDX(ep); in usb_dc_stm32_get_ep_state() 525 int usb_dc_ep_set_callback(const uint8_t ep, const usb_dc_ep_callback cb) in usb_dc_ep_set_callback() argument 527 struct usb_dc_stm32_ep_state *ep_state = usb_dc_stm32_get_ep_state(ep); in usb_dc_ep_set_callback() 529 LOG_DBG("ep 0x%02x", ep); in usb_dc_ep_set_callback() 563 int usb_dc_ep_start_read(uint8_t ep, uint8_t *data, uint32_t max_data_len) in usb_dc_ep_start_read() argument 567 LOG_DBG("ep 0x%02x, len %u", ep, max_data_len); in usb_dc_ep_start_read() 570 if (!USB_EP_DIR_IS_OUT(ep) && (ep != EP0_IN || max_data_len)) { in usb_dc_ep_start_read() [all …]
|
D | usb_dc_mcux.c | 61 #define EP_ABS_IDX(ep) (USB_EP_GET_IDX(ep) * 2 + \ argument 62 (USB_EP_GET_DIR(ep) >> 7)) 265 int usb_dc_ep_set_stall(const uint8_t ep) in usb_dc_ep_set_stall() argument 267 uint8_t endpoint = ep; in usb_dc_ep_set_stall() 268 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in usb_dc_ep_set_stall() 286 int usb_dc_ep_clear_stall(const uint8_t ep) in usb_dc_ep_clear_stall() argument 288 uint8_t endpoint = ep; in usb_dc_ep_clear_stall() 289 uint8_t ep_abs_idx = EP_ABS_IDX(ep); in usb_dc_ep_clear_stall() 304 if ((USB_EP_GET_IDX(ep) != USB_CONTROL_ENDPOINT) && in usb_dc_ep_clear_stall() 305 (USB_EP_DIR_IS_OUT(ep))) { in usb_dc_ep_clear_stall() [all …]
|
D | usb_dc_kinetis.c | 127 uint8_t ep; member 140 static inline uint8_t get_bdt_idx(uint8_t ep, uint8_t odd) in get_bdt_idx() argument 142 if (ep & USB_EP_DIR_IN) { in get_bdt_idx() 143 return ((((KINETIS_ADDR2IDX(ep)) * 4) + 2 + (odd & 1))); in get_bdt_idx() 145 return ((((KINETIS_ADDR2IDX(ep)) * 4) + (odd & 1))); in get_bdt_idx() 422 int usb_dc_ep_set_stall(const uint8_t ep) in usb_dc_ep_set_stall() argument 424 uint8_t ep_idx = USB_EP_GET_IDX(ep); in usb_dc_ep_set_stall() 432 LOG_DBG("ep %x, idx %d", ep, ep_idx); in usb_dc_ep_set_stall() 434 if (USB_EP_DIR_IS_OUT(ep)) { in usb_dc_ep_set_stall() 436 bd_idx = get_bdt_idx(ep, in usb_dc_ep_set_stall() [all …]
|
D | usb_dc_nrfx.c | 138 struct nrf_usbd_ep_ctx *ep; member 289 static inline nrfx_usbd_ep_t ep_addr_to_nrfx(uint8_t ep) in ep_addr_to_nrfx() argument 291 return (nrfx_usbd_ep_t)ep; in ep_addr_to_nrfx() 294 static inline uint8_t nrfx_addr_to_ep(nrfx_usbd_ep_t ep) in nrfx_addr_to_ep() argument 296 return (uint8_t)ep; in nrfx_addr_to_ep() 299 static inline bool ep_is_valid(const uint8_t ep) in ep_is_valid() argument 301 uint8_t ep_num = USB_EP_GET_IDX(ep); in ep_is_valid() 303 if (NRF_USBD_EPIN_CHECK(ep)) { in ep_is_valid() 328 static struct nrf_usbd_ep_ctx *endpoint_ctx(const uint8_t ep) in endpoint_ctx() argument 333 if (!ep_is_valid(ep)) { in endpoint_ctx() [all …]
|
D | usb_dc_sam_usbhs.c | 210 uint8_t ep = ep_idx | USB_EP_DIR_OUT; in usb_dc_ep_isr() local 217 dev_data.ep_data[ep_idx].cb_out(ep, USB_DC_EP_DATA_OUT); in usb_dc_ep_isr() 220 uint8_t ep = ep_idx | USB_EP_DIR_IN; in usb_dc_ep_isr() local 227 dev_data.ep_data[ep_idx].cb_in(ep, USB_DC_EP_DATA_IN); in usb_dc_ep_isr() 562 int usb_dc_ep_set_stall(uint8_t ep) in usb_dc_ep_set_stall() argument 564 uint8_t ep_idx = USB_EP_GET_IDX(ep); in usb_dc_ep_set_stall() 573 LOG_DBG("ep 0x%x", ep); in usb_dc_ep_set_stall() 578 int usb_dc_ep_clear_stall(uint8_t ep) in usb_dc_ep_clear_stall() argument 580 uint8_t ep_idx = USB_EP_GET_IDX(ep); in usb_dc_ep_clear_stall() 589 LOG_DBG("ep 0x%x", ep); in usb_dc_ep_clear_stall() [all …]
|
D | usb_dc_sam0.c | 72 static void usb_sam0_ep_isr(uint8_t ep) in usb_sam0_ep_isr() argument 76 UsbDeviceEndpoint *endpoint = ®s->DeviceEndpoint[ep]; in usb_sam0_ep_isr() 83 data->ep_cb[0][ep](ep, USB_DC_EP_SETUP); in usb_sam0_ep_isr() 88 data->ep_cb[0][ep](ep, USB_DC_EP_DATA_OUT); in usb_sam0_ep_isr() 93 data->ep_cb[1][ep](ep | USB_SAM0_IN_EP, USB_DC_EP_DATA_IN); in usb_sam0_ep_isr() 113 uint8_t ep; in usb_sam0_isr() local 132 for (ep = 0U; epint != 0U; epint >>= 1) { in usb_sam0_isr() 135 usb_sam0_ep_isr(ep); in usb_sam0_isr() 137 ep++; in usb_sam0_isr() 416 int usb_dc_ep_set_stall(const uint8_t ep) in usb_dc_ep_set_stall() argument [all …]
|
D | usb_dc_sam_usbc.c | 521 uint8_t ep = ep_idx | USB_EP_DIR_OUT; in usb_dc_ep_isr() local 526 dev_data.ep_data[ep_idx].cb_out(ep, USB_DC_EP_DATA_OUT); in usb_dc_ep_isr() 529 uint8_t ep = ep_idx | USB_EP_DIR_IN; in usb_dc_ep_isr() local 534 dev_data.ep_data[ep_idx].cb_in(ep, USB_DC_EP_DATA_IN); in usb_dc_ep_isr() 946 int usb_dc_ep_set_stall(uint8_t ep) in usb_dc_ep_set_stall() argument 948 uint8_t ep_idx = USB_EP_GET_IDX(ep); in usb_dc_ep_set_stall() 968 LOG_WRN("USB DC stall set ep 0x%02x", ep); in usb_dc_ep_set_stall() 972 int usb_dc_ep_clear_stall(uint8_t ep) in usb_dc_ep_clear_stall() argument 974 uint8_t ep_idx = USB_EP_GET_IDX(ep); in usb_dc_ep_clear_stall() 996 LOG_DBG("USB DC stall clear ep 0x%02x", ep); in usb_dc_ep_clear_stall() [all …]
|
D | usb_dw_registers.h | 143 #define USB_DW_DAINT_IN_EP_INT(ep) (1 << (ep)) argument 144 #define USB_DW_DAINT_OUT_EP_INT(ep) (0x10000 << (ep)) argument 200 #define USB_DW_EP_FIFO(ep) \ argument 201 (*(uint32_t *)(DT_INST_REG_ADDR(0) + 0x1000 * (ep + 1)))
|
D | usb_dc_native_posix_adapt.h | 61 uint32_t ep; member 105 bool usbip_send_common(uint8_t ep, uint32_t data_len); 106 int usbip_send(uint8_t ep, const uint8_t *data, size_t len);
|
D | usb_dc_native_posix_adapt.c | 52 ntohl(hdr->common.ep)); in usbip_header_dump() 203 if (ntohl(hdr->common.ep) == 0) { in handle_usbip_submit() 425 int usbip_send(uint8_t ep, const uint8_t *data, size_t len) in usbip_send() argument 430 bool usbip_send_common(uint8_t ep, uint32_t data_len) in usbip_send_common() argument 433 uint32_t ep_dir = USB_EP_DIR_IS_IN(ep) ? USBIP_DIR_IN : USBIP_DIR_OUT; in usbip_send_common() 434 uint32_t ep_idx = USB_EP_GET_IDX(ep); in usbip_send_common() 440 rsp.common.ep = htonl(ep_idx); in usbip_send_common() 450 if (usbip_send(ep, (uint8_t *)&rsp, sizeof(rsp)) == sizeof(rsp)) { in usbip_send_common()
|
/Zephyr-Core-2.7.6/include/drivers/usb/ |
D | usb_dc.h | 30 #define USB_EP_GET_IDX(ep) ((ep) & ~USB_EP_DIR_MASK) argument 32 #define USB_EP_GET_DIR(ep) ((ep) & USB_EP_DIR_MASK) argument 36 #define USB_EP_DIR_IS_IN(ep) (USB_EP_GET_DIR(ep) == USB_EP_DIR_IN) argument 38 #define USB_EP_DIR_IS_OUT(ep) (USB_EP_GET_DIR(ep) == USB_EP_DIR_OUT) argument 157 typedef void (*usb_dc_ep_callback)(uint8_t ep, 253 int usb_dc_ep_set_stall(const uint8_t ep); 263 int usb_dc_ep_clear_stall(const uint8_t ep); 274 int usb_dc_ep_is_stalled(const uint8_t ep, uint8_t *const stalled); 284 int usb_dc_ep_halt(const uint8_t ep); 298 int usb_dc_ep_enable(const uint8_t ep); [all …]
|
/Zephyr-Core-2.7.6/subsys/usb/ |
D | usb_transfer.c | 26 uint8_t ep; member 51 static struct usb_transfer_data *usb_ep_get_transfer(uint8_t ep) in usb_ep_get_transfer() argument 54 if (ut_data[i].ep == ep && ut_data[i].status != 0) { in usb_ep_get_transfer() 62 bool usb_transfer_is_busy(uint8_t ep) in usb_transfer_is_busy() argument 64 struct usb_transfer_data *trans = usb_ep_get_transfer(ep); in usb_transfer_is_busy() 78 uint8_t ep; in usb_transfer_work() local 81 ep = trans->ep; in usb_transfer_work() 85 LOG_DBG("Transfer cancelled or completed, ep 0x%02x", ep); in usb_transfer_work() 93 usb_write(ep, NULL, 0, NULL); in usb_transfer_work() 99 ret = usb_write(ep, trans->buffer, trans->bsize, &bytes); in usb_transfer_work() [all …]
|
D | usb_device.c | 284 static void usb_handle_control_transfer(uint8_t ep, in usb_handle_control_transfer() argument 291 LOG_DBG("ep 0x%02x, status 0x%02x", ep, ep_status); in usb_handle_control_transfer() 293 if (ep == USB_CONTROL_EP_OUT && ep_status == USB_DC_EP_SETUP) { in usb_handle_control_transfer() 298 if (usb_dc_ep_read(ep, (uint8_t *)&setup_raw, in usb_handle_control_transfer() 352 } else if (ep == USB_CONTROL_EP_OUT) { in usb_handle_control_transfer() 390 } else if (ep == USB_CONTROL_EP_IN) { in usb_handle_control_transfer() 712 struct usb_ep_descriptor *ep; in usb_set_interface() local 738 ep = (struct usb_ep_descriptor *)p; in usb_set_interface() 739 ret = usb_eps_reconfigure(ep, cur_alt_setting, in usb_set_interface() 955 static bool is_ep_valid(uint8_t ep) in is_ep_valid() argument [all …]
|
/Zephyr-Core-2.7.6/include/drivers/ |
D | video.h | 140 enum video_endpoint_id ep, 149 enum video_endpoint_id ep, 158 enum video_endpoint_id ep, 167 enum video_endpoint_id ep, 178 enum video_endpoint_id ep, 219 enum video_endpoint_id ep, 228 enum video_endpoint_id ep, 262 enum video_endpoint_id ep, in video_set_format() argument 272 return api->set_format(dev, ep, fmt); in video_set_format() 287 enum video_endpoint_id ep, in video_get_format() argument [all …]
|
/Zephyr-Core-2.7.6/include/usb/ |
D | usb_device.h | 95 typedef void (*usb_ep_callback)(uint8_t ep, 261 int usb_write(uint8_t ep, const uint8_t *data, uint32_t data_len, uint32_t *bytes_ret); 280 int usb_read(uint8_t ep, uint8_t *data, uint32_t max_data_len, uint32_t *ret_bytes); 293 int usb_ep_set_stall(uint8_t ep); 306 int usb_ep_clear_stall(uint8_t ep); 326 int usb_ep_read_wait(uint8_t ep, uint8_t *data, uint32_t max_data_len, 343 int usb_ep_read_continue(uint8_t ep); 348 typedef void (*usb_transfer_callback)(uint8_t ep, int tsize, void *priv); 361 void usb_transfer_ep_callback(uint8_t ep, enum usb_dc_ep_cb_status_code); 380 int usb_transfer(uint8_t ep, uint8_t *data, size_t dlen, unsigned int flags, [all …]
|
/Zephyr-Core-2.7.6/drivers/video/ |
D | video_sw_generator.c | 27 enum video_endpoint_id ep, in video_sw_generator_set_fmt() argument 32 if (ep != VIDEO_EP_OUT) { in video_sw_generator_set_fmt() 42 enum video_endpoint_id ep, in video_sw_generator_get_fmt() argument 47 if (ep != VIDEO_EP_OUT) { in video_sw_generator_get_fmt() 128 enum video_endpoint_id ep, in video_sw_generator_enqueue() argument 133 if (ep != VIDEO_EP_OUT) { in video_sw_generator_enqueue() 143 enum video_endpoint_id ep, in video_sw_generator_dequeue() argument 149 if (ep != VIDEO_EP_OUT) { in video_sw_generator_dequeue() 162 enum video_endpoint_id ep, in video_sw_generator_flush() argument 200 enum video_endpoint_id ep, in video_sw_generator_get_caps() argument [all …]
|
D | video_mcux_csi.c | 117 enum video_endpoint_id ep, in video_mcux_csi_set_fmt() argument 125 if (!bpp || ep != VIDEO_EP_OUT) { in video_mcux_csi_set_fmt() 150 if (data->sensor_dev && video_set_format(data->sensor_dev, ep, fmt)) { in video_mcux_csi_set_fmt() 158 enum video_endpoint_id ep, in video_mcux_csi_get_fmt() argument 163 if (fmt == NULL || ep != VIDEO_EP_OUT) { in video_mcux_csi_get_fmt() 167 if (data->sensor_dev && !video_get_format(data->sensor_dev, ep, fmt)) { in video_mcux_csi_get_fmt() 169 return video_mcux_csi_set_fmt(dev, ep, fmt); in video_mcux_csi_get_fmt() 218 enum video_endpoint_id ep, in video_mcux_csi_flush() argument 253 enum video_endpoint_id ep, in video_mcux_csi_enqueue() argument 261 if (ep != VIDEO_EP_OUT) { in video_mcux_csi_enqueue() [all …]
|
/Zephyr-Core-2.7.6/subsys/usb/class/ |
D | loopback.c | 71 static void loopback_out_cb(uint8_t ep, enum usb_dc_ep_cb_status_code ep_status) in loopback_out_cb() argument 75 usb_read(ep, NULL, 0, &bytes_to_read); in loopback_out_cb() 76 LOG_DBG("ep 0x%x, bytes to read %d ", ep, bytes_to_read); in loopback_out_cb() 77 usb_read(ep, loopback_buf, bytes_to_read, NULL); in loopback_out_cb() 80 static void loopback_in_cb(uint8_t ep, enum usb_dc_ep_cb_status_code ep_status) in loopback_in_cb() argument 82 if (usb_write(ep, loopback_buf, CONFIG_LOOPBACK_BULK_EP_MPS, NULL)) { in loopback_in_cb() 83 LOG_DBG("ep 0x%x", ep); in loopback_in_cb()
|
D | cdc_acm.c | 205 static void cdc_acm_write_cb(uint8_t ep, int size, void *priv) in cdc_acm_write_cb() argument 209 LOG_DBG("ep %x: written %d bytes dev_data %p", ep, size, dev_data); in cdc_acm_write_cb() 232 uint8_t ep = cfg->endpoint[ACM_IN_EP_IDX].ep_addr; in tx_work_handler() local 236 if (usb_transfer_is_busy(ep)) { in tx_work_handler() 259 LOG_DBG("Got %zd bytes from ringbuffer send to ep %x", len, ep); in tx_work_handler() 261 usb_transfer(ep, data, len, USB_TRANS_WRITE, in tx_work_handler() 267 static void cdc_acm_read_cb(uint8_t ep, int size, void *priv) in cdc_acm_read_cb() argument 273 ep, size, dev_data, ring_buf_space_get(dev_data->rx_ringbuf)); in cdc_acm_read_cb() 292 usb_transfer(ep, dev_data->rx_buf, sizeof(dev_data->rx_buf), in cdc_acm_read_cb() 305 static void cdc_acm_int_in(uint8_t ep, enum usb_dc_ep_cb_status_code ep_status) in cdc_acm_int_in() argument [all …]
|
/Zephyr-Core-2.7.6/subsys/ipc/rpmsg_service/ |
D | rpmsg_service.c | 35 struct rpmsg_endpoint ep; member 39 static void rpmsg_service_unbind(struct rpmsg_endpoint *ep) in rpmsg_service_unbind() argument 41 rpmsg_destroy_ept(ep); in rpmsg_service_unbind() 54 err = rpmsg_create_ept(&endpoints[i].ep, in ns_bind_cb() 113 err = rpmsg_create_ept(&endpoints[i].ep, in rpmsg_service_init() 161 return rpmsg_send(&endpoints[endpoint_id].ep, data, len); in rpmsg_service_send()
|
/Zephyr-Core-2.7.6/subsys/tracing/ |
D | tracing_backend_usb.c | 82 static void tracing_ep_out_cb(uint8_t ep, enum usb_dc_ep_cb_status_code ep_status) in tracing_ep_out_cb() argument 87 usb_read(ep, NULL, 0, &bytes_to_read); in tracing_ep_out_cb() 93 usb_read(ep, cmd, length, NULL); in tracing_ep_out_cb() 106 static void tracing_ep_in_cb(uint8_t ep, enum usb_dc_ep_cb_status_code ep_status) in tracing_ep_in_cb() argument 108 ARG_UNUSED(ep); in tracing_ep_in_cb()
|
/Zephyr-Core-2.7.6/subsys/fs/ |
D | fs.c | 39 static inline void registry_clear_entry(struct registry_entry *ep) in registry_clear_entry() argument 41 ep->fstp = NULL; in registry_clear_entry() 50 struct registry_entry *ep = ®istry[i]; in registry_add() local 52 if (ep->fstp == NULL) { in registry_add() 53 ep->type = type; in registry_add() 54 ep->fstp = fstp; in registry_add() 66 struct registry_entry *ep = ®istry[i]; in registry_find() local 68 if ((ep->fstp != NULL) && (ep->type == type)) { in registry_find() 69 return ep; in registry_find() 77 struct registry_entry *ep = registry_find(type); in fs_type_get() local [all …]
|
/Zephyr-Core-2.7.6/samples/subsys/usb/webusb/src/ |
D | webusb.c | 133 static void webusb_write_cb(uint8_t ep, int size, void *priv) in webusb_write_cb() argument 135 LOG_DBG("ep %x size %u", ep, size); in webusb_write_cb() 138 static void webusb_read_cb(uint8_t ep, int size, void *priv) in webusb_read_cb() argument 142 LOG_DBG("cfg %p ep %x size %u", cfg, ep, size); in webusb_read_cb() 151 usb_transfer(ep, rx_buf, sizeof(rx_buf), USB_TRANS_READ, in webusb_read_cb()
|