Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a6ab0f3

Browse filesBrowse files
MarkFischercmaglie
authored andcommitted
Added method to return USB Error code.
1 parent cd52f71 commit a6ab0f3
Copy full SHA for a6ab0f3

File tree

2 files changed

+6
-1
lines changed
Filter options

2 files changed

+6
-1
lines changed

‎libraries/USBHost/src/Usb.cpp

Copy file name to clipboardExpand all lines: libraries/USBHost/src/Usb.cpp
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ void USBHost::setUsbTaskState(uint32_t state) {
4949
usb_task_state = state;
5050
}
5151

52+
uint32_t USBHost::getUsbErrorCode(void) {
53+
return (usb_error);
54+
}
55+
5256
EpInfo* USBHost::getEpInfoEntry(uint32_t addr, uint32_t ep) {
5357
UsbDeviceDefinition *p = addrPool.GetUsbDevicePtr(addr);
5458

‎libraries/USBHost/src/UsbCore.h

Copy file name to clipboardExpand all lines: libraries/USBHost/src/UsbCore.h
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ class USBHost {
222222
};
223223
uint32_t getUsbTaskState(void);
224224
void setUsbTaskState(uint32_t state);
225-
225+
uint32_t getUsbErrorCode(void);
226+
226227
EpInfo* getEpInfoEntry(uint32_t addr, uint32_t ep);
227228
uint32_t setEpInfoEntry(uint32_t addr, uint32_t epcount, EpInfo* eprecord_ptr);
228229

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.