mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-26 12:12:02 +00:00
Small USB status codes update.
This commit is contained in:
parent
a7698e435e
commit
daedae88a8
1 changed files with 11 additions and 10 deletions
21
source/usb.c
21
source/usb.c
|
@ -71,17 +71,19 @@ typedef struct {
|
||||||
} UsbCommandSendFileProperties;
|
} UsbCommandSendFileProperties;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
/* Expected response code */
|
||||||
UsbStatusType_Success = 0,
|
UsbStatusType_Success = 0,
|
||||||
|
|
||||||
|
/* Internal usage */
|
||||||
UsbStatusType_InvalidCommandSize = 1,
|
UsbStatusType_InvalidCommandSize = 1,
|
||||||
UsbStatusType_WriteCommandFailed = 2,
|
UsbStatusType_WriteCommandFailed = 2,
|
||||||
UsbStatusType_ReadStatusFailed = 3,
|
UsbStatusType_ReadStatusFailed = 3,
|
||||||
UsbStatusType_InvalidMagicWord = 4,
|
|
||||||
|
|
||||||
UsbStatusType_MalformedCommand = 5,
|
/* These can be returned by the host device */
|
||||||
|
UsbStatusType_InvalidMagicWord = 4,
|
||||||
|
UsbStatusType_UnsupportedCommand = 5,
|
||||||
UsbStatusType_UnsupportedAbiVersion = 6,
|
UsbStatusType_UnsupportedAbiVersion = 6,
|
||||||
UsbStatusType_UnsupportedCommand = 7,
|
UsbStatusType_HostIoError = 7
|
||||||
UsbStatusType_HostIoError = 8
|
|
||||||
} UsbStatusType;
|
} UsbStatusType;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -421,17 +423,16 @@ NX_INLINE void usbLogStatusDetail(u32 status)
|
||||||
case UsbStatusType_InvalidCommandSize:
|
case UsbStatusType_InvalidCommandSize:
|
||||||
case UsbStatusType_WriteCommandFailed:
|
case UsbStatusType_WriteCommandFailed:
|
||||||
case UsbStatusType_ReadStatusFailed:
|
case UsbStatusType_ReadStatusFailed:
|
||||||
|
break;
|
||||||
case UsbStatusType_InvalidMagicWord:
|
case UsbStatusType_InvalidMagicWord:
|
||||||
break;
|
LOGFILE("Host replied with Invalid Magic Word status code.");
|
||||||
case UsbStatusType_MalformedCommand:
|
|
||||||
LOGFILE("Host replied with Malformed Command status code.");
|
|
||||||
break;
|
|
||||||
case UsbStatusType_UnsupportedAbiVersion:
|
|
||||||
LOGFILE("Host replied with Unsupported ABI Version status code.");
|
|
||||||
break;
|
break;
|
||||||
case UsbStatusType_UnsupportedCommand:
|
case UsbStatusType_UnsupportedCommand:
|
||||||
LOGFILE("Host replied with Unsupported Command status code.");
|
LOGFILE("Host replied with Unsupported Command status code.");
|
||||||
break;
|
break;
|
||||||
|
case UsbStatusType_UnsupportedAbiVersion:
|
||||||
|
LOGFILE("Host replied with Unsupported ABI Version status code.");
|
||||||
|
break;
|
||||||
case UsbStatusType_HostIoError:
|
case UsbStatusType_HostIoError:
|
||||||
LOGFILE("Host replied with I/O Error status code.");
|
LOGFILE("Host replied with I/O Error status code.");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue