Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
usbhid.h
00001 /* usbhid.h */ 00002 /* USB HID class device */ 00003 /* Copyright (c) Phil Wright 2008 */ 00004 00005 #ifndef USBHID_H 00006 #define USBHID_H 00007 00008 #include "usbdevice.h" 00009 00010 /* Mouse buttons */ 00011 #define MOUSE_L (1<<0) 00012 #define MOUSE_M (1<<1) 00013 #define MOUSE_R (1<<2) 00014 00015 class usbhid : public usbdevice 00016 { 00017 public: 00018 usbhid(); 00019 bool keyboard(char c); 00020 bool keyboard(char *string); 00021 bool mouse(signed char x, signed char y, unsigned char buttons=0, signed char wheel=0); 00022 protected: 00023 virtual bool requestSetConfiguration(); 00024 virtual void endpointEventEP1In(void); 00025 virtual void deviceEventReset(void); 00026 virtual bool requestGetDescriptor(void); 00027 virtual bool requestSetup(void); 00028 private: 00029 bool sendInputReport(unsigned char id, unsigned char *data, unsigned char size); 00030 }; 00031 00032 #endif
Generated on Tue Jul 12 2022 19:23:02 by
