From 5dd1ed8719e6e391e1cfd1bb3e6563d67d646ee2 Mon Sep 17 00:00:00 2001 From: Denis Arnst Date: Mon, 18 Mar 2024 19:16:53 +0100 Subject: [PATCH] Format: newlines --- .clang-format | 1 + src/dev.c | 2 +- src/dev.h | 2 +- src/device.c | 2 +- src/devices/headsetcontrol_test.c | 2 +- src/devices/headsetcontrol_test.h | 2 +- src/devices/hyperx_calphaw.c | 2 +- src/devices/logitech_gpro_x2.c | 2 +- src/devices/steelseries_arctis_nova_3.c | 2 +- src/hid_utility.c | 2 +- src/hid_utility.h | 2 +- src/output.c | 4 ++-- src/utility.c | 2 +- 13 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.clang-format b/.clang-format index c98115a..a40c619 100644 --- a/.clang-format +++ b/.clang-format @@ -3,4 +3,5 @@ Language: Cpp BasedOnStyle: WebKit AlignConsecutiveMacros: true AlignConsecutiveAssignments: true +InsertNewlineAtEOF: true ... diff --git a/src/dev.c b/src/dev.c index c61fa09..b3c8348 100644 --- a/src/dev.c +++ b/src/dev.c @@ -429,4 +429,4 @@ int dev_main(int argc, char* argv[]) free(sendbuffer); return 0; -} \ No newline at end of file +} diff --git a/src/dev.h b/src/dev.h index 74c2f24..b7db835 100644 --- a/src/dev.h +++ b/src/dev.h @@ -1,3 +1,3 @@ #pragma once -int dev_main(int argc, char* argv[]); \ No newline at end of file +int dev_main(int argc, char* argv[]); diff --git a/src/device.c b/src/device.c index 771964e..b920a1a 100644 --- a/src/device.c +++ b/src/device.c @@ -46,4 +46,4 @@ const char capabilities_str_short[NUM_CAPABILITIES] [CAP_EQUALIZER] = 'e', [CAP_MICROPHONE_MUTE_LED_BRIGHTNESS] = 't', [CAP_MICROPHONE_VOLUME] = 'o' - }; \ No newline at end of file + }; diff --git a/src/devices/headsetcontrol_test.c b/src/devices/headsetcontrol_test.c index 4a56ecb..8e7862f 100644 --- a/src/devices/headsetcontrol_test.c +++ b/src/devices/headsetcontrol_test.c @@ -159,4 +159,4 @@ static int headsetcontrol_test_request_chatmix(hid_device* device_handle) static int headsetcontrol_test_set_inactive_time(hid_device* device_handle, uint8_t minutes) { return TESTBYTES_SEND; -} \ No newline at end of file +} diff --git a/src/devices/headsetcontrol_test.h b/src/devices/headsetcontrol_test.h index 17fb693..d589156 100644 --- a/src/devices/headsetcontrol_test.h +++ b/src/devices/headsetcontrol_test.h @@ -1,3 +1,3 @@ #pragma once -void headsetcontrol_test_init(struct device** device); \ No newline at end of file +void headsetcontrol_test_init(struct device** device); diff --git a/src/devices/hyperx_calphaw.c b/src/devices/hyperx_calphaw.c index 7775369..d5e7829 100644 --- a/src/devices/hyperx_calphaw.c +++ b/src/devices/hyperx_calphaw.c @@ -109,7 +109,7 @@ static BatteryInfo calphaw_request_battery(hid_device* device_handle) if (calphaw_request_charge(device_handle) == 1) { info.status = BATTERY_CHARGING; - info.level = -1; + info.level = -1; return info; } diff --git a/src/devices/logitech_gpro_x2.c b/src/devices/logitech_gpro_x2.c index e840bca..c1da2e7 100644 --- a/src/devices/logitech_gpro_x2.c +++ b/src/devices/logitech_gpro_x2.c @@ -51,4 +51,4 @@ static int gpro_x2_send_inactive_time(hid_device* device_handle, uint8_t num) uint8_t inactive_time_data[11] = { 0x51, 0x09, 0x00, 0x03, 0x1c, 0x00, 0x04, 0x00, 0x06, 0x1d, num }; return hid_write(device_handle, inactive_time_data, sizeof(inactive_time_data) / sizeof(inactive_time_data[0])); -} \ No newline at end of file +} diff --git a/src/devices/steelseries_arctis_nova_3.c b/src/devices/steelseries_arctis_nova_3.c index ec28037..628dd6c 100644 --- a/src/devices/steelseries_arctis_nova_3.c +++ b/src/devices/steelseries_arctis_nova_3.c @@ -168,4 +168,4 @@ static int arctis_nova_3_send_microphone_volume(hid_device* device_handle, uint8 hid_send_feature_report(device_handle, volume, MSG_SIZE); return hid_send_feature_report(device_handle, SAVE_DATA, MSG_SIZE); -} \ No newline at end of file +} diff --git a/src/hid_utility.c b/src/hid_utility.c index 275dcfa..d6c74a3 100644 --- a/src/hid_utility.c +++ b/src/hid_utility.c @@ -115,4 +115,4 @@ void terminate_hid(hid_device** handle, char** path) } hid_exit(); -} \ No newline at end of file +} diff --git a/src/hid_utility.h b/src/hid_utility.h index 989aa41..a5575df 100644 --- a/src/hid_utility.h +++ b/src/hid_utility.h @@ -29,4 +29,4 @@ char* get_hid_path(uint16_t vid, uint16_t pid, int iid, uint16_t usagepageid, ui * Helper freeing HID data and terminating HID usage. */ /* This function is explicitly called terminate_hid to avoid HIDAPI clashes. */ -void terminate_hid(hid_device** handle, char** path); \ No newline at end of file +void terminate_hid(hid_device** handle, char** path); diff --git a/src/output.c b/src/output.c index cdf9012..f2fc031 100644 --- a/src/output.c +++ b/src/output.c @@ -158,8 +158,8 @@ void initializeHeadsetInfo(HeadsetInfo* info, struct device* device) for (int i = 0; i < NUM_CAPABILITIES; i++) { if (device->capabilities & B(i)) { // Check if the ith capability is supported info->capabilities_enum[info->capabilities_amount] = i; - info->capabilities[info->capabilities_amount] = capabilities_str_enum[i]; - info->capabilities_str[info->capabilities_amount] = capabilities_str[i]; + info->capabilities[info->capabilities_amount] = capabilities_str_enum[i]; + info->capabilities_str[info->capabilities_amount] = capabilities_str[i]; info->capabilities_amount++; } } diff --git a/src/utility.c b/src/utility.c index a71eac3..45ae1d5 100644 --- a/src/utility.c +++ b/src/utility.c @@ -211,4 +211,4 @@ int asprintf(char** str, const char* fmt, ...) return ret; } -// ----------------- -------------------- ----------------- \ No newline at end of file +// ----------------- -------------------- -----------------