Skip to content
This repository
Browse code

tabs to spaces

  • Loading branch information...
commit 288f74be1b175f92dabba630d9a97f7eab10e66d 1 parent 76044f5
humblehacker authored

Showing 1 changed file with 29 additions and 30 deletions. Show diff stats Hide diff stats

  1. +29 30 firmware/src/Keyboard.c
59 firmware/src/Keyboard.c
@@ -62,18 +62,18 @@ uint8_t PrevKeyboardHIDReportBuffer[sizeof(USB_KeyboardReport_Data_t)];
62 62 * within a device can be differentiated from one another.
63 63 */
64 64 USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
65   - {
66   - .Config =
67   - {
68   - .InterfaceNumber = 0,
69   -
70   - .ReportINEndpointNumber = KEYBOARD_EPNUM,
71   - .ReportINEndpointSize = KEYBOARD_EPSIZE,
72   - .ReportINEndpointDoubleBank = false,
73   -
74   - .PrevReportINBuffer = PrevKeyboardHIDReportBuffer,
75   - .PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer),
76   - },
  65 + {
  66 + .Config =
  67 + {
  68 + .InterfaceNumber = 0,
  69 +
  70 + .ReportINEndpointNumber = KEYBOARD_EPNUM,
  71 + .ReportINEndpointSize = KEYBOARD_EPSIZE,
  72 + .ReportINEndpointDoubleBank = false,
  73 +
  74 + .PrevReportINBuffer = PrevKeyboardHIDReportBuffer,
  75 + .PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer),
  76 + },
77 77 };
78 78
79 79 uint8_t g_num_lock, g_caps_lock, g_scrl_lock;
@@ -86,14 +86,13 @@ uint8_t g_num_lock, g_caps_lock, g_scrl_lock;
86 86 */
87 87 int main(void)
88 88 {
89   - SetupHardware();
  89 + SetupHardware();
90 90
91 91 LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
92   - sei();
  92 + sei();
93 93
94   - for (;;)
95   - {
96   - HID_Device_USBTask(&Keyboard_HID_Interface);
  94 + for (;;)
  95 + {
97 96 if (USB_DeviceState != DEVICE_STATE_Suspended)
98 97 {
99 98 #ifdef MATRIX_DISCOVERY_MODE
@@ -113,16 +112,16 @@ int main(void)
113 112 /** Configures the board hardware and chip peripherals for the demo's functionality. */
114 113 void SetupHardware()
115 114 {
116   - /* Disable clock division */
117   - clock_prescale_set(clock_div_2);
  115 + /* Disable clock division */
  116 + clock_prescale_set(clock_div_2);
118 117
119   - /* Disable watchdog if enabled by bootloader/fuses */
120   - MCUSR &= ~(1 << WDRF);
121   - wdt_disable();
  118 + /* Disable watchdog if enabled by bootloader/fuses */
  119 + MCUSR &= ~(1 << WDRF);
  120 + wdt_disable();
122 121
123   - /* Hardware Initialization */
124   - LEDs_Init();
125   - USB_Init();
  122 + /* Hardware Initialization */
  123 + LEDs_Init();
  124 + USB_Init();
126 125 USB_PLL_On();
127 126 while (!USB_PLL_IsReady());
128 127
@@ -165,22 +164,22 @@ void EVENT_USB_Device_ConfigurationChanged(void)
165 164 {
166 165 LEDs_SetAllLEDs(LEDMASK_USB_READY);
167 166
168   - if (!(HID_Device_ConfigureEndpoints(&Keyboard_HID_Interface)))
169   - LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
  167 + if (!(HID_Device_ConfigureEndpoints(&Keyboard_HID_Interface)))
  168 + LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
170 169
171   - USB_Device_EnableSOFEvents();
  170 + USB_Device_EnableSOFEvents();
172 171 }
173 172
174 173 /** Event handler for the library USB Unhandled Control Request event. */
175 174 void EVENT_USB_Device_UnhandledControlRequest(void)
176 175 {
177   - HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
  176 + HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
178 177 }
179 178
180 179 /** Event handler for the USB device Start Of Frame event. */
181 180 void EVENT_USB_Device_StartOfFrame(void)
182 181 {
183   - HID_Device_MillisecondElapsed(&Keyboard_HID_Interface);
  182 + HID_Device_MillisecondElapsed(&Keyboard_HID_Interface);
184 183 }
185 184
186 185 /** HID class driver callback function for the creation of HID reports to the host.

0 comments on commit 288f74b

Please sign in to comment.
Something went wrong with that request. Please try again.