Cleanup commenting/whitespace

This commit is contained in:
Michael Scire 2018-10-05 13:05:47 -07:00
parent 3b37dc24bf
commit d066b93bb3
3 changed files with 5 additions and 8 deletions

View File

@ -121,9 +121,9 @@ typedef enum {
} UsbComplexId;
typedef enum {
UsbDeviceSpeed_Full = 0x2,
UsbDeviceSpeed_High = 0x3,
UsbDeviceSpeed_Super = 0x4,
UsbDeviceSpeed_Full = 0x2, // USB 1.1 Full Speed
UsbDeviceSpeed_High = 0x3, // USB 2.0 High Speed
UsbDeviceSpeed_Super = 0x4, // USB 3.0 Super Speed
} UsbDeviceSpeed;
/// Imported from libusb, with changed names.
@ -206,9 +206,6 @@ Result usbDsWaitReady(u64 timeout);
Result usbDsParseReportData(UsbDsReportData *reportdata, u32 urbId, u32 *requestedSize, u32 *transferredSize);
/// 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);
Result usbDsGetState(u32* out);

View File

@ -45,7 +45,6 @@ Result usbCommsInitializeEx(u32 num_interfaces)
rc = usbDsInitialize();
if (R_SUCCEEDED(rc)) {
if (kernelAbove500()) {
u8 iManufacturer, iProduct, iSerialNumber;
static const u16 supported_langs[1] = {0x0409};
@ -75,6 +74,7 @@ Result usbCommsInitializeEx(u32 num_interfaces)
.iSerialNumber = iSerialNumber,
.bNumConfigurations = 0x01
};
// Full Speed is USB 1.1
if (R_SUCCEEDED(rc)) rc = usbDsSetUsbDeviceDescriptor(UsbDeviceSpeed_Full, &device_descriptor);
// High Speed is USB 2.0

View File

@ -42,7 +42,7 @@ Result usbDsInitialize(void)
// GetStateChangeEvent
if (R_SUCCEEDED(rc))
rc = _usbDsGetEvent(&g_usbDsSrv, &g_usbDsStateChangeEvent, 3);
// Result code doesn't matter here, users can call themselves later, too. This prevents foot shooting.
if (R_SUCCEEDED(rc))
usbDsClearDeviceData();