Skip to content

Commit 2132af0

Browse files
authored
Merge pull request #201 from cornfeedhobo/nit-pick-tidy
Some nit pick cleaning I stumble on
2 parents 65d46c5 + 4aa3b9b commit 2132af0

File tree

11 files changed

+37
-30
lines changed

11 files changed

+37
-30
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[*]
2+
indent_style = space
3+
indent_size = 4
4+
end_of_line = lf
5+
charset = utf-8
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true

src/defaults.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ const config_t default_config = {
5151
.hotkey_toggle = HID_KEY_F24,
5252
.kbd_led_as_indicator = KBD_LED_AS_INDICATOR,
5353
.jump_treshold = 0,
54-
};
54+
};

src/handlers.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include "main.h"
1919

20-
/**=================================================== *
20+
/* =================================================== *
2121
* ============ Hotkey Handler Routines ============ *
2222
* =================================================== */
2323

@@ -150,7 +150,7 @@ void config_enable_hotkey_handler(device_t *state, hid_keyboard_report_t *report
150150
};
151151

152152

153-
/**==================================================== *
153+
/* ==================================================== *
154154
* ========== UART Message Handling Routines ======== *
155155
* ==================================================== */
156156

@@ -363,7 +363,7 @@ void handle_heartbeat_msg(uart_packet_t *packet, device_t *state) {
363363
}
364364

365365

366-
/**==================================================== *
366+
/* ==================================================== *
367367
* ============== Output Switch Routines ============ *
368368
* ==================================================== */
369369

src/hid_parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void handle_main_item(parser_state_t *parser, item_t *item, hid_interface_t *ifa
148148
/* This method is sub-optimal and far from a generalized HID descriptor parsing, but should
149149
* hopefully work well enough to find the basic values we care about to move the mouse around.
150150
* Your descriptor for a mouse with 2 wheels and 264 buttons might not parse correctly.
151-
**/
151+
* */
152152
parser_state_t parser_state = {0}; // Avoid placing it on the stack, it's large
153153

154154
void parse_report_descriptor(hid_interface_t *iface,

src/include/user_config.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
/**================================================== *
4242
* ============== Mouse Speed Factor ============== *
43-
* ==================================================
43+
* ================================================== *
4444
*
4545
* This affects how fast the mouse moves.
4646
*
@@ -104,15 +104,15 @@
104104
* but will only activate on an output that is not currently
105105
* active.
106106
*
107-
**/
107+
* */
108108

109109
/**================================================== *
110110
*
111111
* SCREENSAVER_{A|B}_MODE: DISABLED
112112
* PONG
113113
* JITTER
114114
*
115-
**/
115+
* */
116116

117117
#define SCREENSAVER_A_MODE DISABLED
118118
#define SCREENSAVER_B_MODE DISABLED
@@ -122,7 +122,7 @@
122122
* SCREENSAVER_{A|B}_IDLE_TIME_SEC: Number of seconds that an output
123123
* must be inactive before the screensaver mode will be activated.
124124
*
125-
**/
125+
* */
126126

127127
#define SCREENSAVER_A_IDLE_TIME_SEC 240
128128
#define SCREENSAVER_B_IDLE_TIME_SEC 240
@@ -132,7 +132,7 @@
132132
* SCREENSAVER_{A|B}_MAX_TIME_SEC: Number of seconds that the screensaver
133133
* will run on an output before being deactivated. 0 for indefinitely.
134134
*
135-
**/
135+
* */
136136

137137
#define SCREENSAVER_A_MAX_TIME_SEC 0
138138
#define SCREENSAVER_B_MAX_TIME_SEC 0
@@ -142,14 +142,14 @@
142142
* SCREENSAVER_{A|B}_ONLY_IF_INACTIVE: [0 or 1] 1 means the
143143
* screensaver will activate only if the output is inactive.
144144
*
145-
**/
145+
* */
146146

147147
#define SCREENSAVER_A_ONLY_IF_INACTIVE 0
148148
#define SCREENSAVER_B_ONLY_IF_INACTIVE 0
149149

150150
/**================================================== *
151151
* ================ Output OS Config =============== *
152-
* ==================================================
152+
* ================================================== *
153153
*
154154
* Defines OS an output connects to. You will need to worry about this only if you have
155155
* multiple desktops and one of your outputs is MacOS or Windows.
@@ -167,7 +167,7 @@
167167

168168
/**================================================== *
169169
* ================= Enforce Ports ================= *
170-
* ==================================================
170+
* ================================================== *
171171
*
172172
* If enabled, fixes some device incompatibilities by
173173
* enforcing keyboard has to be in port A and mouse in port B.
@@ -182,7 +182,7 @@
182182

183183
/**================================================== *
184184
* ============= Enforce Boot Protocol ============= *
185-
* ==================================================
185+
* ================================================== *
186186
*
187187
* If enabled, fixes some device incompatibilities by
188188
* enforcing the boot protocol (which is simpler to parse

src/led.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include "main.h"
1919

20-
/**==================================================== *
20+
/* ==================================================== *
2121
* ========== Update pico and keyboard LEDs ========== *
2222
* ==================================================== */
2323

@@ -88,4 +88,4 @@ void led_blinking_task(device_t *state) {
8888
/* Restore LEDs in the last pass */
8989
if (state->blinks_left == 0)
9090
restore_leds(state);
91-
}
91+
}

src/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18-
/**================================================== *
18+
/* ================================================== *
1919
* ============= Initial Board Setup ============== *
2020
* ================================================== */
2121

src/tasks.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void task_scheduler(device_t *state, task_t *task) {
2727
task->exec(state);
2828
}
2929

30-
/**================================================== *
30+
/* ================================================== *
3131
* ============== Watchdog Functions ============== *
3232
* ================================================== */
3333

@@ -46,7 +46,7 @@ void kick_watchdog_task(device_t *state) {
4646
watchdog_update();
4747
}
4848

49-
/**================================================== *
49+
/* ================================================== *
5050
* =============== USB Device / Host ============== *
5151
* ================================================== */
5252

@@ -193,7 +193,7 @@ void process_hid_queue_task(device_t *state) {
193193

194194
/* ... then we can remove it from the queue. Race conditions shouldn't happen [tm] */
195195
if (succeeded)
196-
queue_try_remove(&state->hid_queue_out, &packet);
196+
queue_try_remove(&state->hid_queue_out, &packet);
197197
}
198198

199199
/* Task that handles copying firmware from the other device to ours */

src/uart.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include "main.h"
1919

20-
/**================================================== *
20+
/* ================================================== *
2121
* =============== Sending Packets ================ *
2222
* ================================================== */
2323

@@ -60,7 +60,7 @@ void process_uart_tx_task(device_t *state) {
6060
dma_channel_transfer_from_buffer_now(state->dma_tx_channel, uart_txbuf, RAW_PACKET_LENGTH);
6161
}
6262

63-
/**================================================== *
63+
/* ================================================== *
6464
* =============== Parsing Packets ================ *
6565
* ================================================== */
6666

src/usb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include "main.h"
1919

20-
/**================================================== *
20+
/* ================================================== *
2121
* =========== TinyUSB Device Callbacks =========== *
2222
* ================================================== */
2323

@@ -99,7 +99,7 @@ void tud_umount_cb(void) {
9999
global_state.tud_connected = false;
100100
}
101101

102-
/**================================================== *
102+
/* ================================================== *
103103
* =============== USB HOST Section =============== *
104104
* ================================================== */
105105

0 commit comments

Comments
 (0)