Embed:
(wiki syntax)
Show/hide line numbers
USBHID.h
00001 /* USBClass_HID.h */ 00002 /* Human Interface Device (HID) class */ 00003 /* Copyright (c) 2011 ARM Limited. All rights reserved. */ 00004 00005 #ifndef _USB_CLASS_HID_ 00006 #define _USB_CLASS_HID_ 00007 00008 /* These headers are included for child class. */ 00009 #include "USBEndpoints.h" 00010 #include "USBDescriptor.h" 00011 #include "USBHID_Types.h" 00012 #include "USBDevice_Types.h" 00013 #include "USBDevice.h" 00014 #include "asciihid.h" 00015 00016 #include "USBDevice.h" 00017 00018 bool USBClass_HID_request(void); 00019 void USBClass_HID_requestCompleted(void); 00020 bool USBClass_HID_sendInputReport(uint8_t endpoint, HID_REPORT *report); 00021 bool USBClass_HID_getOutputReport(uint8_t endpoint, HID_REPORT *report); 00022 00023 00024 class USBHID: public USBDevice 00025 { 00026 public: 00027 //reportDesc is called to initalize the length of the report descriptor 00028 USBHID(); 00029 virtual uint8_t * ReportDesc(){return NULL;}; 00030 virtual uint16_t ReportDescLength(); 00031 00032 virtual void HID_callbackSetReport(HID_REPORT *report); 00033 00034 virtual void USBCallback_busReset(void); 00035 virtual bool USBCallback_request(); 00036 virtual void USBCallback_requestCompleted(); 00037 virtual bool USBCallback_setConfiguration(uint8_t configuration); 00038 00039 protected: 00040 uint16_t reportLength; 00041 }; 00042 00043 void setInstanceHID(USBHID * _inst); 00044 00045 #endif
Generated on Fri Jul 15 2022 02:22:27 by 1.7.2