X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/fc92f9969c1fcc2f952f0bd6d09a309a9b3ce02f..6599238dab21b864a40ca1873f3621d9bbd10a4c:/Demos/Host/LowLevel/MouseHost/MouseHost.h diff --git a/Demos/Host/LowLevel/MouseHost/MouseHost.h b/Demos/Host/LowLevel/MouseHost/MouseHost.h index f196dadcb..9b960bd7a 100644 --- a/Demos/Host/LowLevel/MouseHost/MouseHost.h +++ b/Demos/Host/LowLevel/MouseHost/MouseHost.h @@ -1,21 +1,21 @@ /* LUFA Library - Copyright (C) Dean Camera, 2010. - + Copyright (C) Dean Camera, 2011. + dean [at] fourwalledcubicle [dot] com - www.fourwalledcubicle.com + www.lufa-lib.org */ /* - Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com) - Permission to use, copy, modify, distribute, and sell this + Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted - without fee, provided that the above copyright notice appear in + without fee, provided that the above copyright notice appear in all copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the software without specific, written prior permission. The author disclaim all warranties with regard to this @@ -47,18 +47,12 @@ #include #include #include - #include + #include #include - + #include "ConfigDescriptor.h" - - /* Macros: */ - /** Pipe number for the mouse data IN pipe. */ - #define MOUSE_DATAPIPE 1 - - /** HID Class Specific request to set the report protocol mode. */ - #define REQ_SetProtocol 0x0B + /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ #define LEDMASK_USB_NOTREADY LEDS_LED1 @@ -71,25 +65,18 @@ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3) - /* Type Defines: */ - /** Type define for a standard Boot Protocol Mouse report. */ - typedef struct - { - uint8_t Button; /**< Button mask for currently pressed buttons in the mouse */ - int8_t X; /**< Current delta X movement of the mouse */ - int8_t Y; /**< Current delta Y movement on the mouse */ - } USB_MouseReport_Data_t; - /* Function Prototypes: */ void Mouse_HID_Task(void); void SetupHardware(void); - + void EVENT_USB_Host_HostError(const uint8_t ErrorCode); void EVENT_USB_Host_DeviceAttached(void); void EVENT_USB_Host_DeviceUnattached(void); - void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); + void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, + const uint8_t SubErrorCode); void EVENT_USB_Host_DeviceEnumerationComplete(void); void ReadNextReport(void); - + #endif +