convertablet/daemon/device_information.h

52 lines
1.9 KiB
C
Raw Normal View History

#pragma once
#include <stdint.h>
struct device_information {
char const* const device_name;
bool screen_rotation_supported;
char const* const target_output;
char const* const target_motion_sensor;
enum wl_output_transform const sensor_to_output_rotation[4];
bool basestation_detection_supported;
uint16_t const basestation_vendor_id;
uint16_t const basestation_product_id;
};
static struct device_information DEVICE_INFORMATION_GENERIC = {
.device_name = "generic",
.screen_rotation_supported = true,
.target_output = "eDP-1",
.target_motion_sensor = "/sys/bus/iio/devices/iio:device0",
.sensor_to_output_rotation =
{
[ACCEL_ROTATION_0DEG] = WL_OUTPUT_TRANSFORM_NORMAL,
[ACCEL_ROTATION_90DEG] = WL_OUTPUT_TRANSFORM_90,
[ACCEL_ROTATION_180DEG] = WL_OUTPUT_TRANSFORM_180,
[ACCEL_ROTATION_270DEG] = WL_OUTPUT_TRANSFORM_270,
},
.basestation_detection_supported = false,
.basestation_vendor_id = 0,
.basestation_product_id = 0,
};
static struct device_information DEVICE_INFOS[] = {
{
.device_name = "lenovo-miix-320-10icr",
.screen_rotation_supported = true,
.target_output = "DSI-1",
.target_motion_sensor = "/sys/bus/iio/devices/iio:device0",
.sensor_to_output_rotation =
{
[ACCEL_ROTATION_0DEG] = WL_OUTPUT_TRANSFORM_270,
[ACCEL_ROTATION_90DEG] = WL_OUTPUT_TRANSFORM_NORMAL,
[ACCEL_ROTATION_180DEG] = WL_OUTPUT_TRANSFORM_90,
[ACCEL_ROTATION_270DEG] = WL_OUTPUT_TRANSFORM_180,
},
.basestation_detection_supported = true,
.basestation_vendor_id = 0x048d,
.basestation_product_id = 0x8911,
},
};