Skip to content

Commit 0fe8175

Browse files
committed
Trailing whitespace
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
1 parent 9c793e8 commit 0fe8175

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

src/Keyboard.cpp

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -35,32 +35,32 @@ static const uint8_t _hidReportDescriptor[] PROGMEM = {
3535
0xa1, 0x01, // COLLECTION (Application)
3636
0x85, 0x02, // REPORT_ID (2)
3737
0x05, 0x07, // USAGE_PAGE (Keyboard)
38-
38+
3939
0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)
4040
0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)
4141
0x15, 0x00, // LOGICAL_MINIMUM (0)
4242
0x25, 0x01, // LOGICAL_MAXIMUM (1)
4343
0x75, 0x01, // REPORT_SIZE (1)
44-
44+
4545
0x95, 0x08, // REPORT_COUNT (8)
4646
0x81, 0x02, // INPUT (Data,Var,Abs)
4747
0x95, 0x01, // REPORT_COUNT (1)
4848
0x75, 0x08, // REPORT_SIZE (8)
4949
0x81, 0x03, // INPUT (Cnst,Var,Abs)
50-
50+
5151
0x95, 0x06, // REPORT_COUNT (6)
5252
0x75, 0x08, // REPORT_SIZE (8)
5353
0x15, 0x00, // LOGICAL_MINIMUM (0)
5454
0x25, 0x73, // LOGICAL_MAXIMUM (115)
5555
0x05, 0x07, // USAGE_PAGE (Keyboard)
56-
56+
5757
0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated))
5858
0x29, 0x73, // USAGE_MAXIMUM (Keyboard Application)
5959
0x81, 0x00, // INPUT (Data,Ary,Abs)
6060
0xc0, // END_COLLECTION
6161
};
6262

63-
Keyboard_::Keyboard_(void)
63+
Keyboard_::Keyboard_(void)
6464
{
6565
static HIDSubDescriptor node(_hidReportDescriptor, sizeof(_hidReportDescriptor));
6666
HID().AppendDescriptor(&node);
@@ -91,16 +91,16 @@ const uint8_t _asciimap[128] =
9191
0x00, // ETX
9292
0x00, // EOT
9393
0x00, // ENQ
94-
0x00, // ACK
94+
0x00, // ACK
9595
0x00, // BEL
9696
0x2a, // BS Backspace
9797
0x2b, // TAB Tab
9898
0x28, // LF Enter
99-
0x00, // VT
100-
0x00, // FF
101-
0x00, // CR
102-
0x00, // SO
103-
0x00, // SI
99+
0x00, // VT
100+
0x00, // FF
101+
0x00, // CR
102+
0x00, // SO
103+
0x00, // SI
104104
0x00, // DEL
105105
0x00, // DC1
106106
0x00, // DC2
@@ -110,13 +110,13 @@ const uint8_t _asciimap[128] =
110110
0x00, // SYN
111111
0x00, // ETB
112112
0x00, // CAN
113-
0x00, // EM
113+
0x00, // EM
114114
0x00, // SUB
115115
0x00, // ESC
116-
0x00, // FS
117-
0x00, // GS
118-
0x00, // RS
119-
0x00, // US
116+
0x00, // FS
117+
0x00, // GS
118+
0x00, // RS
119+
0x00, // US
120120

121121
0x2c, // ' '
122122
0x1e|SHIFT, // !
@@ -220,10 +220,10 @@ const uint8_t _asciimap[128] =
220220
uint8_t USBPutChar(uint8_t c);
221221

222222
// press() adds the specified key (printing, non-printing, or modifier)
223-
// to the persistent key report and sends the report. Because of the way
224-
// USB HID works, the host acts like the key remains pressed until we
223+
// to the persistent key report and sends the report. Because of the way
224+
// USB HID works, the host acts like the key remains pressed until we
225225
// call release(), releaseAll(), or otherwise clear the report and resend.
226-
size_t Keyboard_::press(uint8_t k)
226+
size_t Keyboard_::press(uint8_t k)
227227
{
228228
uint8_t i;
229229
if (k >= 136) { // it's a non-printing key (not a modifier)
@@ -245,10 +245,10 @@ size_t Keyboard_::press(uint8_t k)
245245

246246
// Add k to the key report only if it's not already present
247247
// and if there is an empty slot.
248-
if (_keyReport.keys[0] != k && _keyReport.keys[1] != k &&
248+
if (_keyReport.keys[0] != k && _keyReport.keys[1] != k &&
249249
_keyReport.keys[2] != k && _keyReport.keys[3] != k &&
250250
_keyReport.keys[4] != k && _keyReport.keys[5] != k) {
251-
251+
252252
for (i=0; i<6; i++) {
253253
if (_keyReport.keys[i] == 0x00) {
254254
_keyReport.keys[i] = k;
@@ -258,7 +258,7 @@ size_t Keyboard_::press(uint8_t k)
258258
if (i == 6) {
259259
setWriteError();
260260
return 0;
261-
}
261+
}
262262
}
263263
sendReport(&_keyReport);
264264
return 1;
@@ -267,7 +267,7 @@ size_t Keyboard_::press(uint8_t k)
267267
// release() takes the specified key out of the persistent key report and
268268
// sends the report. This tells the OS the key is no longer pressed and that
269269
// it shouldn't be repeated any more.
270-
size_t Keyboard_::release(uint8_t k)
270+
size_t Keyboard_::release(uint8_t k)
271271
{
272272
uint8_t i;
273273
if (k >= 136) { // it's a non-printing key (not a modifier)
@@ -301,11 +301,11 @@ size_t Keyboard_::release(uint8_t k)
301301
void Keyboard_::releaseAll(void)
302302
{
303303
_keyReport.keys[0] = 0;
304-
_keyReport.keys[1] = 0;
304+
_keyReport.keys[1] = 0;
305305
_keyReport.keys[2] = 0;
306-
_keyReport.keys[3] = 0;
306+
_keyReport.keys[3] = 0;
307307
_keyReport.keys[4] = 0;
308-
_keyReport.keys[5] = 0;
308+
_keyReport.keys[5] = 0;
309309
_keyReport.modifiers = 0;
310310
sendReport(&_keyReport);
311311
}

0 commit comments

Comments
 (0)