libnx
Functions
usb_comms.h File Reference

USB comms. More...

#include "../../types.h"

Go to the source code of this file.

Functions

Result usbCommsInitialize (void)
 
void usbCommsExit (void)
 
Result usbCommsInitializeEx (u32 *interface, u8 bInterfaceClass, u8 bInterfaceSubClass, u8 bInterfaceProtocol)
 Same as usbCommsInitialize, except this can be used after usbCommsInitialize (or instead of usbCommsInitialize), for creating new interface(s). More...
 
void usbCommsExitEx (u32 interface)
 Shutdown the specified interface. If no interfaces are remaining, this then uses usbCommsExit internally.
 
size_t usbCommsRead (void *buffer, size_t size)
 Read data with the default interface.
 
size_t usbCommsWrite (const void *buffer, size_t size)
 Write data with the default interface.
 
size_t usbCommsReadEx (void *buffer, size_t size, u32 interface)
 Same as usbCommsRead except with the specified interface.
 
size_t usbCommsWriteEx (const void *buffer, size_t size, u32 interface)
 Same as usbCommsWrite except with the specified interface.
 

Detailed Description

USB comms.

Author
yellows8
plutoo

Function Documentation

Result usbCommsInitializeEx ( u32 interface,
u8  bInterfaceClass,
u8  bInterfaceSubClass,
u8  bInterfaceProtocol 
)

Same as usbCommsInitialize, except this can be used after usbCommsInitialize (or instead of usbCommsInitialize), for creating new interface(s).

bInterface* are the values for the same fields in usb.h usb_interface_descriptor. usbCommsInitialize uses USB_CLASS_VENDOR_SPEC for all of these internally.