Changeset 110d795 in mainline for uspace/drv/bus/usb/xhci/commands.h
- Timestamp:
- 2017-07-22T23:07:40Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aee352c
- Parents:
- 9af3281
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/commands.h
r9af3281 r110d795 37 37 #define XHCI_COMMANDS_H 38 38 39 #include <adt/list.h> 40 #include <stdbool.h> 41 39 42 typedef struct xhci_hc xhci_hc_t; 40 43 typedef struct xhci_trb xhci_trb_t; 41 44 typedef struct xhci_input_ctx xhci_input_ctx_t; 42 45 43 int xhci_send_no_op_command(xhci_hc_t *); 44 int xhci_send_enable_slot_command(xhci_hc_t *); 45 int xhci_send_disable_slot_command(xhci_hc_t *, uint32_t); 46 int xhci_send_address_device_command(xhci_hc_t *, uint32_t, xhci_input_ctx_t *); 47 int xhci_send_configure_endpoint_command(xhci_hc_t *, uint32_t, xhci_input_ctx_t *); 48 int xhci_send_evaluate_context_command(xhci_hc_t *, uint32_t, xhci_input_ctx_t *); 49 int xhci_send_reset_endpoint_command(xhci_hc_t *, uint32_t, uint32_t, uint8_t); 50 int xhci_send_stop_endpoint_command(xhci_hc_t *, uint32_t, uint32_t, uint8_t); 46 typedef struct xhci_command { 47 link_t link; 48 49 xhci_trb_t *trb; 50 xhci_input_ctx_t *ictx; 51 uint32_t slot_id; 52 uint32_t status; 53 54 bool completed; 55 bool has_owner; 56 } xhci_cmd_t; 57 58 int xhci_init_commands(xhci_hc_t *); 59 int xhci_wait_for_command(xhci_hc_t *, xhci_cmd_t *, uint32_t); 60 xhci_cmd_t *xhci_alloc_command(void); 61 void xhci_free_command(xhci_cmd_t *); 62 63 int xhci_send_no_op_command(xhci_hc_t *, xhci_cmd_t *); 64 int xhci_send_enable_slot_command(xhci_hc_t *, xhci_cmd_t *); 65 int xhci_send_disable_slot_command(xhci_hc_t *, xhci_cmd_t *); 66 int xhci_send_address_device_command(xhci_hc_t *, xhci_cmd_t *); 67 int xhci_send_configure_endpoint_command(xhci_hc_t *, xhci_cmd_t *); 68 int xhci_send_evaluate_context_command(xhci_hc_t *, xhci_cmd_t *); 69 int xhci_send_reset_endpoint_command(xhci_hc_t *, xhci_cmd_t *, uint32_t, uint8_t); 70 int xhci_send_stop_endpoint_command(xhci_hc_t *, xhci_cmd_t *, uint32_t, uint8_t); 51 71 // TODO: Set dequeue ptr (section 4.6.10). 52 int xhci_send_reset_device_command(xhci_hc_t *, uint32_t);72 int xhci_send_reset_device_command(xhci_hc_t *, xhci_cmd_t *); 53 73 // TODO: Force event (optional normative, for VMM, section 4.6.12). 54 74 // TODO: Negotiate bandwidth (optional normative, section 4.6.13).
Note:
See TracChangeset
for help on using the changeset viewer.