X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/84d77833503151acffbdda6217fa8ce59c6b4b8a..d11ed10c5314c44dc01c06954d1d73d4894cbff8:/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h index f5e1f740e..8f4194816 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h @@ -1,21 +1,21 @@ /* LUFA Library - Copyright (C) Dean Camera, 2009. + Copyright (C) Dean Camera, 2010. dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ /* - Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) - Permission to use, copy, modify, and distribute this software - and its documentation for any purpose and without fee is hereby - granted, 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 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 + 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 software without specific, written prior permission. The author disclaim all warranties with regard to this @@ -28,6 +28,11 @@ this software. */ +/** \file + * + * Header file for KeyboardHostWithParser.c. + */ + #ifndef _KEYBOARD_HOST_H_ #define _KEYBOARD_HOST_H_ @@ -41,16 +46,11 @@ #include #include #include - #include + #include #include - #include + #include - #include "HIDReport.h" - /* Macros: */ - /** Pipe number for the keyboard report data pipe */ - #define KEYBOARD_DATAPIPE 1 - /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ #define LEDMASK_USB_NOTREADY LEDS_LED1 @@ -63,16 +63,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) + /** HID Report Descriptor Usage Page value for a desktop keyboard */ + #define USAGE_PAGE_KEYBOARD 0x07 + /* Function Prototypes: */ - void Keyboard_HID_Task(void); void SetupHardware(void); - - void EVENT_USB_HostError(const uint8_t ErrorCode); - void EVENT_USB_DeviceAttached(void); - void EVENT_USB_DeviceUnattached(void); - void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); - void EVENT_USB_DeviceEnumerationComplete(void); - - void ProcessKeyboardReport(uint8_t* KeyboardReport); + + 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_DeviceEnumerationComplete(void); + + bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* CurrentItem); #endif