X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/8f6b4ddf764c3a54e42d00a7502c82c5c3e71b1c..4a8ac5e474741f14492597880e751b3f806cb965:/Demos/Device/Mouse/Mouse.h?ds=sidebyside diff --git a/Demos/Device/Mouse/Mouse.h b/Demos/Device/Mouse/Mouse.h index 714f8d6e8..65879da8e 100644 --- a/Demos/Device/Mouse/Mouse.h +++ b/Demos/Device/Mouse/Mouse.h @@ -50,30 +50,33 @@ #include // USB Functionality #include // Joystick driver #include // LEDs driver - #include // Hardware Button driver + #include // Board Buttons driver #include // Simple scheduler for task management /* Task Definitions: */ TASK(USB_Mouse_Report); /* Macros: */ + /** Idle period indicating that reports should be sent only when the inputs have changed */ + #define HID_IDLE_CHANGESONLY 0 + /** HID Class specific request to get the next HID report from the device. */ - #define REQ_GetReport 0x01 + #define REQ_GetReport 0x01 /** HID Class specific request to get the idle timeout period of the device. */ - #define REQ_GetIdle 0x02 + #define REQ_GetIdle 0x02 /** HID Class specific request to send the next HID report to the device. */ - #define REQ_SetReport 0x09 + #define REQ_SetReport 0x09 /** HID Class specific request to set the idle timeout period of the device. */ - #define REQ_SetIdle 0x0A + #define REQ_SetIdle 0x0A /** HID Class specific request to get the current HID protocol in use, either report or boot. */ - #define REQ_GetProtocol 0x03 + #define REQ_GetProtocol 0x03 /** HID Class specific request to set the current HID protocol in use, either report or boot. */ - #define REQ_SetProtocol 0x0B + #define REQ_SetProtocol 0x0B /* Type Defines: */ /** Type define for the mouse HID report structure, for creating and sending HID reports to the host PC. @@ -95,23 +98,12 @@ Status_USBReady = 2, /**< USB interface is connected and ready */ }; - /* Event Handlers: */ - /** Indicates that this module will catch the USB_Connect event when thrown by the library. */ - HANDLES_EVENT(USB_Connect); - - /** Indicates that this module will catch the USB_Disconnect event when thrown by the library. */ - HANDLES_EVENT(USB_Disconnect); - - /** Indicates that this module will catch the USB_Reset event when thrown by the library. */ - HANDLES_EVENT(USB_Reset); - - /** Indicates that this module will catch the USB_ConfigurationChanged event when thrown by the library. */ - HANDLES_EVENT(USB_ConfigurationChanged); - - /** Indicates that this module will catch the USB_UnhandledControlPacket event when thrown by the library. */ - HANDLES_EVENT(USB_UnhandledControlPacket); - /* Function Prototypes: */ + void EVENT_USB_Connect(void); + void EVENT_USB_Disconnect(void); + void EVENT_USB_ConfigurationChanged(void); + void EVENT_USB_UnhandledControlPacket(void); + void CreateMouseReport(USB_MouseReport_Data_t* ReportData); void UpdateStatus(uint8_t CurrentStatus);