Brightness: add DDC/CI support for Intel

Doesn't work for me. Need more testing
This commit is contained in:
Carter Li
2023-10-04 14:41:06 +08:00
parent f8aafb7ce4
commit 8795d99f79
3 changed files with 88 additions and 21 deletions
-15
View File
@@ -1,15 +0,0 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_util_apple_ddcci_h
#include <CoreGraphics/CoreGraphics.h>
// DDC/CI
typedef CFTypeRef IOAVServiceRef;
extern IOAVServiceRef IOAVServiceCreate(CFAllocatorRef allocator) __attribute__((weak_import));
extern IOAVServiceRef IOAVServiceCreateWithService(CFAllocatorRef allocator, io_service_t service) __attribute__((weak_import));
extern IOReturn IOAVServiceCopyEDID(IOAVServiceRef service, CFDataRef* x2) __attribute__((weak_import));
extern IOReturn IOAVServiceReadI2C(IOAVServiceRef service, uint32_t chipAddress, uint32_t offset, void* outputBuffer, uint32_t outputBufferSize) __attribute__((weak_import));
extern IOReturn IOAVServiceWriteI2C(IOAVServiceRef service, uint32_t chipAddress, uint32_t dataAddress, void* inputBuffer, uint32_t inputBufferSize) __attribute__((weak_import));
#endif