| /Zephyr-latest/drivers/usb/udc/ |
| D | udc_skeleton.c | 263 uint16_t mps = 1023; in udc_skeleton_driver_preinit() local 277 mps = 1024; in udc_skeleton_driver_preinit() 284 config->ep_cfg_out[i].caps.mps = 64; in udc_skeleton_driver_preinit() 289 config->ep_cfg_out[i].caps.mps = mps; in udc_skeleton_driver_preinit() 304 config->ep_cfg_in[i].caps.mps = 64; in udc_skeleton_driver_preinit() 309 config->ep_cfg_in[i].caps.mps = mps; in udc_skeleton_driver_preinit()
|
| D | udc_common.c | 242 const uint16_t mps, in ep_check_config() argument 255 cfg->caps.mps); in ep_check_config() 265 if (USB_MPS_EP_SIZE(mps) > USB_MPS_EP_SIZE(cfg->caps.mps)) { in ep_check_config() 277 (USB_MPS_ADDITIONAL_TRANSACTIONS(mps) && in ep_check_config() 284 (USB_MPS_ADDITIONAL_TRANSACTIONS(mps) && in ep_check_config() 304 uint16_t *const mps) in ep_update_mps() argument 317 *mps = MIN(cfg->caps.mps, spec_bulk_mps); in ep_update_mps() 320 *mps = MIN(cfg->caps.mps, spec_int_mps); in ep_update_mps() 334 uint16_t *const mps, in udc_ep_try_config() argument 348 ret = ep_check_config(dev, cfg, ep, attributes, *mps, interval); in udc_ep_try_config() [all …]
|
| D | udc_nrf.c | 634 uint16_t mps; in udc_nrf_ep_enable() local 637 mps = (udc_mps_ep_size(cfg) == 0) ? cfg->caps.mps : udc_mps_ep_size(cfg); in udc_nrf_ep_enable() 638 nrf_usbd_common_ep_max_packet_size_set(cfg->addr, mps); in udc_nrf_ep_enable() 862 ep_cfg_out[i].caps.mps = NRF_USBD_COMMON_EPSIZE; in udc_nrf_driver_init() 866 ep_cfg_out[i].caps.mps = NRF_USBD_COMMON_EPSIZE; in udc_nrf_driver_init() 869 ep_cfg_out[i].caps.mps = NRF_USBD_COMMON_ISOSIZE / 2; in udc_nrf_driver_init() 884 ep_cfg_in[i].caps.mps = NRF_USBD_COMMON_EPSIZE; in udc_nrf_driver_init() 888 ep_cfg_in[i].caps.mps = NRF_USBD_COMMON_EPSIZE; in udc_nrf_driver_init() 891 ep_cfg_in[i].caps.mps = NRF_USBD_COMMON_ISOSIZE / 2; in udc_nrf_driver_init()
|
| D | udc_virtual.c | 554 uint16_t mps = 1023; in udc_vrt_driver_preinit() local 564 mps = 1024; in udc_vrt_driver_preinit() 571 config->ep_cfg_out[i].caps.mps = 64; in udc_vrt_driver_preinit() 576 config->ep_cfg_out[i].caps.mps = mps; in udc_vrt_driver_preinit() 591 config->ep_cfg_in[i].caps.mps = 64; in udc_vrt_driver_preinit() 596 config->ep_cfg_in[i].caps.mps = mps; in udc_vrt_driver_preinit()
|
| D | udc_smartbond.c | 278 const uint16_t mps = udc_mps_ep_size(ep_cfg); in fill_tx_fifo() local 283 if (remaining > mps - ep_state->last_packet_size) { in fill_tx_fifo() 284 remaining = mps - ep_state->last_packet_size; in fill_tx_fifo() 303 if (ep_idx == 0 || ep_cfg->mps <= EP_FIFO_SIZE) { in fill_tx_fifo() 366 const uint16_t mps = udc_mps_ep_size(ep_cfg); in start_rx_packet() local 373 if (mps > config->dma_min_transfer_size) { in start_rx_packet() 376 (uintptr_t)net_buf_tail(buf), mps); in start_rx_packet() 377 } else if (mps > EP_FIFO_SIZE) { in start_rx_packet() 418 const uint16_t mps = udc_mps_ep_size(ep_cfg); in start_tx_packet() local 419 uint16_t size = MIN(remaining, mps); in start_tx_packet() [all …]
|
| D | udc_renesas_ra.c | 385 ep_desc.wMaxPacketSize = cfg->mps; in udc_renesas_ra_ep_enable() 604 uint16_t mps = 1023; in udc_renesas_ra_driver_preinit() local 645 mps = 1024; in udc_renesas_ra_driver_preinit() 652 config->ep_cfg_out[i].caps.mps = 64; in udc_renesas_ra_driver_preinit() 657 config->ep_cfg_out[i].caps.mps = mps; in udc_renesas_ra_driver_preinit() 672 config->ep_cfg_in[i].caps.mps = 64; in udc_renesas_ra_driver_preinit() 677 config->ep_cfg_in[i].caps.mps = mps; in udc_renesas_ra_driver_preinit()
|
| D | udc_numaker.c | 105 uint16_t mps; member 484 __ASSERT_NO_MSG(ep_cur->mps <= ep_cur->dmabuf_size); in numaker_usbd_ep_copy_from_user() 488 *size_p = MIN(*size_p, ep_cur->mps); in numaker_usbd_ep_copy_from_user() 527 ep_cur->mps = ep_cfg->mps; in numaker_usbd_ep_config_major() 697 ep_cur->mps = NUMAKER_USBD_DMABUF_SIZE_CTRLOUT; in numaker_usbd_ep_mgmt_init() 707 ep_cur->mps = NUMAKER_USBD_DMABUF_SIZE_CTRLIN; in numaker_usbd_ep_mgmt_init() 797 udc_numaker_ep_trigger(ep_cur, ep_cur->mps); in numaker_usbd_xfer_out() 1480 if (!ep_cur->dmabuf_valid || ep_cur->dmabuf_size < ep_cfg->mps) { in udc_numaker_ep_enable() 1482 err = numaker_usbd_ep_mgmt_alloc_dmabuf(dev, ep_cfg->mps, &dmabuf_base, in udc_numaker_ep_enable() 1659 config->ep_cfg_out[i].caps.mps = 64; in udc_numaker_driver_preinit() [all …]
|
| D | udc_rpi_pico.c | 210 buf_ctrl = cfg->mps; in rpi_pico_prep_rx() 240 len = MIN(cfg->mps, buf->len); in rpi_pico_prep_tx() 768 size_t blocks = DIV_ROUND_UP(cfg->mps, 64U); in udc_rpi_pico_ep_enable() 798 size_t blocks = DIV_ROUND_UP(cfg->mps, 64U); in udc_rpi_pico_ep_disable() 1000 uint16_t mps = 1023; in udc_rpi_pico_driver_preinit() local 1012 config->ep_cfg_out[i].caps.mps = 64; in udc_rpi_pico_driver_preinit() 1017 config->ep_cfg_out[i].caps.mps = mps; in udc_rpi_pico_driver_preinit() 1032 config->ep_cfg_in[i].caps.mps = 64; in udc_rpi_pico_driver_preinit() 1037 config->ep_cfg_in[i].caps.mps = mps; in udc_rpi_pico_driver_preinit()
|
| /Zephyr-latest/include/zephyr/usb/ |
| D | usb_ch9.h | 357 #define USB_MPS_EP_SIZE(mps) ((mps) & BIT_MASK(11)) argument 360 #define USB_MPS_ADDITIONAL_TRANSACTIONS(mps) (((mps) & 0x1800) >> 11) argument 363 #define USB_MPS_TO_TPL(mps) \ argument 364 ((1 + USB_MPS_ADDITIONAL_TRANSACTIONS(mps)) * USB_MPS_EP_SIZE(mps))
|
| /Zephyr-latest/subsys/bluetooth/host/ |
| D | l2cap.c | 538 req->mps = sys_cpu_to_le16(ch->rx.mps); in l2cap_le_conn_req() 578 req->mps = sys_cpu_to_le16(ch->rx.mps); in l2cap_ecred_conn_req() 868 return MIN(buf->len, lechan->tx.mps); in get_pdu_len() 1204 if (chan->rx.mps > BT_L2CAP_RX_MTU) { in l2cap_chan_seg_recv_rx_init() 1206 chan->rx.mps = BT_L2CAP_RX_MTU; in l2cap_chan_seg_recv_rx_init() 1237 chan->rx.mps = MIN(chan->rx.mtu + BT_L2CAP_SDU_HDR_SIZE, in l2cap_chan_rx_init() 1244 (chan->rx.mps < chan->rx.mtu + BT_L2CAP_SDU_HDR_SIZE)) { in l2cap_chan_rx_init() 1246 chan->rx.mtu = chan->rx.mps - BT_L2CAP_SDU_HDR_SIZE; in l2cap_chan_rx_init() 1352 uint16_t mtu, uint16_t mps, uint16_t credits, in l2cap_chan_accept() argument 1400 le_chan->tx.mps = mps; in l2cap_chan_accept() [all …]
|
| D | l2cap_internal.h | 87 uint16_t mps; member 108 uint16_t mps; member 123 uint16_t mps; member 131 uint16_t mps; member 140 uint16_t mps; member
|
| /Zephyr-latest/tests/bsim/bluetooth/host/l2cap/split/tester/src/ |
| D | main.c | 184 uint16_t mps = sys_le16_to_cpu(rsp->mps); in handle_l2cap_connected() local 186 peer_mps = mps; in handle_l2cap_connected() 188 LOG_DBG("l2cap connected: mtu %d mps %d credits: %d", mtu, mps, credits); in handle_l2cap_connected() 537 req->mps = sys_cpu_to_le16(23); in open_l2cap() 545 static void send_l2cap_sdu(uint8_t *data, uint16_t sdu_len, uint16_t mps) in send_l2cap_sdu() argument 550 bool shenanigans = !mps; in send_l2cap_sdu() 553 if (!mps) { in send_l2cap_sdu() 555 mps = 2; in send_l2cap_sdu() 564 pdu_len = MIN(sdu_len, mps); in send_l2cap_sdu() 578 if (mps == 1) { in send_l2cap_sdu() [all …]
|
| /Zephyr-latest/drivers/usb/uhc/ |
| D | uhc_common.c | 103 uint16_t mps; in uhc_xfer_alloc() local 112 mps = udev->dev_desc.bMaxPacketSize0; in uhc_xfer_alloc() 127 mps = ep_desc->wMaxPacketSize; in uhc_xfer_alloc() 130 LOG_DBG("Allocate xfer, ep 0x%02x mps %u cb %p", ep, mps, cb); in uhc_xfer_alloc() 139 xfer->mps = mps; in uhc_xfer_alloc()
|
| D | uhc_virtual.c | 116 length = MIN(net_buf_tailroom(buf), xfer->mps); in vrt_xfer_control() 119 length = MIN(buf->len, xfer->mps); in vrt_xfer_control() 173 length = MIN(net_buf_tailroom(buf), xfer->mps); in vrt_xfer_bulk() 176 length = MIN(buf->len, xfer->mps); in vrt_xfer_bulk() 310 length = MIN(buf->len, xfer->mps); in vrt_hrslt_success() 323 if (pkt->length > xfer->mps) { in vrt_hrslt_success() 329 if (pkt->length < xfer->mps || !net_buf_tailroom(buf)) { in vrt_hrslt_success()
|
| /Zephyr-latest/include/zephyr/drivers/usb/ |
| D | udc.h | 70 uint32_t mps : 16; member 122 uint16_t mps; member 548 uint16_t *const mps, 572 const uint16_t mps, 741 return USB_MPS_EP_SIZE(cfg->mps); in udc_mps_ep_size()
|
| /Zephyr-latest/drivers/usb/device/ |
| D | usb_dc_sam_usbc.c | 91 uint16_t mps; member 201 int mps; in usb_dc_sam_usbc_ep_alloc_buf() local 209 mps = dev_data.ep_data[ep_idx].mps_x2 in usb_dc_sam_usbc_ep_alloc_buf() 210 ? dev_data.ep_data[ep_idx].mps * 2 in usb_dc_sam_usbc_ep_alloc_buf() 211 : dev_data.ep_data[ep_idx].mps; in usb_dc_sam_usbc_ep_alloc_buf() 220 ? dev_data.ep_data[i].mps * 2 in usb_dc_sam_usbc_ep_alloc_buf() 221 : dev_data.ep_data[i].mps; in usb_dc_sam_usbc_ep_alloc_buf() 224 if ((desc_mem_alloc + mps) > USBC_RAM_SIZE) { in usb_dc_sam_usbc_ep_alloc_buf() 244 ? dev_data.ep_data[i].mps * 2 in usb_dc_sam_usbc_ep_alloc_buf() 245 : dev_data.ep_data[i].mps; in usb_dc_sam_usbc_ep_alloc_buf() [all …]
|
| D | usb_dc_native_posix.c | 55 uint16_t mps; member 203 usbip_ctrl.out_ep_ctrl[ep_idx].mps = ep_mps; in usb_dc_ep_configure() 205 usbip_ctrl.in_ep_ctrl[ep_idx].mps = ep_mps; in usb_dc_ep_configure() 507 return usbip_ctrl.out_ep_ctrl[ep_idx].mps; in usb_dc_ep_mps() 509 return usbip_ctrl.in_ep_ctrl[ep_idx].mps; in usb_dc_ep_mps()
|
| D | usb_dc_smartbond.c | 117 uint16_t mps; /** Endpoint max packet size */ member 373 if (remaining > ep_state->mps - ep_state->last_packet_size) { in fill_tx_fifo() 374 remaining = ep_state->mps - ep_state->last_packet_size; in fill_tx_fifo() 452 if (ep_state->mps > DMA_MIN_TRANSFER_SIZE) { in start_rx_packet() 456 ep_state->mps); in start_rx_packet() 457 } else if (ep_state->mps > EP_FIFO_SIZE) { in start_rx_packet() 494 uint16_t size = MIN(remaining, ep_state->mps); in start_tx_packet() 528 uint16_t remaining = ep_state->mps - ep_state->last_packet_size; in read_rx_fifo() 1150 dev_state.ep_state[0][0].mps = EP0_FIFO_SIZE; in usb_init() 1151 dev_state.ep_state[1][0].mps = EP0_FIFO_SIZE; in usb_init() [all …]
|
| /Zephyr-latest/tests/drivers/udc/src/ |
| D | main.c | 101 uint16_t mps = sys_le16_to_cpu(ed->wMaxPacketSize); in test_udc_ep_try_config() local 105 ed->bmAttributes, &mps, in test_udc_ep_try_config() 118 mps = 0; in test_udc_ep_try_config() 120 ed->bmAttributes, &mps, in test_udc_ep_try_config() 123 zassert_not_equal(mps, 0, "Failed to test endpoint configuration"); in test_udc_ep_try_config() 354 uint16_t mps[] = {8, 16, 32, 64, 512, 1024}; in test_udc_ep_mps() local 392 for (int i = 0; i < ARRAY_SIZE(mps); i++) { in test_udc_ep_mps() 393 if (mps[i] > supported) { in test_udc_ep_mps() 397 ed.wMaxPacketSize = sys_cpu_to_le16(mps[i]); in test_udc_ep_mps()
|
| /Zephyr-latest/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/src/ |
| D | main.c | 133 LOG_DBG("%x (tx mtu %d mps %d) (tx mtu %d mps %d)", l2cap_chan, chan->tx.mtu, chan->tx.mps, in l2cap_chan_connected_cb() 134 chan->rx.mtu, chan->rx.mps); in l2cap_chan_connected_cb() 162 le_chan->rx.mps = BT_L2CAP_RX_MTU; in server_accept_cb() 347 .rx.mps = BT_L2CAP_RX_MTU, in connect_l2cap_channel() 374 .rx.mps = BT_L2CAP_RX_MTU, in connect_l2cap_ecred_channel()
|
| /Zephyr-latest/tests/bluetooth/tester/src/ |
| D | btp_l2cap.c | 126 ev.mps_remote = sys_cpu_to_le16(chan->le.tx.mps); in connected_cb() 128 ev.mps_local = sys_cpu_to_le16(chan->le.rx.mps); in connected_cb() 191 ev.mps_remote = sys_cpu_to_le16(chan->le.tx.mps); in reconfigured_cb() 193 ev.mps_local = sys_cpu_to_le16(chan->le.rx.mps); in reconfigured_cb() 267 chan->le.rx.mps = L2CAP_MPS; in connect() 338 uint16_t mps; in reconfigure() local 371 mps = MIN(L2CAP_MPS, BT_L2CAP_RX_MTU); in reconfigure() 372 err = bt_l2cap_ecred_chan_reconfigure_explicit(reconf_channels, cp->num, mtu, mps); in reconfigure() 506 chan->le.rx.mps = L2CAP_MPS; in accept()
|
| /Zephyr-latest/samples/subsys/usb/webusb/src/ |
| D | webusb.c | 57 #define INITIALIZER_IF_EP(addr, attr, mps, interval) \ argument 63 .wMaxPacketSize = sys_cpu_to_le16(mps), \
|
| /Zephyr-latest/tests/bsim/bluetooth/host/misc/hfc_multilink/tester/src/ |
| D | tester.c | 195 uint16_t mps = sys_le16_to_cpu(rsp->mps); in handle_l2cap_connected() local 197 peer_mps = mps; in handle_l2cap_connected() 199 LOG_DBG("l2cap connected: mtu %d mps %d credits: %d", mtu, mps, credits); in handle_l2cap_connected() 565 req->mps = sys_cpu_to_le16(23); in open_l2cap() 573 static void send_l2cap_sdu(uint8_t *data, uint16_t data_len, uint16_t mps, uint16_t on_air_size) in send_l2cap_sdu() argument 579 __ASSERT_NO_MSG(data_len <= (mps - BT_L2CAP_SDU_HDR_SIZE)); in send_l2cap_sdu()
|
| /Zephyr-latest/subsys/usb/device_next/ |
| D | usbd_init.c | 31 uint16_t mps = sys_le16_to_cpu(ed->wMaxPacketSize); in assign_ep_addr() local 47 ed->bmAttributes, &mps, in assign_ep_addr() 53 ed->wMaxPacketSize = sys_cpu_to_le16(mps); in assign_ep_addr()
|
| /Zephyr-latest/tests/subsys/usb/device/src/ |
| D | main.c | 43 #define INITIALIZER_IF_EP(addr, attr, mps, interval) \ argument 49 .wMaxPacketSize = sys_cpu_to_le16(mps), \
|