libtransistor
A userland library for the Nintendo Switch
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
endpoint.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 #include<libtransistor/types.h>
13 #include<libtransistor/ipc.h>
14 
15 typedef struct {
16  ipc_object_t object;
18 
19 typedef struct {
20  uint32_t urb_id;
21  uint32_t requested_size;
22  uint32_t transferred_size;
23  uint32_t urb_status;
25 
26 typedef struct {
27  usb_ds_report_entry_t entries[8];
28  uint32_t entry_count;
30 
34 result_t usb_ds_post_buffer_async(usb_ds_endpoint_t *endp, void *buffer, size_t size, uint32_t *urb_id);
35 
40 
45 
50 
55 
56 #ifdef __cplusplus
57 }
58 #endif
Various system types.
result_t usb_ds_get_completion_event(usb_ds_endpoint_t *endp, revent_h *event)
Gets an event that is signalled when a transaction completes.
uint32_t result_t
Function result.
Definition: types.h:51
handle_t revent_h
revent handle
Definition: types.h:47
Definition: endpoint.h:26
result_t usb_ds_get_report_data(usb_ds_endpoint_t *endp, usb_ds_report_t *report)
Gets report data.
result_t usb_ds_stall(usb_ds_endpoint_t *endp)
Halts an in-progress data transfer.
Represents either an object within an IPC domain or a standalone object.
Definition: ipc.h:32
result_t usb_ds_close_endpoint(usb_ds_endpoint_t *endp)
Close and destroy the given endpoint.
Definition: endpoint.h:19
Interprocess Communication data structures and functions.
result_t usb_ds_post_buffer_async(usb_ds_endpoint_t *endp, void *buffer, size_t size, uint32_t *urb_id)
Submits the buffer for transfer over the endpoint.
Definition: endpoint.h:15