Skip to content

Add method to get the error code from the USB object. #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libraries/USBHost/src/Usb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ void USBHost::setUsbTaskState(uint32_t state) {
usb_task_state = state;
}

uint32_t USBHost::getUsbErrorCode(void) {
return (usb_error);
}

EpInfo* USBHost::getEpInfoEntry(uint32_t addr, uint32_t ep) {
UsbDeviceDefinition *p = addrPool.GetUsbDevicePtr(addr);

Expand Down
2 changes: 2 additions & 0 deletions libraries/USBHost/src/UsbCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ class USBHost {
uint32_t getUsbTaskState(void);
void setUsbTaskState(uint32_t state);

uint32_t getUsbErrorCode(void);

EpInfo* getEpInfoEntry(uint32_t addr, uint32_t ep);
uint32_t setEpInfoEntry(uint32_t addr, uint32_t epcount, EpInfo* eprecord_ptr);

Expand Down