Embed:
(wiki syntax)
Show/hide line numbers
USBRawHID.h
00001 /* USBMouse.h */ 00002 /* USB device example: relative mouse */ 00003 /* Copyright (c) 2011 ARM Limited. All rights reserved. */ 00004 00005 #ifndef _USB_RAW_HID_ 00006 #define _USB_RAW_HID_ 00007 00008 #include "USBHID.h" 00009 00010 /** USB device: a relative mouse 00011 * 00012 * Warning: you can only instantiate one instance of a USB device: USBMouse, USBKeyboard, USBAbsMouse, USBMouseKeyboard, or USBAbsMouseKeyboard. 00013 * 00014 * Example: 00015 * @code 00016 * #include "mbed.h" 00017 * #include "USBMouse.h" 00018 * 00019 * USBMouse mouse; 00020 * 00021 * #define STEP (2) 00022 * #define SIZE (100) 00023 * 00024 * int main(void) 00025 * { 00026 * int32_t a; 00027 * 00028 * while (1) 00029 * { 00030 * for (a=0; a<SIZE; a++) 00031 * { 00032 * mouse.move(STEP,0); 00033 * } 00034 * 00035 * for (a=0; a<SIZE; a++) 00036 * { 00037 * mouse.move(0,STEP); 00038 * } 00039 * 00040 * for (a=0; a<SIZE; a++) 00041 * { 00042 * mouse.move(-STEP,0); 00043 * } 00044 * 00045 * for (a=0; a<SIZE; a++) 00046 * { 00047 * mouse.move(0,-STEP); 00048 * } 00049 * } 00050 * } 00051 * 00052 * @endcode 00053 */ 00054 class USBRawHID: public USBHID 00055 { 00056 public: 00057 00058 /** 00059 * Constructor for a USBMouse (relative mouse) 00060 */ 00061 USBRawHID(){}; 00062 00063 00064 virtual uint8_t * ReportDesc(); 00065 00066 }; 00067 00068 #endif
Generated on Fri Jul 15 2022 02:22:27 by 1.7.2