Update even more file header comments to standardized new format
This commit is contained in:
parent
200b8e3a24
commit
a3066db16c
31 changed files with 284 additions and 152 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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 <map>
|
||||
|
|
|
|||
|
|
@ -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 <cstring>
|
||||
#include "RGBController.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <cstring>
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
/******************************************************************************************\
|
||||
|
|
|
|||
|
|
@ -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 <string>
|
||||
#include "i2c_smbus.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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 <vector>
|
||||
|
||||
|
|
@ -88,5 +91,3 @@ private:
|
|||
sockaddr addrDest;
|
||||
addrinfo* result_list;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
| |
|
||||
| Cross-platform SCSI access library |
|
||||
| |
|
||||
| Adam Honse <calcprogrammer1@gmail.com> 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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
| Cross-platform SCSI access library |
|
||||
| Linux implementation |
|
||||
| |
|
||||
| Adam Honse <calcprogrammer1@gmail.com> 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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
| Cross-platform SCSI access library |
|
||||
| MacOS implementation (NON-FUNCTIONAL) |
|
||||
| |
|
||||
| Adam Honse <calcprogrammer1@gmail.com> 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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
| Cross-platform SCSI access library |
|
||||
| Windows implementation |
|
||||
| |
|
||||
| Adam Honse <calcprogrammer1@gmail.com> 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
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <unistd.h>
|
||||
|
|
|
|||
|
|
@ -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 <initguid.h>
|
||||
|
|
@ -115,7 +125,7 @@ std::vector<std::string *> find_usb_serial_port(unsigned short vid, unsigned sho
|
|||
}
|
||||
}
|
||||
|
||||
if (DeviceInfoSet)
|
||||
if (DeviceInfoSet)
|
||||
{
|
||||
SetupDiDestroyDeviceInfoList(DeviceInfoSet);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue