【问题标题】:Read the screen backlight value from officially Raspberry Pi 7" Display从官方 Raspberry Pi 7" Display 读取屏幕背光值
【发布时间】:2019-01-27 13:18:10
【问题描述】:

我正在尝试从官方的 Raspberry 7" Touch LCD 获取实际的屏幕背光值。我知道“set”命令是 0x86,但“get”命令是什么?猜测是 0x85 或 0x87。

这是我尝试开始工作的代码示例:

public async Task<bool> IsDimmed()
    {
        string i2cDeviceSelector = I2cDevice.GetDeviceSelector();
        I2cConnectionSettings i2CConnectionSettings = new I2cConnectionSettings(0x45);
        IReadOnlyList<DeviceInformation> deviceInformationCollection = await DeviceInformation.FindAllAsync(i2cDeviceSelector);
        if (deviceInformationCollection.Count > 0)
        {
            var i2CDevice = await I2cDevice.FromIdAsync(deviceInformationCollection[0].Id, i2CConnectionSettings);
            var readBuffer = new byte[1];
            var command = new byte[] { 0x85 };
            try
            {
                i2CDevice.WriteRead(command, readBuffer);
                i2CDevice.Dispose();
                if (readBuffer[0] < 0xff) return true;
            }
            catch {  }
        }
        return false;
    }

我希望“readBuffer”的实际亮度值从 0x00 到 0xff。

【问题讨论】:

    标签: c# raspberry-pi windows-10-iot-core


    【解决方案1】:

    我试图找到获取触摸屏背光值的命令,但没有找到任何有用的信息。 MSDN 论坛上有一个topic,我想你可以从提到的 IoTGirl 那里得到一些有用的信息。

    RPix 没有传统的 Windows 显示驱动程序。全部 显示渲染由 VC4 固件完成(由 Pi 管理的 GPU 微码 基金会)。

    Andre 进一步回应,LCD 面板和 VC4 之间的 I2c 通道 不会暴露给 Windows,因为 VC4 完全拥有它 I2c 通道。

    即使可以实现,在 Windows 之间共享同一个 i2c 而且VC4会有问题。它肯定会打破触摸 功能。

    【讨论】:

      猜你喜欢
      • 2022-07-06
      • 1970-01-01
      • 2011-05-06
      • 2021-08-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多