mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-06 03:12:15 +02:00
Cleanup commenting/whitespace
This commit is contained in:
parent
3b37dc24bf
commit
d066b93bb3
@ -121,9 +121,9 @@ typedef enum {
|
|||||||
} UsbComplexId;
|
} UsbComplexId;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
UsbDeviceSpeed_Full = 0x2,
|
UsbDeviceSpeed_Full = 0x2, // USB 1.1 Full Speed
|
||||||
UsbDeviceSpeed_High = 0x3,
|
UsbDeviceSpeed_High = 0x3, // USB 2.0 High Speed
|
||||||
UsbDeviceSpeed_Super = 0x4,
|
UsbDeviceSpeed_Super = 0x4, // USB 3.0 Super Speed
|
||||||
} UsbDeviceSpeed;
|
} UsbDeviceSpeed;
|
||||||
|
|
||||||
/// Imported from libusb, with changed names.
|
/// Imported from libusb, with changed names.
|
||||||
@ -206,9 +206,6 @@ Result usbDsWaitReady(u64 timeout);
|
|||||||
Result usbDsParseReportData(UsbDsReportData *reportdata, u32 urbId, u32 *requestedSize, u32 *transferredSize);
|
Result usbDsParseReportData(UsbDsReportData *reportdata, u32 urbId, u32 *requestedSize, u32 *transferredSize);
|
||||||
|
|
||||||
/// IDsService
|
/// IDsService
|
||||||
// Do not provide API access to these functions, as they're handled by usbDsInitialize().
|
|
||||||
// Result usbDsBindDevice(UsbComplexId complexId);
|
|
||||||
// Result usbDsBindClientProcess(Handle prochandle);
|
|
||||||
Event* usbDsGetStateChangeEvent(void);
|
Event* usbDsGetStateChangeEvent(void);
|
||||||
Result usbDsGetState(u32* out);
|
Result usbDsGetState(u32* out);
|
||||||
|
|
||||||
|
@ -45,7 +45,6 @@ Result usbCommsInitializeEx(u32 num_interfaces)
|
|||||||
rc = usbDsInitialize();
|
rc = usbDsInitialize();
|
||||||
|
|
||||||
if (R_SUCCEEDED(rc)) {
|
if (R_SUCCEEDED(rc)) {
|
||||||
|
|
||||||
if (kernelAbove500()) {
|
if (kernelAbove500()) {
|
||||||
u8 iManufacturer, iProduct, iSerialNumber;
|
u8 iManufacturer, iProduct, iSerialNumber;
|
||||||
static const u16 supported_langs[1] = {0x0409};
|
static const u16 supported_langs[1] = {0x0409};
|
||||||
@ -75,6 +74,7 @@ Result usbCommsInitializeEx(u32 num_interfaces)
|
|||||||
.iSerialNumber = iSerialNumber,
|
.iSerialNumber = iSerialNumber,
|
||||||
.bNumConfigurations = 0x01
|
.bNumConfigurations = 0x01
|
||||||
};
|
};
|
||||||
|
// Full Speed is USB 1.1
|
||||||
if (R_SUCCEEDED(rc)) rc = usbDsSetUsbDeviceDescriptor(UsbDeviceSpeed_Full, &device_descriptor);
|
if (R_SUCCEEDED(rc)) rc = usbDsSetUsbDeviceDescriptor(UsbDeviceSpeed_Full, &device_descriptor);
|
||||||
|
|
||||||
// High Speed is USB 2.0
|
// High Speed is USB 2.0
|
||||||
|
@ -42,7 +42,7 @@ Result usbDsInitialize(void)
|
|||||||
// GetStateChangeEvent
|
// GetStateChangeEvent
|
||||||
if (R_SUCCEEDED(rc))
|
if (R_SUCCEEDED(rc))
|
||||||
rc = _usbDsGetEvent(&g_usbDsSrv, &g_usbDsStateChangeEvent, 3);
|
rc = _usbDsGetEvent(&g_usbDsSrv, &g_usbDsStateChangeEvent, 3);
|
||||||
|
|
||||||
// Result code doesn't matter here, users can call themselves later, too. This prevents foot shooting.
|
// Result code doesn't matter here, users can call themselves later, too. This prevents foot shooting.
|
||||||
if (R_SUCCEEDED(rc))
|
if (R_SUCCEEDED(rc))
|
||||||
usbDsClearDeviceData();
|
usbDsClearDeviceData();
|
||||||
|
Loading…
Reference in New Issue
Block a user