11//SPDX-License-Identifier: MS-PL
22//
33//Copyright (C) Framework Computer Inc
4- //Copyright (C) 2014 The ChromiumOS Authors
54//
65//Abstract:
76//
@@ -18,24 +17,11 @@ extern "C" {
1817#include <wdf.h>
1918#include "Trace.h"
2019
21- /* Command version mask */
22- #define EC_VER_MASK (version ) (1UL << (version))
23-
24- #define EC_MEMMAP_ALS 0x80 /* ALS readings in lux (2 X 16 bits) */
25- /* Unused 0x84 - 0x8f */
26- #define EC_MEMMAP_ACC_STATUS 0x90 /* Accelerometer status (8 bits )*/
27- /* Unused 0x91 */
28- #define EC_MEMMAP_ACC_DATA 0x92 /* Accelerometers data 0x92 - 0x9f */
29- /* 0x92: Lid Angle if available, LID_ANGLE_UNRELIABLE otherwise */
30- /* 0x94 - 0x99: 1st Accelerometer */
31- /* 0x9a - 0x9f: 2nd Accelerometer */
32-
33- /* Define the format of the accelerometer mapped memory status byte. */
34- #define EC_MEMMAP_ACC_STATUS_SAMPLE_ID_MASK 0x0f
35- // BIT(4)
36- #define EC_MEMMAP_ACC_STATUS_BUSY_BIT (1 << 4)
37- // BIT(7)
38- #define EC_MEMMAP_ACC_STATUS_PRESENCE_BIT (1 << 7)
20+ #include "ec_compat_win.h"
21+ #pragma pack(push, 1)
22+ #include "ec_commands.h"
23+ #pragma pack(pop)
24+ #pragma warning(pop) /* matches push in ec_compat_win.h */
3925
4026#define FILE_DEVICE_CROS_EMBEDDED_CONTROLLER 0x80EC
4127
@@ -51,10 +37,6 @@ NTSTATUS ConnectToEc(
5137 _Inout_ HANDLE * Handle
5238);
5339
54- #define EC_CMD_MOTION_SENSE 0x002B
55- #define EC_CMD_RGBKBD_SET_COLOR 0x013A
56- #define EC_CMD_RGBKBD 0x013B
57-
5840#define EC_RES_SUCCESS 0
5941#define EC_INVALID_COMMAND 1
6042#define EC_ERROR 2
@@ -117,16 +99,6 @@ typedef struct {
11799 UINT8 SensorNum ;
118100} EC_REQUEST_MOTION_SENSE_INFO ;
119101
120- #define MOTION_SENSE_TYPE_ACCEL 0x00
121- #define MOTION_SENSE_TYPE_GYRO 0x01
122- #define MOTION_SENSE_TYPE_MAG 0x02
123- #define MOTION_SENSE_TYPE_PROX 0x03
124- #define MOTION_SENSE_TYPE_LIGHT 0x04
125-
126- #define MOTION_SENSE_LOCATION_BASE 0x00
127- #define MOTION_SENSE_LOCATION_LID 0x01
128- #define MOTION_SENSE_LOCATION_CAMERA 0x02
129-
130102typedef struct {
131103 UINT8 SensorType ;
132104 UINT8 Location ;
0 commit comments