Tizen Native API
6.5
|
USB endpoint-related API.
Overview
Data structures and operations described here are related to USB endpoint. Endpoints are used to perform USB transfers.
Related Features
This API is related with the following features:
- http://tizen.org/feature/usb.host
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature List.
Functions | |
int | usb_host_endpoint_get_number (usb_host_endpoint_h ep, int *number) |
Gets number of given endpoint. | |
int | usb_host_endpoint_get_direction (usb_host_endpoint_h ep, usb_host_endpoint_direction_e *direction) |
Gets direction of an endpoint. | |
int | usb_host_endpoint_get_transfer_type (usb_host_endpoint_h ep, usb_host_transfer_type_e *transfer_type) |
Gets transfer type of given endpoint. | |
int | usb_host_endpoint_get_synch_type (usb_host_endpoint_h ep, usb_host_iso_sync_type_e *synch_type) |
Gets synchronization type of given endpoint. | |
int | usb_host_endpoint_get_usage_type (usb_host_endpoint_h ep, usb_host_usage_type_e *usage_type) |
Gets usage type of given endpoint. | |
int | usb_host_endpoint_get_max_packet_size (usb_host_endpoint_h ep, int *max_packet_size) |
Gets max packet size of given endpoint. | |
int | usb_host_endpoint_get_interval (usb_host_endpoint_h ep, int *interval) |
Gets interval for polling endpoint for data transfers. | |
int | usb_host_transfer_get_type (usb_host_transfer_h transfer, usb_host_transfer_type_e *transfer_type) |
Gets type of a transfer. | |
Typedefs | |
typedef struct usb_host_endpoint_s * | usb_host_endpoint_h |
USB endpoint handle. |
Typedef Documentation
typedef struct usb_host_endpoint_s* usb_host_endpoint_h |
USB endpoint handle.
This type represents USB endpoint. This handle can be obtained by usb_host_interface_get_endpoint().
- Since :
- 3.0
Enumeration Type Documentation
Function Documentation
int usb_host_endpoint_get_direction | ( | usb_host_endpoint_h | ep, |
usb_host_endpoint_direction_e * | direction | ||
) |
Gets direction of an endpoint.
- Since :
- 3.0
- Parameters:
-
[in] ep An endpoint [out] direction Direction of endpoint (a value from enum usb_host_endpoint_direction_e)
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
USB_HOST_ERROR_NONE Successful USB_HOST_ERROR_NOT_SUPPORTED Not supported USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed
int usb_host_endpoint_get_interval | ( | usb_host_endpoint_h | ep, |
int * | interval | ||
) |
Gets interval for polling endpoint for data transfers.
- Since :
- 3.0
- Parameters:
-
[in] ep An endpoint [out] interval Interval for polling, in frame counts (refer to USB protocol specification)
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
USB_HOST_ERROR_NONE Successful USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed
int usb_host_endpoint_get_max_packet_size | ( | usb_host_endpoint_h | ep, |
int * | max_packet_size | ||
) |
Gets max packet size of given endpoint.
- Since :
- 3.0
- Parameters:
-
[in] ep An endpoint [out] max_packet_size Max packet size, in bytes
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
USB_HOST_ERROR_NONE Successful USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed
int usb_host_endpoint_get_number | ( | usb_host_endpoint_h | ep, |
int * | number | ||
) |
Gets number of given endpoint.
- Since :
- 3.0
- Parameters:
-
[in] ep An endpoint [out] number Number of given endpoint
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
USB_HOST_ERROR_NONE Successful USB_HOST_ERROR_NOT_SUPPORTED Not supported USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed
int usb_host_endpoint_get_synch_type | ( | usb_host_endpoint_h | ep, |
usb_host_iso_sync_type_e * | synch_type | ||
) |
Gets synchronization type of given endpoint.
- Since :
- 3.0
- Parameters:
-
[in] ep An endpoint [out] synch_type Synch type (a value from enum usb_host_iso_sync_type_e)
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
USB_HOST_ERROR_NONE Successful USB_HOST_ERROR_NOT_SUPPORTED Not supported USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed
int usb_host_endpoint_get_transfer_type | ( | usb_host_endpoint_h | ep, |
usb_host_transfer_type_e * | transfer_type | ||
) |
Gets transfer type of given endpoint.
- Since :
- 3.0
- Parameters:
-
[in] ep An endpoint [out] transfer_type Transfer type (a value from enum usb_host_transfer_type_e)
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
USB_HOST_ERROR_NONE Successful USB_HOST_ERROR_NOT_SUPPORTED Not supported USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed
int usb_host_endpoint_get_usage_type | ( | usb_host_endpoint_h | ep, |
usb_host_usage_type_e * | usage_type | ||
) |
Gets usage type of given endpoint.
- Since :
- 3.0
- Parameters:
-
[in] ep An endpoint [out] usage_type Usage type (a value from enum usb_host_usage_type_e)
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
USB_HOST_ERROR_NONE Successful USB_HOST_ERROR_NOT_SUPPORTED Not supported USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed
int usb_host_transfer_get_type | ( | usb_host_transfer_h | transfer, |
usb_host_transfer_type_e * | transfer_type | ||
) |
Gets type of a transfer.
- Since :
- 5.0
- Parameters:
-
[in] transfer Transfer handle [out] transfer_type Transfer type (a value from enum usb_host_transfer_type_e)
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
USB_HOST_ERROR_NONE Successful USB_HOST_ERROR_NOT_SUPPORTED Not supported USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed