mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-26 12:12:02 +00:00
Update usb.c
This commit is contained in:
parent
5be5a7b16d
commit
00dd3df4fc
1 changed files with 10 additions and 1 deletions
|
@ -206,7 +206,9 @@ static void usbEndSession(void);
|
||||||
|
|
||||||
NX_INLINE void usbPrepareCommandHeader(u32 cmd, u32 cmd_block_size);
|
NX_INLINE void usbPrepareCommandHeader(u32 cmd, u32 cmd_block_size);
|
||||||
static bool usbSendCommand(void);
|
static bool usbSendCommand(void);
|
||||||
|
#if LOG_LEVEL <= LOG_LEVEL_ERROR
|
||||||
static void usbLogStatusDetail(u32 status);
|
static void usbLogStatusDetail(u32 status);
|
||||||
|
#endif
|
||||||
|
|
||||||
NX_INLINE bool usbAllocateTransferBuffer(void);
|
NX_INLINE bool usbAllocateTransferBuffer(void);
|
||||||
NX_INLINE void usbFreeTransferBuffer(void);
|
NX_INLINE void usbFreeTransferBuffer(void);
|
||||||
|
@ -449,7 +451,10 @@ bool usbSendFileData(void *data, u64 data_size)
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(ret = (cmd_status->status == UsbStatusType_Success))) usbLogStatusDetail(cmd_status->status);
|
ret = (cmd_status->status == UsbStatusType_Success);
|
||||||
|
#if LOG_LEVEL <= LOG_LEVEL_ERROR
|
||||||
|
if (!ret) usbLogStatusDetail(cmd_status->status);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
@ -740,11 +745,14 @@ static bool usbSendCommand(void)
|
||||||
ret = ((status = cmd_status->status) == UsbStatusType_Success);
|
ret = ((status = cmd_status->status) == UsbStatusType_Success);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
#if LOG_LEVEL <= LOG_LEVEL_ERROR
|
||||||
if (!ret) usbLogStatusDetail(status);
|
if (!ret) usbLogStatusDetail(status);
|
||||||
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LOG_LEVEL <= LOG_LEVEL_INFO
|
||||||
static void usbLogStatusDetail(u32 status)
|
static void usbLogStatusDetail(u32 status)
|
||||||
{
|
{
|
||||||
switch(status)
|
switch(status)
|
||||||
|
@ -774,6 +782,7 @@ static void usbLogStatusDetail(u32 status)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
NX_INLINE bool usbAllocateTransferBuffer(void)
|
NX_INLINE bool usbAllocateTransferBuffer(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue