Revision 2bdaeeb5

View differences:

Keyboard.c
36 36
 */
37 37

  
38 38
#include "Keyboard.h"
39
#include "MatrixScan.h"
40 39

  
41 40
/** Indicates what report mode the host has requested, true for normal HID reporting mode, false for special boot
42 41
 *  protocol reporting mode.
......
61 60
{
62 61
	SetupHardware();
63 62

  
64
	//LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
65 63
	sei();
66 64

  
67 65
	for (;;)
......
82 80
	clock_prescale_set(clock_div_1);
83 81

  
84 82
	/* Hardware Initialization */
85
	//LEDs_Init();
86 83
	USB_Init();
87 84
	setupMatrix();
88 85
}
......
92 89
 */
93 90
void EVENT_USB_Device_Connect(void)
94 91
{
95
	/* Indicate USB enumerating */
96
	//LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
97

  
98 92
	/* Default to report protocol on connect */
99 93
	UsingReportProtocol = true;
100 94
}
......
104 98
 */
105 99
void EVENT_USB_Device_Disconnect(void)
106 100
{
107
	/* Indicate USB not ready */
108
	//LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
101
	return;
109 102
}
110 103

  
111 104
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration
......
123 116

  
124 117
	/* Turn on Start-of-Frame events for tracking HID report period expiry */
125 118
	USB_Device_EnableSOFEvents();
126

  
127
	/* Indicate endpoint configuration success or failure */
128
	//LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
129 119
}
130 120

  
131 121
/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
......
165 155
					  return;
166 156
				}
167 157

  
168
				/* Read in the LED report from the host */
169
				uint8_t LEDStatus = Endpoint_Read_8();
170

  
171 158
				Endpoint_ClearOUT();
172 159
				Endpoint_ClearStatusStage();
173

  
174
				/* Process the incoming LED report */
175
				ProcessLEDReport(LEDStatus);
176 160
			}
177 161

  
178 162
			break;
......
243 227
{
244 228
	/* Clear the report contents */
245 229
	memset(ReportData, 0, sizeof(USB_KeyboardReport_Data_t));
246
	/* Make sent key uppercase by indicating that the left shift key is pressed */
247
	//ReportData->Modifier = HID_KEYBOARD_MODIFER_LEFTSHIFT;
248 230
	setReportData(ReportData);
249 231
}
250 232

  
......
254 236
 */
255 237
void ProcessLEDReport(const uint8_t LEDReport)
256 238
{
239
	// TODO use this to poll the bigramm stats later
257 240
	return;
258 241
}
259 242

  
Keyboard.h
46 46
		#include <string.h>
47 47

  
48 48
		#include "Descriptors.h"
49
		#include "MatrixScan.h"
49 50

  
50 51
		#include <LUFA/Version.h>
51 52
		#include <LUFA/Drivers/USB/USB.h>
52 53
		#include <LUFA/Drivers/Board/LEDs.h>
53 54

  
54
	/* Macros: */
55
		/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
56
		#define LEDMASK_USB_NOTREADY        LEDS_LED1
57

  
58
		/** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
59
		#define LEDMASK_USB_ENUMERATING     (LEDS_LED2 | LEDS_LED3)
60

  
61
		/** LED mask for the library LED driver, to indicate that the USB interface is ready. */
62
		#define LEDMASK_USB_READY           (LEDS_LED2 | LEDS_LED4)
63

  
64
		/** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
65
		#define LEDMASK_USB_ERROR           (LEDS_LED1 | LEDS_LED3)
66

  
67 55
	/* Function Prototypes: */
68 56
		void SetupHardware(void);
69 57
		void HID_Task(void);

Also available in: Unified diff