1+ //SPDX-License-Identifier: MS-PL
2+ //
13//Copyright (C) Framework Computer Inc
2- //Copyright (C) 2014 The ChromiumOS Authors
34//
45//Abstract:
56//
@@ -16,24 +17,11 @@ extern "C" {
1617#include <wdf.h>
1718#include "Trace.h"
1819
19- /* Command version mask */
20- #define EC_VER_MASK (version ) (1UL << (version))
21-
22- #define EC_MEMMAP_ALS 0x80 /* ALS readings in lux (2 X 16 bits) */
23- /* Unused 0x84 - 0x8f */
24- #define EC_MEMMAP_ACC_STATUS 0x90 /* Accelerometer status (8 bits )*/
25- /* Unused 0x91 */
26- #define EC_MEMMAP_ACC_DATA 0x92 /* Accelerometers data 0x92 - 0x9f */
27- /* 0x92: Lid Angle if available, LID_ANGLE_UNRELIABLE otherwise */
28- /* 0x94 - 0x99: 1st Accelerometer */
29- /* 0x9a - 0x9f: 2nd Accelerometer */
30-
31- /* Define the format of the accelerometer mapped memory status byte. */
32- #define EC_MEMMAP_ACC_STATUS_SAMPLE_ID_MASK 0x0f
33- // BIT(4)
34- #define EC_MEMMAP_ACC_STATUS_BUSY_BIT (1 << 4)
35- // BIT(7)
36- #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 */
3725
3826#define FILE_DEVICE_CROS_EMBEDDED_CONTROLLER 0x80EC
3927
@@ -49,10 +37,6 @@ NTSTATUS ConnectToEc(
4937 _Inout_ HANDLE * Handle
5038);
5139
52- #define EC_CMD_MOTION_SENSE 0x002B
53- #define EC_CMD_RGBKBD_SET_COLOR 0x013A
54- #define EC_CMD_RGBKBD 0x013B
55-
5640#define EC_RES_SUCCESS 0
5741#define EC_INVALID_COMMAND 1
5842#define EC_ERROR 2
@@ -115,16 +99,6 @@ typedef struct {
11599 UINT8 SensorNum ;
116100} EC_REQUEST_MOTION_SENSE_INFO ;
117101
118- #define MOTION_SENSE_TYPE_ACCEL 0x00
119- #define MOTION_SENSE_TYPE_GYRO 0x01
120- #define MOTION_SENSE_TYPE_MAG 0x02
121- #define MOTION_SENSE_TYPE_PROX 0x03
122- #define MOTION_SENSE_TYPE_LIGHT 0x04
123-
124- #define MOTION_SENSE_LOCATION_BASE 0x00
125- #define MOTION_SENSE_LOCATION_LID 0x01
126- #define MOTION_SENSE_LOCATION_CAMERA 0x02
127-
128102typedef struct {
129103 UINT8 SensorType ;
130104 UINT8 Location ;
0 commit comments