usb_usb: usb_hid: Change for USB_Host_Shield_2.0
This commit is contained in:
parent
23037e108f
commit
a0b5bf4b67
4 changed files with 10 additions and 10 deletions
|
|
@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// USB HID host
|
||||
#include "Usb.h"
|
||||
#include "usbhub.h"
|
||||
#include "hid.h"
|
||||
#include "usbhid.h"
|
||||
#include "hidboot.h"
|
||||
#include "parser.h"
|
||||
|
||||
|
|
@ -73,10 +73,10 @@ static bool matrix_is_mod =false;
|
|||
USB usb_host;
|
||||
USBHub hub1(&usb_host);
|
||||
USBHub hub2(&usb_host);
|
||||
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd1(&usb_host);
|
||||
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd2(&usb_host);
|
||||
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd3(&usb_host);
|
||||
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd4(&usb_host);
|
||||
HIDBoot<USB_HID_PROTOCOL_KEYBOARD> kbd1(&usb_host);
|
||||
HIDBoot<USB_HID_PROTOCOL_KEYBOARD> kbd2(&usb_host);
|
||||
HIDBoot<USB_HID_PROTOCOL_KEYBOARD> kbd3(&usb_host);
|
||||
HIDBoot<USB_HID_PROTOCOL_KEYBOARD> kbd4(&usb_host);
|
||||
KBDReportParser kbd_parser1;
|
||||
KBDReportParser kbd_parser2;
|
||||
KBDReportParser kbd_parser3;
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ USB_HID_DIR = protocol/usb_hid
|
|||
#
|
||||
# USB Host Shield
|
||||
#
|
||||
USB_HOST_SHIELD_DIR = $(USB_HID_DIR)/USB_Host_Shield_2.0
|
||||
USB_HOST_SHIELD_DIR = $(USB_HID_DIR)/USB_Host_Shield_2.0-git
|
||||
USB_HOST_SHIELD_SRC = \
|
||||
$(USB_HOST_SHIELD_DIR)/Usb.cpp \
|
||||
$(USB_HOST_SHIELD_DIR)/hid.cpp \
|
||||
$(USB_HOST_SHIELD_DIR)/usbhid.cpp \
|
||||
$(USB_HOST_SHIELD_DIR)/usbhub.cpp \
|
||||
$(USB_HOST_SHIELD_DIR)/parsetools.cpp \
|
||||
$(USB_HOST_SHIELD_DIR)/message.cpp
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include "debug.h"
|
||||
|
||||
|
||||
void KBDReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf)
|
||||
void KBDReportParser::Parse(USBHID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf)
|
||||
{
|
||||
dprintf("input %d:", hid->GetAddress());
|
||||
for (uint8_t i = 0; i < len; i++) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef PARSER_H
|
||||
#define PARSER_H
|
||||
|
||||
#include "hid.h"
|
||||
#include "usbhid.h"
|
||||
#include "report.h"
|
||||
|
||||
class KBDReportParser : public HIDReportParser
|
||||
|
|
@ -9,7 +9,7 @@ class KBDReportParser : public HIDReportParser
|
|||
public:
|
||||
report_keyboard_t report;
|
||||
uint16_t time_stamp;
|
||||
virtual void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf);
|
||||
virtual void Parse(USBHID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue