ADL Overdrive 6 support and integration (#386)

This commit is contained in:
Rem0o
2021-02-11 11:17:36 +01:00
committed by GitHub
parent 270ae30563
commit 411203902b
2 changed files with 64 additions and 10 deletions
+23 -1
View File
@@ -96,6 +96,15 @@ namespace LibreHardwareMonitor.Interop
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
public static extern ADLStatus ADL_Overdrive5_FanSpeed_Set(int adapterIndex, int thermalControllerIndex, ref ADLFanSpeedValue fanSpeedValue);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
public static extern ADLStatus ADL_Overdrive6_FanSpeed_Get(int adapterIndex, ref ADLOD6FanSpeedValue FanSpeedValue);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
public static extern ADLStatus ADL_Overdrive6_FanSpeed_Set(int adapterIndex, ref ADLOD6FanSpeedValue FanSpeedValue);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
public static extern ADLStatus ADL_Overdrive6_FanSpeed_Reset(int adapterIndex);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
public static extern ADLStatus ADL2_OverdriveN_PerformanceStatus_Get(IntPtr context, int adapterIndex, out ADLODNPerformanceStatus performanceStatus);
@@ -355,7 +364,20 @@ namespace LibreHardwareMonitor.Interop
public int FanSpeed;
public int Flags;
}
[StructLayout(LayoutKind.Sequential)]
internal struct ADLOD6FanSpeedValue
{
/// Indicates the units of the fan speed. Possible values: \ref ADL_OD6_FANSPEED_TYPE_PERCENT, \ref ADL_OD6_FANSPEED_TYPE_RPM
public int SpeedType;
/// Fan speed value (units as indicated above)
public int FanSpeed;
/// Value for future extension
public int ExtValue;
/// Mask for future extension
public int ExtMask;
}
[StructLayout(LayoutKind.Sequential)]
internal struct ADLFanSpeedInfo
{