X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/6bda628718f67c04ed43e8328f55bdce5319c504..9da01ee78b59bcaed0d73e3f77d2f284885bfc76:/Demos/Device/LowLevel/Joystick/Joystick.h?ds=sidebyside diff --git a/Demos/Device/LowLevel/Joystick/Joystick.h b/Demos/Device/LowLevel/Joystick/Joystick.h index 607f56ec9..7a7cf6111 100644 --- a/Demos/Device/LowLevel/Joystick/Joystick.h +++ b/Demos/Device/LowLevel/Joystick/Joystick.h @@ -1,21 +1,21 @@ /* LUFA Library - Copyright (C) Dean Camera, 2010. - + Copyright (C) Dean Camera, 2012. + dean [at] fourwalledcubicle [dot] com - www.fourwalledcubicle.com + www.lufa-lib.org */ /* - Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2012 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 @@ -32,7 +32,7 @@ * * Header file for Joystick.c. */ - + #ifndef _JOYSTICK_H_ #define _JOYSTICK_H_ @@ -45,16 +45,12 @@ #include "Descriptors.h" - #include #include #include #include #include /* Macros: */ - /** HID Class specific request to get the next HID report from the device. */ - #define REQ_GetReport 0x01 - /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ #define LEDMASK_USB_NOTREADY LEDS_LED1 @@ -66,7 +62,7 @@ /** 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 the joystick HID report structure, for creating and sending HID reports to the host PC. * This mirrors the layout described to the host in the HID report descriptor, in Descriptors.c. @@ -75,6 +71,7 @@ { int8_t X; /**< Current absolute joystick X position, as a signed 8-bit integer */ int8_t Y; /**< Current absolute joystick Y position, as a signed 8-bit integer */ + int8_t Z; /**< Current absolute joystick Z position, as a signed 8-bit integer */ uint8_t Button; /**< Bit mask of the currently pressed joystick buttons */ } USB_JoystickReport_Data_t; @@ -85,8 +82,9 @@ void EVENT_USB_Device_Connect(void); void EVENT_USB_Device_Disconnect(void); void EVENT_USB_Device_ConfigurationChanged(void); - void EVENT_USB_Device_UnhandledControlRequest(void); + void EVENT_USB_Device_ControlRequest(void); bool GetNextReport(USB_JoystickReport_Data_t* const ReportData); #endif +