Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Description

Sends data on interrupt IN endpoint.

Files

usbd_core.h/usbd_ep.c

Prototype

Arguments

dev_nbr

Device number.

ep_addr

Endpoint address.

p_buf

Pointer to buffer of data that will be transmitted.

buf_len

Number of octets to transmit.

timeout_ms

Timeout in milliseconds.

end

End-of-transfer flag (see Note #2).

p_err

Pointer to variable that will receive the return error code from this function.

USBD_ERR_NONE
USBD_ERR_DEV_INVALID_NBR
USBD_ERR_DEV_INVALID_STATE
USBD_ERR_EP_INVALID_ADDR
USBD_ERR_EP_INVALID_STATE
USBD_ERR_EP_INVALID_TYPE
USBD_ERR_OS_TIMEOUT
USBD_ERR_OS_ABORT
USBD_ERR_OS_FAIL

Returned Value

Number of octets transmitted, If no error(s).

0, otherwise.

Callers

Classes.

Notes / Warnings

  1. This function blocks until:
    1. All data is transmitted, or
    2. An error occurred.
    3. Transfer does not complete in the period specified by timeout_ms.
  2. If end-of-transfer is set and transfer length is multiple of maximum packet size, a zero-length packet is transferred to indicate a short transfer to the host.
  • No labels