Update Lenovo USB Gen7/Gen8 controller files to new standardized header comment

This commit is contained in:
Adam Honse 2024-05-25 12:46:23 -05:00
parent f6e42f0c6d
commit 4723c64666
6 changed files with 72 additions and 47 deletions

View file

@ -1,21 +1,28 @@
/*---------------------------------------------------------*\
| LenovoDevices.h |
| |
| Device list for Lenovo USB devices |
| |
| Cooper Hall (geobot19) 17 Apr 2022 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#pragma once
#include <string>
#include "RGBControllerKeyNames.h"
#include "RGBController.h"
#define NA 0xFFFFFFFF
/*-------------------------------------------------------------------*\
| LenovoDevices.h |
| |
| Describes zones for various Lenovo Legion Devices |
| |
| Cooper Hall (geobot19) 17 Apr 2022 |
| |
| Note: additions here must be adeed to RGBController_LenovoUSB.cpp in|
| the switch statements which are on lines 28 and 60 at time of |
| writing |
\*-------------------------------------------------------------------*/
#include <string>
#include "RGBControllerKeyNames.h"
#include "RGBController.h"
#define NA 0xFFFFFFFF
#ifndef LENOVODEVICES_H
#define LENOVODEVICES_H
/*-----------------------------------------------------*\
| Keyboard product IDs |
\*-----------------------------------------------------*/
@ -1935,4 +1942,3 @@ static lenovo_zone legion7_gen7and8_neon
0,
9,
};
#endif

View file

@ -1,20 +1,21 @@
/*-------------------------------------------------------------------*\
| LenovoUSBDetect.h |
| |
| Describes zones for various Lenovo Legion Devices |
| |
| Cooper Hall (geobot19) 17 Apr 2022 |
| |
\*-------------------------------------------------------------------*/
/*---------------------------------------------------------*\
| LenovoUSBControllerDetect.cpp |
| |
| Detector for Lenovo USB devices |
| |
| Cooper Hall (geobot19) 17 Apr 2022 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#include <hidapi/hidapi.h>
#include "Detector.h"
#include "LogManager.h"
#include "RGBController.h"
#include "LenovoDevices.h"
#include "RGBController_LenovoUSB.h"
#include "RGBController_Lenovo_Gen7_8.h"
#include <hidapi/hidapi.h>
/*-----------------------------------------------------*\
| vendor IDs |

View file

@ -1,3 +1,12 @@
/*---------------------------------------------------------*\
| LenovoUSBController_Gen7_8.cpp |
| |
| Driver for Lenovo Gen7 and Gen8 devices |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#include <iomanip>
#include <sstream>
#include "LenovoUSBController_Gen7_8.h"

View file

@ -1,28 +1,26 @@
/*-------------------------------------------------------------------*\
| LenovoGen7And8USBController.h |
| |
| Driver for Lenovo Legion 7 Gen 7 |
| |
| Peter Vazny 15 Nov 2022 |
| |
\*-------------------------------------------------------------------*/
/*---------------------------------------------------------*\
| LenovoUSBController_Gen7_8.h |
| |
| Driver for Lenovo Gen7 and Gen8 devices |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#pragma once
#include <array>
#include <string>
#include <utility>
#include <vector>
#include <hidapi/hidapi.h>
#include "RGBController.h"
#include "LogManager.h"
#include <string>
#include <array>
#include <vector>
#include <utility>
#include <hidapi/hidapi.h>
#ifndef HID_MAX_STR
#define HID_MAX_STR 255
#endif
#ifndef LENOVOGEN7AND8USBCONTROLLER_H
#define LENOVOGEN7AND8USBCONTROLLER_H
#define PACKET_SIZE 960
#define REPORT_ID 0x07
#define DIRECT_MODE 0xA1
@ -92,5 +90,3 @@ class LenovoGen7And8USBController
std::string ConvertBytesToHex(uint8_t packet[], size_t packet_size);
std::string ConvertBytesToHex(const std::vector<uint8_t> &input);
};
#endif // LENOVOGEN7AND8USBCONTROLLER_H

View file

@ -1,6 +1,15 @@
/*---------------------------------------------------------*\
| RGBController_Lenovo_Gen7_8.cpp |
| |
| RGBController for Lenovo Gen7 and Gen8 devices |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#include <vector>
#include "RGBController_Lenovo_Gen7_8.h"
#include "LenovoDevices.h"
#include <vector>
using namespace std;

View file

@ -1,5 +1,11 @@
#ifndef RGBCONTROLLER_LENOVO_GEN7USB_H
#define RGBCONTROLLER_LENOVO_GEN7USB_H
/*---------------------------------------------------------*\
| RGBController_Lenovo_Gen7_8.h |
| |
| RGBController for Lenovo Gen7 and Gen8 devices |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#pragma once
@ -48,5 +54,3 @@ private:
uint8_t brightness = 0x00;
uint8_t profile_id = 0x01;
};
#endif // RGBCONTROLLER_LENOVO_GEN7USB_H