Tizen Native API
9.0
|
This API is used to handle tasks related to USB endpoints.
This API is used to handle tasks related to USB endpoints
Overview
Data structures and operations described here are related to USB endpoint. Endpoints are used to perform USB transfers.
Overview
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 the "number" of the given USB endpoint handle. | |
int | usb_host_endpoint_get_direction (usb_host_endpoint_h ep, usb_host_endpoint_direction_e *direction) |
Gets the direction of the given USB endpoint handle. | |
int | usb_host_endpoint_get_transfer_type (usb_host_endpoint_h ep, usb_host_transfer_type_e *transfer_type) |
Gets transfer type of the given USB endpoint handle. | |
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 USB endpoint handle. | |
int | usb_host_endpoint_get_usage_type (usb_host_endpoint_h ep, usb_host_usage_type_e *usage_type) |
Gets the usage type of the given USB endpoint handle. | |
int | usb_host_endpoint_get_max_packet_size (usb_host_endpoint_h ep, int *max_packet_size) |
Gets max packet size from given USB endpoint handle. | |
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 from a given transfer handle. | |
Typedefs | |
typedef struct usb_host_endpoint_s * | usb_host_endpoint_h |
An opaque handle representing a USB interface endpoint. |
Typedef Documentation
typedef struct usb_host_endpoint_s* usb_host_endpoint_h |
An opaque handle representing a USB interface endpoint.
This type represents USB endpoint. This handle can be obtained by usb_host_interface_get_endpoint().
- Since :
- 3.0
Enumeration Type Documentation
Enumeration of isochronous endpoint's synchronization type.
Used to control how a data transfer request is going to be synchronized.
- Since :
- 3.0
An enumeration representing USB endpoint transfer type.
Used to control how a data transfer request is going to operate.
- Since :
- 3.0
Function Documentation
int usb_host_endpoint_get_direction | ( | usb_host_endpoint_h | ep, |
usb_host_endpoint_direction_e * | direction | ||
) |
Gets the direction of the given USB endpoint handle.
Gets the direction of the given USB endpoint handle.
- 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.
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 from given USB endpoint handle.
Gets max packet size from given USB endpoint handle.
- 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 the "number" of the given USB endpoint handle.
Gets the "number" of the given USB endpoint handle.
- 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 USB endpoint handle.
Gets synchronization type of given USB endpoint handle.
- 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 the given USB endpoint handle.
Gets transfer type of the given USB endpoint handle.
- 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 the usage type of the given USB endpoint handle.
Gets the usage type of the given USB endpoint handle.
- 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 from a given transfer handle.
Gets type of a transfer from a given transfer handle.
- 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