Print error code in ADK code

Also added space between message and error code
This commit is contained in:
Kristian Sloth Lauszus 2013-07-15 19:31:47 +02:00
parent 9f855fca16
commit 3b429e633b
3 changed files with 10 additions and 10 deletions

View file

@ -234,25 +234,25 @@ uint8_t ADK::Init(uint8_t parent, uint8_t port, bool lowspeed) {
/* diagnostic messages */ /* diagnostic messages */
FailGetDevDescr: FailGetDevDescr:
#ifdef DEBUG_USB_HOST #ifdef DEBUG_USB_HOST
NotifyFailGetDevDescr(); NotifyFailGetDevDescr(rcode);
goto Fail; goto Fail;
#endif #endif
FailSetDevTblEntry: FailSetDevTblEntry:
#ifdef DEBUG_USB_HOST #ifdef DEBUG_USB_HOST
NotifyFailSetDevTblEntry(); NotifyFailSetDevTblEntry(rcode);
goto Fail; goto Fail;
#endif #endif
FailGetConfDescr: FailGetConfDescr:
#ifdef DEBUG_USB_HOST #ifdef DEBUG_USB_HOST
NotifyFailGetConfDescr(); NotifyFailGetConfDescr(rcode);
goto Fail; goto Fail;
#endif #endif
FailSetConfDescr: FailSetConfDescr:
#ifdef DEBUG_USB_HOST #ifdef DEBUG_USB_HOST
NotifyFailSetConfDescr(); NotifyFailSetConfDescr(rcode);
goto Fail; goto Fail;
#endif #endif

View file

@ -65,18 +65,18 @@ void E_Notify(double d, int lvl) {
#ifdef DEBUG_USB_HOST #ifdef DEBUG_USB_HOST
void NotifyFailGetDevDescr(void) { void NotifyFailGetDevDescr(void) {
Notify(PSTR("\r\ngetDevDescr"), 0x80); Notify(PSTR("\r\ngetDevDescr "), 0x80);
} }
void NotifyFailSetDevTblEntry(void) { void NotifyFailSetDevTblEntry(void) {
Notify(PSTR("\r\nsetDevTblEn"), 0x80); Notify(PSTR("\r\nsetDevTblEn "), 0x80);
} }
void NotifyFailGetConfDescr(void) { void NotifyFailGetConfDescr(void) {
Notify(PSTR("\r\ngetConf"), 0x80); Notify(PSTR("\r\ngetConf "), 0x80);
} }
void NotifyFailSetConfDescr(void) { void NotifyFailSetConfDescr(void) {
Notify(PSTR("\r\nsetConf"), 0x80); Notify(PSTR("\r\nsetConf "), 0x80);
} }
void NotifyFailGetDevDescr(uint8_t reason) { void NotifyFailGetDevDescr(uint8_t reason) {
@ -95,12 +95,11 @@ void NotifyFailGetConfDescr(uint8_t reason) {
NotifyFail(reason); NotifyFail(reason);
} }
/* Will we need this in the future?
void NotifyFailSetConfDescr(uint8_t reason) { void NotifyFailSetConfDescr(uint8_t reason) {
NotifyFailSetConfDescr(); NotifyFailSetConfDescr();
NotifyFail(reason); NotifyFail(reason);
} }
*/
void NotifyFailUnknownDevice(uint16_t VID, uint16_t PID) { void NotifyFailUnknownDevice(uint16_t VID, uint16_t PID) {
Notify(PSTR("\r\nUnknown Device Connected - VID: "), 0x80); Notify(PSTR("\r\nUnknown Device Connected - VID: "), 0x80);
D_PrintHex<uint16_t > (VID, 0x80); D_PrintHex<uint16_t > (VID, 0x80);

View file

@ -43,6 +43,7 @@ void E_Notifyc(char c, int lvl);
void NotifyFailGetDevDescr(uint8_t reason); void NotifyFailGetDevDescr(uint8_t reason);
void NotifyFailSetDevTblEntry(uint8_t reason); void NotifyFailSetDevTblEntry(uint8_t reason);
void NotifyFailGetConfDescr(uint8_t reason); void NotifyFailGetConfDescr(uint8_t reason);
void NotifyFailSetConfDescr(uint8_t reason);
void NotifyFailGetDevDescr(void); void NotifyFailGetDevDescr(void);
void NotifyFailSetDevTblEntry(void); void NotifyFailSetDevTblEntry(void);
void NotifyFailGetConfDescr(void); void NotifyFailGetConfDescr(void);