diff --git a/KeyboardLayoutManager/KeyboardLayoutManager.cpp b/KeyboardLayoutManager/KeyboardLayoutManager.cpp index 068eea52..38a12276 100644 --- a/KeyboardLayoutManager/KeyboardLayoutManager.cpp +++ b/KeyboardLayoutManager/KeyboardLayoutManager.cpp @@ -1,11 +1,13 @@ -/*---------------------------------------------------------------------*\ -| KeyboardLayoutManager.cpp | -| | -| Helper library to produce keyboard layouts | -| | -| Chris M (Dr_No) 04 Feb 2023 | -| | -\*---------------------------------------------------------------------*/ +/*---------------------------------------------------------*\ +| KeyboardLayoutManager.cpp | +| | +| Helper library to produce keyboard layouts | +| | +| Chris M (Dr_No) 04 Feb 2023 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include "LogManager.h" #include "KeyboardLayoutManager.h" diff --git a/KeyboardLayoutManager/KeyboardLayoutManager.h b/KeyboardLayoutManager/KeyboardLayoutManager.h index 629bcf4d..30c24718 100644 --- a/KeyboardLayoutManager/KeyboardLayoutManager.h +++ b/KeyboardLayoutManager/KeyboardLayoutManager.h @@ -1,11 +1,14 @@ -/*---------------------------------------------------------------------*\ -| KeyboardLayoutManager.h | -| | -| Helper library to produce keyboard layouts | -| | -| Chris M (Dr_No) 04 Feb 2023 | -| | -\*---------------------------------------------------------------------*/ +/*---------------------------------------------------------*\ +| KeyboardLayoutManager.h | +| | +| Helper library to produce keyboard layouts | +| | +| Chris M (Dr_No) 04 Feb 2023 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #pragma once #include diff --git a/RGBController/RGBController.cpp b/RGBController/RGBController.cpp index 88f1bd15..fc0551f8 100644 --- a/RGBController/RGBController.cpp +++ b/RGBController/RGBController.cpp @@ -1,5 +1,17 @@ -#include "RGBController.h" +/*---------------------------------------------------------*\ +| RGBController.cpp | +| | +| OpenRGB's RGB controller hardware abstration layer, | +| provides a generic representation of an RGB device | +| | +| Adam Honse (CalcProgrammer1) 02 Jun 2019 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #include +#include "RGBController.h" using namespace std::chrono_literals; diff --git a/RGBController/RGBController.h b/RGBController/RGBController.h index ef6e9662..e2765f2c 100644 --- a/RGBController/RGBController.h +++ b/RGBController/RGBController.h @@ -1,11 +1,14 @@ -/*-----------------------------------------*\ -| RGBController.h | -| | -| Definitions and types for generic RGB | -| lighting controller interface | -| | -| Adam Honse (CalcProgrammer1) 6/2/2019 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController.h | +| | +| OpenRGB's RGB controller hardware abstration layer, | +| provides a generic representation of an RGB device | +| | +| Adam Honse (CalcProgrammer1) 02 Jun 2019 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #pragma once diff --git a/RGBController/RGBControllerKeyNames.cpp b/RGBController/RGBControllerKeyNames.cpp index 7803f6d4..f43d5ecc 100644 --- a/RGBController/RGBControllerKeyNames.cpp +++ b/RGBController/RGBControllerKeyNames.cpp @@ -1,13 +1,14 @@ -/*-------------------------------------------------------------------*\ -| RGBControllerKeyNames.cpp | -| | -| This is the canonical list of Key Names to be used in | -| keyboard and other device initialisations to avoid redundant | -| string literal declarations | -| | -| Chris M (Dr_No) 25 Jan 2022 | -| | -\*-------------------------------------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBControllerKeyNames.cpp | +| | +| List of standardized names to represent keyboard keys | +| when naming LEDs on keyboard devices | +| | +| Chris M (Dr_No) 25 Jan 2022 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include "RGBControllerKeyNames.h" diff --git a/RGBController/RGBControllerKeyNames.h b/RGBController/RGBControllerKeyNames.h index 7fae1023..84dee502 100644 --- a/RGBController/RGBControllerKeyNames.h +++ b/RGBController/RGBControllerKeyNames.h @@ -1,13 +1,14 @@ -/*-------------------------------------------------------------------*\ -| RGBControllerKeyNames.h | -| | -| This is the canonical list of Key Names to be used in | -| keyboard and other device initialisations to avoid redundant | -| string literal declarations | -| | -| Chris M (Dr_No) 25 Jan 2022 | -| | -\*-------------------------------------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBControllerKeyNames.h | +| | +| List of standardized names to represent keyboard keys | +| when naming LEDs on keyboard devices | +| | +| Chris M (Dr_No) 25 Jan 2022 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #pragma once diff --git a/RGBController/RGBController_Dummy.cpp b/RGBController/RGBController_Dummy.cpp index c3cbb323..1f25c620 100644 --- a/RGBController/RGBController_Dummy.cpp +++ b/RGBController/RGBController_Dummy.cpp @@ -1,10 +1,14 @@ -/*-----------------------------------------*\ -| RGBController_Dummy.cpp | -| | -| Generic RGB Interface Dummy Class | -| | -| Adam Honse (CalcProgrammer1) 2/25/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_Dummy.cpp | +| | +| Dummy RGBController that can mimic various devices for | +| development and test purposes | +| | +| Adam Honse (CalcProgrammer1) 25 Feb 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include "RGBController_Dummy.h" diff --git a/RGBController/RGBController_Dummy.h b/RGBController/RGBController_Dummy.h index 125a3262..cc766e13 100644 --- a/RGBController/RGBController_Dummy.h +++ b/RGBController/RGBController_Dummy.h @@ -1,10 +1,14 @@ -/*-----------------------------------------*\ -| RGBController_Dummy.h | -| | -| Generic RGB Interface Dummy Class | -| | -| Adam Honse (CalcProgrammer1) 2/25/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_Dummy.h | +| | +| Dummy RGBController that can mimic various devices for | +| development and test purposes | +| | +| Adam Honse (CalcProgrammer1) 25 Feb 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #pragma once diff --git a/RGBController/RGBController_Network.cpp b/RGBController/RGBController_Network.cpp index dab43ff5..8bc28809 100644 --- a/RGBController/RGBController_Network.cpp +++ b/RGBController/RGBController_Network.cpp @@ -1,10 +1,14 @@ -/*-----------------------------------------*\ -| RGBController_Network.cpp | -| | -| Generic RGB Interface Network Class | -| | -| Adam Honse (CalcProgrammer1) 4/11/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_Network.cpp | +| | +| RGBController implementation that represents a remote | +| RGBController instance from a connected OpenRGB server | +| | +| Adam Honse (CalcProgrammer1) 11 Apr 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include diff --git a/RGBController/RGBController_Network.h b/RGBController/RGBController_Network.h index 47edff2d..acb3a57f 100644 --- a/RGBController/RGBController_Network.h +++ b/RGBController/RGBController_Network.h @@ -1,10 +1,14 @@ -/*-----------------------------------------*\ -| RGBController_Network.h | -| | -| Generic RGB Interface Network Class | -| | -| Adam Honse (CalcProgrammer1) 4/11/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_Network.h | +| | +| RGBController implementation that represents a remote | +| RGBController instance from a connected OpenRGB server | +| | +| Adam Honse (CalcProgrammer1) 11 Apr 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #pragma once diff --git a/i2c_tools/i2c_tools.cpp b/i2c_tools/i2c_tools.cpp index e482a2c6..bf8e7507 100644 --- a/i2c_tools/i2c_tools.cpp +++ b/i2c_tools/i2c_tools.cpp @@ -1,3 +1,13 @@ +/*---------------------------------------------------------*\ +| i2c_tools.cpp | +| | +| Utility functions for communicating with and reverse | +| engineering i2c devices | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #include "i2c_tools.h" /******************************************************************************************\ diff --git a/i2c_tools/i2c_tools.h b/i2c_tools/i2c_tools.h index ea4bc6f4..91ea6fd5 100644 --- a/i2c_tools/i2c_tools.h +++ b/i2c_tools/i2c_tools.h @@ -1,3 +1,13 @@ +/*---------------------------------------------------------*\ +| i2c_tools.h | +| | +| Utility functions for communicating with and reverse | +| engineering i2c devices | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #include #include "i2c_smbus.h" diff --git a/interop/DeviceGuard.cpp b/interop/DeviceGuard.cpp index 4b41025b..d101e022 100644 --- a/interop/DeviceGuard.cpp +++ b/interop/DeviceGuard.cpp @@ -1,12 +1,14 @@ /*---------------------------------------------------------*\ -| DeviceGuard.cpp | +| DeviceGuard.cpp | | | -| An abstract interface for acquiring and releasing | -| a guard on a device, serving as a foundation for | -| implementing device-specific synchronization mechanisms. | +| An abstract interface for acquiring and releasing | +| a guard on a device, serving as a foundation for | +| implementing device-specific synchronization mechanisms | | | -| Evan Mulawski, 2023-09-05 | +| Evan Mulawski 09 May 2023 | | | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #include "DeviceGuard.h" diff --git a/interop/DeviceGuard.h b/interop/DeviceGuard.h index fb731dd6..d81bf9a8 100644 --- a/interop/DeviceGuard.h +++ b/interop/DeviceGuard.h @@ -1,12 +1,14 @@ /*---------------------------------------------------------*\ -| DeviceGuard.h | +| DeviceGuard.h | | | -| An abstract interface for acquiring and releasing | -| a guard on a device, serving as a foundation for | -| implementing device-specific synchronization mechanisms. | +| An abstract interface for acquiring and releasing | +| a guard on a device, serving as a foundation for | +| implementing device-specific synchronization mechanisms | | | -| Evan Mulawski, 2023-09-05 | +| Evan Mulawski 09 May 2023 | | | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #pragma once diff --git a/interop/DeviceGuardLock.cpp b/interop/DeviceGuardLock.cpp index 4efc0c6d..8045f877 100644 --- a/interop/DeviceGuardLock.cpp +++ b/interop/DeviceGuardLock.cpp @@ -1,12 +1,14 @@ /*---------------------------------------------------------*\ -| DeviceGuardLock.cpp | +| DeviceGuardLock.cpp | | | -| Represents a lock for a device guard, ensuring | -| exclusive access to a device when acquired | -| and releasing it when destroyed. | +| Represents a lock for a device guard, ensuring | +| exclusive access to a device when acquired and | +| releasing it when destroyed | | | -| Evan Mulawski, 2023-09-05 | +| Evan Mulawski 09 May 2023 | | | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #include "DeviceGuardLock.h" diff --git a/interop/DeviceGuardLock.h b/interop/DeviceGuardLock.h index c62e939e..ab616626 100644 --- a/interop/DeviceGuardLock.h +++ b/interop/DeviceGuardLock.h @@ -1,12 +1,14 @@ /*---------------------------------------------------------*\ -| DeviceGuardLock.h | +| DeviceGuardLock.h | | | -| Represents a lock for a device guard, ensuring | -| exclusive access to a device when acquired | -| and releasing it when destroyed. | +| Represents a lock for a device guard, ensuring | +| exclusive access to a device when acquired and | +| releasing it when destroyed | | | -| Evan Mulawski, 2023-09-05 | +| Evan Mulawski 09 May 2023 | | | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #pragma once diff --git a/interop/DeviceGuardManager.cpp b/interop/DeviceGuardManager.cpp index 0a594b46..a00ecf38 100644 --- a/interop/DeviceGuardManager.cpp +++ b/interop/DeviceGuardManager.cpp @@ -1,12 +1,14 @@ /*---------------------------------------------------------*\ -| DeviceGuardManager.cpp | +| DeviceGuardManager.cpp | | | -| Responsible for managing a DeviceGuard implementation, | -| allowing clients to wait for exclusive access to a | -| device using the DeviceGuardLock it provides. | +| Responsible for managing a DeviceGuard implementation, | +| allowing clients to wait for exclusive access to a | +| device using the DeviceGuardLock it provides | | | -| Evan Mulawski, 2023-09-05 | +| Evan Mulawski 09 May 2023 | | | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #include "DeviceGuardManager.h" diff --git a/interop/DeviceGuardManager.h b/interop/DeviceGuardManager.h index 520baa73..46dc9bc1 100644 --- a/interop/DeviceGuardManager.h +++ b/interop/DeviceGuardManager.h @@ -1,12 +1,14 @@ /*---------------------------------------------------------*\ -| DeviceGuardManager.h | +| DeviceGuardManager.h | | | -| Responsible for managing a DeviceGuard implementation, | -| allowing clients to wait for exclusive access to a | -| device using the DeviceGuardLock it provides. | +| Responsible for managing a DeviceGuard implementation, | +| allowing clients to wait for exclusive access to a | +| device using the DeviceGuardLock it provides | | | -| Evan Mulawski, 2023-09-05 | +| Evan Mulawski 09 May 2023 | | | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #pragma once diff --git a/net_port/net_port.cpp b/net_port/net_port.cpp index 8d0913a0..29d5d533 100644 --- a/net_port/net_port.cpp +++ b/net_port/net_port.cpp @@ -1,10 +1,14 @@ /*---------------------------------------------------------*\ -| Cross Platform Network Library for Windows and Linux | -| This library provides access to TCP and UDP ports with | -| a common API for both Windows and Linux systems. It | -| features read and write | +| net_port.cpp | | | -| Adam Honse (calcprogrammer1@gmail.com), 12/15/2016 | +| Cross Platform Network Library for Windows and Linux | +| This library provides access to TCP and UDP ports with | +| a common API for both Windows and Linux systems | +| | +| Adam Honse (calcprogrammer1@gmail.com) 15 Dec 2016 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #include "net_port.h" diff --git a/net_port/net_port.h b/net_port/net_port.h index d97f1a8b..86eea078 100644 --- a/net_port/net_port.h +++ b/net_port/net_port.h @@ -1,14 +1,17 @@ /*---------------------------------------------------------*\ -| Cross Platform Network Library for Windows and Linux | -| This library provides access to TCP and UDP ports with | -| a common API for both Windows and Linux systems. It | -| features read and write | +| net_port.h | | | -| Adam Honse (calcprogrammer1@gmail.com), 12/15/2016 | +| Cross Platform Network Library for Windows and Linux | +| This library provides access to TCP and UDP ports with | +| a common API for both Windows and Linux systems | +| | +| Adam Honse (calcprogrammer1@gmail.com) 15 Dec 2016 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ -#ifndef NET_PORT_H -#define NET_PORT_H +#pragma once #include @@ -88,5 +91,3 @@ private: sockaddr addrDest; addrinfo* result_list; }; - -#endif diff --git a/scsiapi/scsiapi.h b/scsiapi/scsiapi.h index 60e5b5b7..8d959d6c 100644 --- a/scsiapi/scsiapi.h +++ b/scsiapi/scsiapi.h @@ -3,7 +3,10 @@ | | | Cross-platform SCSI access library | | | -| Adam Honse 7/28/2023 | +| Adam Honse (calcprogrammer1@gmail.com) 28 Jul 2023 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #pragma once diff --git a/scsiapi/scsiapi_linux.c b/scsiapi/scsiapi_linux.c index c1669f4b..adb24289 100644 --- a/scsiapi/scsiapi_linux.c +++ b/scsiapi/scsiapi_linux.c @@ -4,7 +4,10 @@ | Cross-platform SCSI access library | | Linux implementation | | | -| Adam Honse 7/28/2023 | +| Adam Honse (calcprogrammer1@gmail.com) 28 Jul 2023 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #pragma once diff --git a/scsiapi/scsiapi_macos.c b/scsiapi/scsiapi_macos.c index d85aadb6..b41ff861 100644 --- a/scsiapi/scsiapi_macos.c +++ b/scsiapi/scsiapi_macos.c @@ -4,7 +4,10 @@ | Cross-platform SCSI access library | | MacOS implementation (NON-FUNCTIONAL) | | | -| Adam Honse 7/28/2023 | +| Adam Honse (calcprogrammer1@gmail.com) 28 Jul 2023 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #pragma once diff --git a/scsiapi/scsiapi_windows.c b/scsiapi/scsiapi_windows.c index 638fe1d3..89c2079b 100644 --- a/scsiapi/scsiapi_windows.c +++ b/scsiapi/scsiapi_windows.c @@ -4,7 +4,10 @@ | Cross-platform SCSI access library | | Windows implementation | | | -| Adam Honse 7/28/2023 | +| Adam Honse (calcprogrammer1@gmail.com) 28 Jul 2023 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #pragma once diff --git a/serial_port/find_usb_serial_port.h b/serial_port/find_usb_serial_port.h index 888f451d..6fbd7d22 100644 --- a/serial_port/find_usb_serial_port.h +++ b/serial_port/find_usb_serial_port.h @@ -1,3 +1,13 @@ +/*---------------------------------------------------------*\ +| find_usb_serial_port.h | +| | +| Finds the serial port path(s) of USB serial port devices| +| given the USB VID and PID of the device | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #include #include diff --git a/serial_port/find_usb_serial_port_linux.cpp b/serial_port/find_usb_serial_port_linux.cpp index 2e9a22b2..073cc7a9 100644 --- a/serial_port/find_usb_serial_port_linux.cpp +++ b/serial_port/find_usb_serial_port_linux.cpp @@ -1,3 +1,13 @@ +/*---------------------------------------------------------*\ +| find_usb_serial_port_linux.cpp | +| | +| Finds the serial port path(s) of USB serial port devices| +| given the USB VID and PID of the device | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #include "find_usb_serial_port.h" #include diff --git a/serial_port/find_usb_serial_port_win.cpp b/serial_port/find_usb_serial_port_win.cpp index 0c6e4e01..60ce3984 100644 --- a/serial_port/find_usb_serial_port_win.cpp +++ b/serial_port/find_usb_serial_port_win.cpp @@ -1,3 +1,13 @@ +/*---------------------------------------------------------*\ +| find_usb_serial_port_win.cpp | +| | +| Finds the serial port path(s) of USB serial port devices| +| given the USB VID and PID of the device | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #include "find_usb_serial_port.h" #include @@ -115,7 +125,7 @@ std::vector find_usb_serial_port(unsigned short vid, unsigned sho } } - if (DeviceInfoSet) + if (DeviceInfoSet) { SetupDiDestroyDeviceInfoList(DeviceInfoSet); } diff --git a/serial_port/serial_port.cpp b/serial_port/serial_port.cpp index e983dd8d..35c84191 100644 --- a/serial_port/serial_port.cpp +++ b/serial_port/serial_port.cpp @@ -1,10 +1,14 @@ /*---------------------------------------------------------*\ -| Cross Platform Serial COM Library for Windows and Linux | -| This library provides access to serial ports with a | -| common API for both Windows and Linux systems. It | -| features read and write as well as tx/rx buffer flush. | +| serial_port.cpp | | | -| Adam Honse (calcprogrammer1@gmail.com), 1/21/2013 | +| Cross Platform Serial COM Library for Windows and Linux | +| This library provides access to serial ports with a | +| common API for both Windows and Linux systems | +| | +| Adam Honse (calcprogrammer1@gmail.com) 21 Jan 2013 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #include "serial_port.h" diff --git a/serial_port/serial_port.h b/serial_port/serial_port.h index 191120cf..cc9d10cf 100644 --- a/serial_port/serial_port.h +++ b/serial_port/serial_port.h @@ -1,10 +1,14 @@ /*---------------------------------------------------------*\ -| Cross Platform Serial COM Library for Windows and Linux | -| This library provides access to serial ports with a | -| common API for both Windows and Linux systems. It | -| features read and write as well as tx/rx buffer flush. | +| serial_port.h | | | -| Adam Honse (calcprogrammer1@gmail.com), 1/21/2013 | +| Cross Platform Serial COM Library for Windows and Linux | +| This library provides access to serial ports with a | +| common API for both Windows and Linux systems | +| | +| Adam Honse (calcprogrammer1@gmail.com) 21 Jan 2013 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ #ifndef SERIAL_PORT_H diff --git a/super_io/super_io.cpp b/super_io/super_io.cpp index 926a960a..97bed221 100644 --- a/super_io/super_io.cpp +++ b/super_io/super_io.cpp @@ -1,10 +1,14 @@ -/*-----------------------------------------*\ -| super_io.cpp | -| | -| Functions for interfacing with Super-IO | -| | -| Adam Honse (CalcProgrammer1) 2/11/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| super_io.cpp | +| | +| Functions for interfacing with Super-IO | +| | +| Adam Honse (CalcProgrammer1) 11 Feb 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #include "super_io.h" #ifdef WIN32 @@ -35,7 +39,7 @@ void superio_enter(int ioreg) #else unsigned char temp = 0x87; dev_port_fd = open("/dev/port", O_RDWR, "rw"); - + if (dev_port_fd >= 0) { lseek(dev_port_fd, ioreg, SEEK_SET); @@ -49,9 +53,9 @@ void superio_enter(int ioreg) { return; } - + close(dev_port_fd); - } + } #endif } @@ -71,7 +75,7 @@ void superio_outb(int ioreg, int reg, int val) WriteIoPortByte(ioreg + 1, val); #else dev_port_fd = open("/dev/port", O_RDWR, "rw"); - + if (dev_port_fd >= 0) { lseek(dev_port_fd, ioreg, SEEK_SET); @@ -108,7 +112,7 @@ int superio_inb(int ioreg, int reg) unsigned char temp = 0; dev_port_fd = open("/dev/port", O_RDWR, "rw"); - if (dev_port_fd >= 0) + if (dev_port_fd >= 0) { lseek(dev_port_fd, ioreg, SEEK_SET); if(write(dev_port_fd, ®, 1) == -1) @@ -122,7 +126,7 @@ int superio_inb(int ioreg, int reg) } close(dev_port_fd); - + return((int)temp); } else diff --git a/super_io/super_io.h b/super_io/super_io.h index a8061558..496735c5 100644 --- a/super_io/super_io.h +++ b/super_io/super_io.h @@ -1,10 +1,13 @@ -/*-----------------------------------------*\ -| super_io.h | -| | -| Functions for interfacing with Super-IO | -| | -| Adam Honse (CalcProgrammer1) 2/11/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| super_io.cpp | +| | +| Functions for interfacing with Super-IO | +| | +| Adam Honse (CalcProgrammer1) 11 Feb 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ /******************************************************************************************\ * *