Update NVIDIA Illumination controller files to new standardized header comment
This commit is contained in:
parent
1d766d4a10
commit
ffe99f0310
7 changed files with 89 additions and 82 deletions
|
|
@ -1,22 +1,22 @@
|
|||
/*----------------------------------------------*\
|
||||
| NVIDIAIlluminationControllerDetect.cpp |
|
||||
| |
|
||||
| Detect GPUS that are controlled by the direct |
|
||||
| NVIDIA Illumination controller. |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 1/4/2022 |
|
||||
\*----------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| NVIDIAIlluminationControllerDetect_Windows.cpp |
|
||||
| |
|
||||
| Detector for NVIDIA Illumination GPU |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 04 Jan 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <vector>
|
||||
#include "Detector.h"
|
||||
|
||||
#include "LogManager.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_NVIDIAIllumination_Windows.h"
|
||||
|
||||
#include "pci_ids.h"
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
/*-----------------------------------------------*\
|
||||
| NVIDIAIlluminationV1Controller.cpp |
|
||||
| |
|
||||
| Driver for NVIDIA Illumination controlled GPUs |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 1/5/2022 |
|
||||
\*-----------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| NVIDIAIlluminationV1Controller_Windows.cpp |
|
||||
| |
|
||||
| Driver for NVIDIA Illumination V1 GPU |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 05 Jan 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "NVIDIAIlluminationV1Controller_Windows.h"
|
||||
|
||||
|
|
@ -126,17 +129,17 @@ void NVIDIAIlluminationV1Controller::setZone(uint8_t zone, uint8_t mode, NVIDIAI
|
|||
\*----------------------------------------------------------------------------------------------------*/
|
||||
if(!_treats_rgbw_as_rgb)
|
||||
{
|
||||
uint8_t min_rgb_value = 0xFF;
|
||||
uint8_t min_rgb_value = 0xFF;
|
||||
uint8_t max_rgb_value = 0;
|
||||
min_rgb_value = ((red < 0xFF) ? red : min_rgb_value);
|
||||
min_rgb_value = ((green < min_rgb_value) ? green : min_rgb_value);
|
||||
min_rgb_value = ((blue < min_rgb_value) ? blue : min_rgb_value);
|
||||
max_rgb_value = ((red > 0) ? red : max_rgb_value);
|
||||
max_rgb_value = ((green > max_rgb_value) ? green : max_rgb_value);
|
||||
max_rgb_value = ((blue > max_rgb_value) ? blue : max_rgb_value);
|
||||
min_rgb_value = ((red < 0xFF) ? red : min_rgb_value);
|
||||
min_rgb_value = ((green < min_rgb_value) ? green : min_rgb_value);
|
||||
min_rgb_value = ((blue < min_rgb_value) ? blue : min_rgb_value);
|
||||
max_rgb_value = ((red > 0) ? red : max_rgb_value);
|
||||
max_rgb_value = ((green > max_rgb_value) ? green : max_rgb_value);
|
||||
max_rgb_value = ((blue > max_rgb_value) ? blue : max_rgb_value);
|
||||
/*---------------------------------------------------------------------------------------------------*\
|
||||
| If difference between the highest and lowest RGB values is 10 or lower, set the white value only, |
|
||||
| zero out the rest, this logic was found via tedious examination |
|
||||
| zero out the rest, this logic was found via tedious examination |
|
||||
\*---------------------------------------------------------------------------------------------------*/
|
||||
if (max_rgb_value - min_rgb_value <= 10)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
/*-----------------------------------------*\
|
||||
| NVIDIAIlluminationV1Controller.h |
|
||||
| |
|
||||
| Definitions and types for direct NVIDIA |
|
||||
| Illumination-based NVIDIA GPUs' RGB |
|
||||
| controller |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 1/4/2022 |
|
||||
\*-----------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| NVIDIAIlluminationV1Controller_Windows.h |
|
||||
| |
|
||||
| Driver for NVIDIA Illumination V1 GPU |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 04 Jan 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstring>
|
||||
#include "nvapi_accessor_Windows.h"
|
||||
#include "RGBController.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NVIDIA_ILLUMINATION_V1_CONTROLLER_NAME "NVIDIA_ILLUMINATION_V1"
|
||||
#define NVAPI_OK 0
|
||||
|
||||
|
|
@ -56,5 +56,4 @@ class NVIDIAIlluminationV1Controller
|
|||
NV_GPU_CLIENT_ILLUM_ZONE_CONTROL_PARAMS zone_params;
|
||||
NV_STATUS nvapi_return = 0;
|
||||
const std::array<uint8_t, 4> all_zeros = {0, 0, 0, 0};
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,12 +1,16 @@
|
|||
/*--------------------------------------------*\
|
||||
| RGBController_NVIDIAIllumination.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for OpenRGB direct |
|
||||
| NVIDIA Illumination controller NVIDIA GPUs. |
|
||||
| Note that this works for Windows only. |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 1/4/2022 |
|
||||
\*--------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_NVIDIAIllumination.cpp |
|
||||
| |
|
||||
| RGBController for NVIDIA Illumination GPU |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 04 Jan 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <array>
|
||||
#include "RGBController_NVIDIAIllumination_Windows.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name NVIDIA Illumination
|
||||
|
|
@ -44,10 +48,6 @@
|
|||
standard RGB).
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "RGBController_NVIDIAIllumination_Windows.h"
|
||||
#include <array>
|
||||
|
||||
RGBController_NVIDIAIlluminationV1::RGBController_NVIDIAIlluminationV1(NVIDIAIlluminationV1Controller* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,19 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_NVIDIAIllumination.h |
|
||||
| |
|
||||
| NVIDIA Illumination Generic RGB Interface|
|
||||
| for OpenRGB |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 1/4/2022 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_NVIDIAIllumination.h |
|
||||
| |
|
||||
| RGBController for NVIDIA Illumination GPU |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 04 Jan 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include "RGBController.h"
|
||||
#include "NVIDIAIlluminationV1Controller_Windows.h"
|
||||
#include <map>
|
||||
|
||||
#define NVIDIA_FOUNDERS_V1_CONTROLLER_NAME "NVIDIA_FOUNDERS_V1"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
/*-----------------------------------------*\
|
||||
| nvapi_accessor.cpp |
|
||||
| |
|
||||
| Definitions and for Nvidia NvAPI |
|
||||
| direct access class |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 6/20/2022 |
|
||||
\*-----------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| nvapi_accessor_Windows.cpp |
|
||||
| |
|
||||
| NVAPI accessor for NVIDIA NVAPI illumination API |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 20 Jun 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "nvapi_accessor_Windows.h"
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include "nvapi_accessor_Windows.h"
|
||||
|
||||
nvapi_accessor::nvapi_accessor(NV_PHYSICAL_GPU_HANDLE handle)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
/*-----------------------------------------*\
|
||||
| nvapi_accessor.h |
|
||||
| |
|
||||
| Definitions and types for Nvidia NvAPI |
|
||||
| direct access class |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 6/20/2022 |
|
||||
\*-----------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| nvapi_accessor_Windows.h |
|
||||
| |
|
||||
| NVAPI accessor for NVIDIA NVAPI illumination API |
|
||||
| |
|
||||
| Carter Miller (GingerRunner) 20 Jun 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "nvapi.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue