Statistics: Posted by theSuess — Thu Feb 29, 2024 8:20 am
Statistics: Posted by theSuess — Wed Feb 28, 2024 9:51 pm
Statistics: Posted by theSuess — Wed Feb 28, 2024 5:30 pm
Statistics: Posted by yellows8 — Tue Feb 27, 2024 7:07 pm
Code:
Result usbHsEpPostBufferWithTimeout(UsbHsClientEpSession *s, void *buffer, u32 size, u32 *transferredSize, u64 timeout_ns) { Result rc = 0; u32 xferId = 0; u32 count = 0; UsbHsXferReport report; rc = usbHsEpPostBufferAsync(s, buffer, size, 0, &xferId); if (R_FAILED(rc)) return rc; rc = eventWait(&s->eventXfer, timeout_ns); if (rc == 0xea01) { // error code for timeout return rc; } if (R_FAILED(rc)) { return rc; } eventClear(&s->eventXfer); memset(&report, 0, sizeof(report)); rc = usbHsEpGetXferReport(s, &report, 1, &count); if (R_FAILED(rc)) return rc; if (count < 1) return MAKERESULT(Module_Libnx, LibnxError_BadInput); *transferredSize = report.transferredSize; rc = report.res; return rc;}
Statistics: Posted by theSuess — Mon Feb 26, 2024 8:27 pm
Statistics: Posted by DarkMatterCore — Fri Feb 23, 2024 7:42 am
Code:
/* * assume "struct timespec" is not defined if st_mtime is not defined */#if !defined(st_mtime) & !defined(__timespec_defined)struct timespec {time_t tv_sec;long tv_nsec;} ;#endif
Statistics: Posted by DarkMatterCore — Thu Feb 22, 2024 8:00 pm
Statistics: Posted by WinterMute — Thu Feb 22, 2024 2:34 pm
Statistics: Posted by theSuess — Tue Feb 20, 2024 3:27 pm