Changeset 55054db0 in mainline for uspace/lib/usbdev/src/request.c
- Timestamp:
- 2011-05-13T13:44:19Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 852803a
- Parents:
- 3e4f2e0 (diff), c372e03 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/request.c
r3e4f2e0 r55054db0 885 885 } 886 886 887 /** Clear halt bit of an endpoint pipe (after pipe stall). 888 * 889 * @param ctrl_pipe Control pipe. 890 * @param target_pipe Which pipe is halted and shall be cleared. 891 * @return Error code. 892 */ 893 int usb_pipe_clear_halt(usb_pipe_t *ctrl_pipe, usb_pipe_t *target_pipe) 894 { 895 if ((ctrl_pipe == NULL) || (target_pipe == NULL)) { 896 return EINVAL; 897 } 898 return usb_request_clear_endpoint_halt(ctrl_pipe, 899 target_pipe->endpoint_no); 900 } 901 902 /** Get endpoint status. 903 * 904 * @param[in] ctrl_pipe Control pipe. 905 * @param[in] pipe Of which pipe the status shall be received. 906 * @param[out] status Where to store pipe status (in native endianness). 907 * @return Error code. 908 */ 909 int usb_request_get_endpoint_status(usb_pipe_t *ctrl_pipe, usb_pipe_t *pipe, 910 uint16_t *status) 911 { 912 uint16_t status_tmp; 913 uint16_t pipe_index = (uint16_t) pipe->endpoint_no; 914 int rc = usb_request_get_status(ctrl_pipe, 915 USB_REQUEST_RECIPIENT_ENDPOINT, uint16_host2usb(pipe_index), 916 &status_tmp); 917 if (rc != EOK) { 918 return rc; 919 } 920 921 if (status != NULL) { 922 *status = uint16_usb2host(status_tmp); 923 } 924 925 return EOK; 926 } 927 887 928 /** 888 929 * @}
Note:
See TracChangeset
for help on using the changeset viewer.