diff --git a/FrameworkSensors/AccelerometerClient.cpp b/FrameworkSensors/AccelerometerClient.cpp index 47832a6..84eed16 100644 --- a/FrameworkSensors/AccelerometerClient.cpp +++ b/FrameworkSensors/AccelerometerClient.cpp @@ -1,4 +1,5 @@ // Copyright (C) Microsoft Corporation, All Rights Reserved. +// Copyright (C) Framework Computer Inc, All Rights Reserved. // // Abstract: // @@ -13,7 +14,7 @@ #include "AccelerometerClient.tmh" -#define SENSORV2_POOL_TAG_ACCELEROMETER '2CaL' +#define FWK_SENSORS_POOL_TAG_ACCELEROMETER 'ccAF' #define AccelerometerDevice_Default_MinDataInterval (4) #define AccelerometerDevice_Default_Axis_Threshold (1.0f) @@ -21,11 +22,10 @@ #define AccelerometerDevice_Axis_Minimum (-2.0f) // in g #define AccelerometerDevice_Axis_Maximum (2.0f) // in g -// TODO: New GUID for this? // Accelerometer Unique ID -// {2BAAA1A7-6795-42A0-B830-82526CFD28D1} +// {A931067B-D450-42A4-8B20-2647D4CA9D2D} DEFINE_GUID(GUID_AccelerometerDevice_UniqueID, - 0x2baaa1a7, 0x6795, 0x42a0, 0xb8, 0x30, 0x82, 0x52, 0x6c, 0xfd, 0x28, 0xd1); + 0xa931067b, 0xd450, 0x42a4, 0x8b, 0x20, 0x26, 0x47, 0xd4, 0xca, 0x9d, 0x2d); // Sensor data typedef enum @@ -111,7 +111,7 @@ AccelerometerDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_ACCELEROMETER, + FWK_SENSORS_POOL_TAG_ACCELEROMETER, Size, &MemoryHandle, (PVOID*)&m_pEnumerationProperties); @@ -163,7 +163,7 @@ AccelerometerDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_ACCELEROMETER, + FWK_SENSORS_POOL_TAG_ACCELEROMETER, Size, &MemoryHandle, (PVOID*)&m_pSupportedDataFields); @@ -197,7 +197,7 @@ AccelerometerDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_ACCELEROMETER, + FWK_SENSORS_POOL_TAG_ACCELEROMETER, Size, &MemoryHandle, (PVOID*)&m_pData); @@ -252,7 +252,7 @@ AccelerometerDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_ACCELEROMETER, + FWK_SENSORS_POOL_TAG_ACCELEROMETER, Size, &MemoryHandle, (PVOID*)&m_pProperties); @@ -295,7 +295,7 @@ AccelerometerDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_ACCELEROMETER, + FWK_SENSORS_POOL_TAG_ACCELEROMETER, Size, &MemoryHandle, (PVOID*)&m_pDataFieldProperties); @@ -335,7 +335,7 @@ AccelerometerDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_ACCELEROMETER, + FWK_SENSORS_POOL_TAG_ACCELEROMETER, Size, &MemoryHandle, (PVOID*)&m_pThresholds); diff --git a/FrameworkSensors/AlsClient.cpp b/FrameworkSensors/AlsClient.cpp index 753e873..3c2f123 100644 --- a/FrameworkSensors/AlsClient.cpp +++ b/FrameworkSensors/AlsClient.cpp @@ -13,7 +13,7 @@ #include "AlsClient.tmh" -#define SENSORV2_POOL_TAG_AMBIENT_LIGHT '2LmA' +#define FWK_SENSORS_POOL_TAG_AMBIENT_LIGHT 'SLAF' #define Als_Initial_MinDataInterval_Ms (10) // 100Hz #define Als_Initial_Lux_Threshold_Pct (1.0f) // Percent threshold: 100% @@ -29,9 +29,9 @@ #define AlsDevice_Resolution_Lux (AlsDevice_Range_Lux / AlsDevice_Precision) // Ambient Light Sensor Unique ID -// {2D2A4524-51E3-4E68-9B0F-5CAEDFB12C02} +// {506AC61B-C762-499E-A848-685FC45DF39F} DEFINE_GUID(GUID_AlsDevice_UniqueID, - 0x2d2a4524, 0x51e3, 0x4e68, 0x9b, 0xf, 0x5c, 0xae, 0xdf, 0xb1, 0x2c, 0x2); + 0x506ac61b, 0xc762, 0x499e, 0xa8, 0x48, 0x68, 0x5f, 0xc4, 0x5d, 0xf3, 0x9f); // Sensor data typedef enum @@ -148,7 +148,7 @@ AlsDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_AMBIENT_LIGHT, + FWK_SENSORS_POOL_TAG_AMBIENT_LIGHT, Size, &MemoryHandle, (PVOID*)&m_pEnumerationProperties); @@ -208,7 +208,7 @@ AlsDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_AMBIENT_LIGHT, + FWK_SENSORS_POOL_TAG_AMBIENT_LIGHT, Size, &MemoryHandle, (PVOID*)&m_pSupportedDataFields); @@ -243,7 +243,7 @@ AlsDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_AMBIENT_LIGHT, + FWK_SENSORS_POOL_TAG_AMBIENT_LIGHT, Size, &MemoryHandle, (PVOID*)&m_pData); @@ -305,7 +305,7 @@ AlsDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_AMBIENT_LIGHT, + FWK_SENSORS_POOL_TAG_AMBIENT_LIGHT, Size, &MemoryHandle, (PVOID*)&m_pProperties); @@ -373,7 +373,7 @@ AlsDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_AMBIENT_LIGHT, + FWK_SENSORS_POOL_TAG_AMBIENT_LIGHT, Size, &MemoryHandle, (PVOID*)&m_pDataFieldProperties); @@ -412,7 +412,7 @@ AlsDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_AMBIENT_LIGHT, + FWK_SENSORS_POOL_TAG_AMBIENT_LIGHT, Size, &MemoryHandle, (PVOID*)&m_pThresholds); diff --git a/FrameworkSensors/EcCommunication.cpp b/FrameworkSensors/EcCommunication.cpp index 9adac8d..72c3468 100644 --- a/FrameworkSensors/EcCommunication.cpp +++ b/FrameworkSensors/EcCommunication.cpp @@ -1,6 +1,16 @@ - -// Only need EC commands to use EC_CMD_MOTION_SENSE_CMD to determine which accel sensors there are and which position they are -// ALl the rest can be done using memory map reads +// Copyright (C) Framework Computer Inc, All Rights Reserved. +// +// Abstract: +// +// This module contains the implementation of communication with the embedded controller. +// +// Only need EC commands to use EC_CMD_MOTION_SENSE_CMD to determine which +// accel sensors there are and which position they are. ALl the rest can be +// done using memory map reads. +// +// Environment: +// +// Windows User-Mode Driver Framework (UMDF) #include "Clients.h" #include "EcCommunication.h" diff --git a/FrameworkSensors/SensorsTrace.h b/FrameworkSensors/SensorsTrace.h index 85a8b81..11b9159 100644 --- a/FrameworkSensors/SensorsTrace.h +++ b/FrameworkSensors/SensorsTrace.h @@ -1,4 +1,5 @@ //Copyright (C) Microsoft Corporation, All Rights Reserved +//Copyright (C) Framework Computer Inc, All Rights Reserved // //Abstract: // @@ -16,19 +17,20 @@ extern "C" { // Define the tracing flags. // -// Tracing GUID - 3C773167-F26D-4F72-A1DE-95F1FD795840 - -#define WPP_CONTROL_GUIDS \ - WPP_DEFINE_CONTROL_GUID( \ - SimpleDeviceOrientationSensorTraceGuid, (3C773167,F26D,4F72,A1DE,95F1FD795840), \ - WPP_DEFINE_BIT(EntryExit) \ - WPP_DEFINE_BIT(DataFlow) \ - WPP_DEFINE_BIT(Verbose) \ - WPP_DEFINE_BIT(Information) \ - WPP_DEFINE_BIT(Warning) \ - WPP_DEFINE_BIT(Error) \ - WPP_DEFINE_BIT(Fatal) \ - WPP_DEFINE_BIT(DriverStatus) \ +// Tracing GUID - B915AE22-198E-4CF7-BF4D-395FAD3F645A + + +#define WPP_CONTROL_GUIDS \ + WPP_DEFINE_CONTROL_GUID( \ + FrameworkSensorsTraceGuid, (B915AE22,198E,4CF7,BF4D,395FAD3F645A), \ + WPP_DEFINE_BIT(EntryExit) \ + WPP_DEFINE_BIT(DataFlow) \ + WPP_DEFINE_BIT(Verbose) \ + WPP_DEFINE_BIT(Information) \ + WPP_DEFINE_BIT(Warning) \ + WPP_DEFINE_BIT(Error) \ + WPP_DEFINE_BIT(Fatal) \ + WPP_DEFINE_BIT(DriverStatus) \ ) #define WPP_FLAG_LEVEL_LOGGER(flag, level) WPP_LEVEL_LOGGER(flag) diff --git a/FrameworkSensors/SimpleDeviceOrientationClient.cpp b/FrameworkSensors/SimpleDeviceOrientationClient.cpp index a92fd22..8f97b96 100644 --- a/FrameworkSensors/SimpleDeviceOrientationClient.cpp +++ b/FrameworkSensors/SimpleDeviceOrientationClient.cpp @@ -12,7 +12,7 @@ #include "SimpleDeviceOrientationClient.tmh" -#define SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER 'sodS' +#define FWK_SENSORS_POOL_TAG_ORIENTATION 'irOF' #define SimpleDeviceOrientationDevice_Default_MinDataInterval (4) #define SimpleDeviceOrientationDevice_Default_Axis_Threshold (1.0f) @@ -21,10 +21,9 @@ #define SimpleDeviceOrientationDevice_Axis_Maximum (2.0f) // in g // Simple Device Orientation ID -// {4A303B3E-332A-4044-A35A-282F3D6D56E5} +// {D1FCD247-5848-433A-9129-4C0B93979BE4} DEFINE_GUID(GUID_SimpleDeviceOrientationDevice_UniqueID, - 0x4a303b3e, 0x332a, 0x4044, 0xa3, 0x5a, 0x28, 0x2f, 0x3d, 0x6d, 0x56, - 0xe5); + 0xd1fcd247, 0x5848, 0x433a, 0x91, 0x29, 0x4c, 0xb, 0x93, 0x97, 0x9b, 0xe4); // Sensor data typedef enum @@ -108,7 +107,7 @@ SimpleDeviceOrientationDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER, + FWK_SENSORS_POOL_TAG_ORIENTATION, Size, &MemoryHandle, (PVOID*)&m_pEnumerationProperties); @@ -160,7 +159,7 @@ SimpleDeviceOrientationDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER, + FWK_SENSORS_POOL_TAG_ORIENTATION, Size, &MemoryHandle, (PVOID*)&m_pSupportedDataFields); @@ -192,7 +191,7 @@ SimpleDeviceOrientationDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER, + FWK_SENSORS_POOL_TAG_ORIENTATION, Size, &MemoryHandle, (PVOID*)&m_pData); @@ -237,7 +236,7 @@ SimpleDeviceOrientationDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER, + FWK_SENSORS_POOL_TAG_ORIENTATION, Size, &MemoryHandle, (PVOID*)&m_pProperties); @@ -280,7 +279,7 @@ SimpleDeviceOrientationDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER, + FWK_SENSORS_POOL_TAG_ORIENTATION, Size, &MemoryHandle, (PVOID*)&m_pDataFieldProperties); @@ -320,7 +319,7 @@ SimpleDeviceOrientationDevice::Initialize( MemoryAttributes.ParentObject = SensorInstance; Status = WdfMemoryCreate(&MemoryAttributes, PagedPool, - SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER, + FWK_SENSORS_POOL_TAG_ORIENTATION, Size, &MemoryHandle, (PVOID*)&m_pThresholds);