9 #include "../../types.h"
13 u8 bInterfaceSubClass;
14 u8 bInterfaceProtocol;
Kernel-mode event structure.
Definition: event.h:13
Definition: usb_comms.h:11
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
uint16_t u16
16-bit unsigned integer.
Definition: types.h:20
u32 Result
Function error code result type.
Definition: types.h:44
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
Result usbCommsGetWriteResult(u32 urbId, u32 *transferredSize, u32 interface)
Complete an asynchronous write, clearing the completion event, and return the amount of data which wa...
Result usbCommsWriteAsync(void *buffer, size_t size, u32 *urbId, u32 interface)
Start an asynchronous write.
size_t usbCommsWriteEx(const void *buffer, size_t size, u32 interface)
Same as usbCommsWrite except with the specified interface.
Result usbCommsGetReadResult(u32 urbId, u32 *transferredSize, u32 interface)
Complete an asynchronous read, clearing the completion event, and return the amount of data which was...
Event * usbCommsGetWriteCompletionEvent(u32 interface)
Retrieve event used for write completion with the given interface.
void usbCommsExit(void)
Exits usbComms.
Result usbCommsInitializeEx(u32 num_interfaces, const UsbCommsInterfaceInfo *infos, u16 idVendor, u16 idProduct)
Initializes usbComms with a specific number of interfaces.
size_t usbCommsReadEx(void *buffer, size_t size, u32 interface)
Same as usbCommsRead except with the specified interface.
size_t usbCommsWrite(const void *buffer, size_t size)
Write data with the default interface.
Result usbCommsInitialize(void)
Initializes usbComms with the default number of interfaces (1)
void usbCommsSetErrorHandling(bool flag)
Sets whether to throw a fatal error in usbComms{Read/Write}* on failure, or just return the transferr...
size_t usbCommsRead(void *buffer, size_t size)
Read data with the default interface.
Event * usbCommsGetReadCompletionEvent(u32 interface)
Retrieve event used for read completion with the given interface.
Result usbCommsReadAsync(void *buffer, size_t size, u32 *urbId, u32 interface)
Start an asynchronous read.