]> git.gir.st - tmk_keyboard.git/blob - protocol/lufa/LUFA-git/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h
Squashed 'tmk_core/' changes from d5c5ac6..8da1898
[tmk_keyboard.git] / protocol / lufa / LUFA-git / Demos / Device / ClassDriver / MassStorageKeyboard / MassStorageKeyboard.h
1 /*
2 LUFA Library
3 Copyright (C) Dean Camera, 2014.
4
5 dean [at] fourwalledcubicle [dot] com
6 www.lufa-lib.org
7 */
8
9 /*
10 Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com)
11 Copyright 2010 Matthias Hullin (lufa [at] matthias [dot] hullin [dot] net)
12
13 Permission to use, copy, modify, distribute, and sell this
14 software and its documentation for any purpose is hereby granted
15 without fee, provided that the above copyright notice appear in
16 all copies and that both that the copyright notice and this
17 permission notice and warranty disclaimer appear in supporting
18 documentation, and that the name of the author not be used in
19 advertising or publicity pertaining to distribution of the
20 software without specific, written prior permission.
21
22 The author disclaims all warranties with regard to this
23 software, including all implied warranties of merchantability
24 and fitness. In no event shall the author be liable for any
25 special, indirect or consequential damages or any damages
26 whatsoever resulting from loss of use, data or profits, whether
27 in an action of contract, negligence or other tortious action,
28 arising out of or in connection with the use or performance of
29 this software.
30 */
31
32 /** \file
33 *
34 * Header file for MassStorageKeyboard.c.
35 */
36
37 #ifndef _MASS_STORAGE_KEYBOARD_H_
38 #define _MASS_STORAGE_KEYBOARD_H_
39
40 /* Includes: */
41 #include <avr/io.h>
42 #include <avr/wdt.h>
43 #include <avr/power.h>
44 #include <avr/interrupt.h>
45 #include <avr/interrupt.h>
46 #include <stdbool.h>
47 #include <string.h>
48
49 #include "Descriptors.h"
50
51 #include "Lib/SCSI.h"
52 #include "Lib/DataflashManager.h"
53 #include "Config/AppConfig.h"
54
55 #include <LUFA/Drivers/Board/Joystick.h>
56 #include <LUFA/Drivers/Board/LEDs.h>
57 #include <LUFA/Drivers/Board/Buttons.h>
58 #include <LUFA/Drivers/USB/USB.h>
59 #include <LUFA/Platform/Platform.h>
60
61 /* Macros: */
62 /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
63 #define LEDMASK_USB_NOTREADY LEDS_LED1
64
65 /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
66 #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
67
68 /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
69 #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
70
71 /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
72 #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
73
74 /** LED mask for the library LED driver, to indicate that the USB interface is busy. */
75 #define LEDMASK_USB_BUSY LEDS_LED2
76
77 /* Function Prototypes: */
78 void SetupHardware(void);
79
80 void EVENT_USB_Device_Connect(void);
81 void EVENT_USB_Device_Disconnect(void);
82 void EVENT_USB_Device_ConfigurationChanged(void);
83 void EVENT_USB_Device_ControlRequest(void);
84 void EVENT_USB_Device_StartOfFrame(void);
85
86 bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
87
88 bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
89 uint8_t* const ReportID,
90 const uint8_t ReportType,
91 void* ReportData,
92 uint16_t* const ReportSize);
93 void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
94 const uint8_t ReportID,
95 const uint8_t ReportType,
96 const void* ReportData,
97 const uint16_t ReportSize);
98
99 #endif
100
Imprint / Impressum