There is no reason to cast implicit to HIDReportParser, as the classes already inherits it

This commit is contained in:
Kristian Sloth Lauszus 2016-01-20 14:59:16 +01:00
parent 099ced46df
commit 9eed52026b
5 changed files with 9 additions and 9 deletions

View file

@ -40,8 +40,8 @@ void setup() {
while (1); // Halt
}
bthid.SetReportParser(KEYBOARD_PARSER_ID, (HIDReportParser*)&keyboardPrs);
bthid.SetReportParser(MOUSE_PARSER_ID, (HIDReportParser*)&mousePrs);
bthid.SetReportParser(KEYBOARD_PARSER_ID, &keyboardPrs);
bthid.SetReportParser(MOUSE_PARSER_ID, &mousePrs);
// If "Boot Protocol Mode" does not work, then try "Report Protocol Mode"
// If that does not work either, then uncomment PRINTREPORT in BTHID.cpp to see the raw report

View file

@ -119,7 +119,7 @@ void setup()
next_time = millis() + 5000;
HidKeyboard.SetReportParser(0, (HIDReportParser*)&Prs);
HidKeyboard.SetReportParser(0, &Prs);
}
void loop()

View file

@ -165,10 +165,10 @@ void setup()
//next_time = millis() + 5000;
HidComposite.SetReportParser(0, (HIDReportParser*)&KbdPrs);
HidComposite.SetReportParser(1, (HIDReportParser*)&MousePrs);
HidKeyboard.SetReportParser(0, (HIDReportParser*)&KbdPrs);
HidMouse.SetReportParser(0, (HIDReportParser*)&MousePrs);
HidComposite.SetReportParser(0, &KbdPrs);
HidComposite.SetReportParser(1, &MousePrs);
HidKeyboard.SetReportParser(0, &KbdPrs);
HidMouse.SetReportParser(0, &MousePrs);
}
void loop()

View file

@ -73,7 +73,7 @@ void setup()
next_time = millis() + 5000;
HidMouse.SetReportParser(0,(HIDReportParser*)&Prs);
HidMouse.SetReportParser(0, &Prs);
}
void loop()

View file

@ -80,7 +80,7 @@ void setup()
while(1); //halt
}//if (Usb.Init() == -1...
HidKeyboard.SetReportParser(0, (HIDReportParser*)&Prs);
HidKeyboard.SetReportParser(0, &Prs);
delay( 200 );
}