1 /* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #ifndef HID_SENSOR_DEF_H_ 17 #define HID_SENSOR_DEF_H_ 18 namespace Hid { 19 namespace Sensor { 20 namespace GeneralUsage { 21 enum { 22 STATE = 0x200201, 23 EVENT = 0x200202, 24 }; 25 26 } //namespace Usage 27 namespace PropertyUsage { 28 enum { 29 FRIENDLY_NAME = 0x200301, 30 MINIMUM_REPORT_INTERVAL = 0x200304, 31 PERSISTENT_UNIQUE_ID = 0x200302, 32 POWER_STATE = 0x200319, 33 RANGE_MAXIMUM = 0x200314, 34 RANGE_MINIMUM = 0x200315, 35 REPORTING_STATE = 0x200316, 36 REPORT_INTERVAL = 0x20030E, 37 RESOLUTION = 0x200313, 38 SAMPLING_RATE =0x200317, 39 SENSOR_CONNECTION_TYPE = 0x200309, 40 SENSOR_DESCRIPTION = 0x200308, 41 SENSOR_MANUFACTURER = 0x200305, 42 SENSOR_MODEL = 0x200306, 43 SENSOR_SERIAL_NUMBER = 0x200307, 44 SENSOR_STATUS = 0x200303, 45 }; 46 } // nsmespace PropertyUsage 47 48 namespace SensorTypeUsage { 49 enum { 50 ACCELEROMETER_3D = 0x200073, 51 COMPASS_3D = 0x200083, 52 CUSTOM = 0x2000E1, 53 DEVICE_ORIENTATION = 0x20008A, 54 GYROMETER_3D = 0x200076, 55 }; 56 } // namespace SensorTypeUsage 57 58 namespace ReportUsage { 59 enum { 60 ACCELERATION_X_AXIS = 0x200453, 61 ACCELERATION_Y_AXIS = 0x200454, 62 ACCELERATION_Z_AXIS = 0x200455, 63 ANGULAR_VELOCITY_X_AXIS = 0x200457, 64 ANGULAR_VELOCITY_Y_AXIS = 0x200458, 65 ANGULAR_VELOCITY_Z_AXIS = 0x200459, 66 CUSTOM_VALUE_1 = 0x200544, 67 CUSTOM_VALUE_2 = 0x200545, 68 CUSTOM_VALUE_3 = 0x200546, 69 CUSTOM_VALUE_4 = 0x200547, 70 CUSTOM_VALUE_5 = 0x200548, 71 CUSTOM_VALUE_6 = 0x200549, 72 MAGNETIC_FLUX_X_AXIS = 0x200485, 73 MAGNETIC_FLUX_Y_AXIS = 0x200486, 74 MAGNETIC_FLUX_Z_AXIS = 0x200487, 75 MAGNETOMETER_ACCURACY = 0x200488, 76 ORIENTATION_QUATERNION = 0x200483, 77 }; 78 } // namespace ReportUsage 79 80 namespace ReportingStateUsage { 81 enum { 82 REPORTING_STATE_NO_EVENTS = 0x0840, 83 REPORTING_STATE_ALL_EVENTS = 0x0841, 84 REPORTING_STATE_REPORT_THRESHOLD_EVENTS = 0x0842, 85 REPORTING_STATE_REPORT_WAKE_ON_NO_EVENTS = 0x0843, 86 REPORTING_STATE_REPORT_WAKE_ON_ALL_EVENTS = 0x0844, 87 REPORTING_STATE_REPORT_WAKE_ON_THRESHOLD_EVENTS = 0x0845, 88 }; 89 } // namespace ReportingStateUsage 90 91 namespace PowerStateUsage { 92 enum { 93 POWER_STATE_UNDEFINED = 0x0850, 94 POWER_STATE_D0_FULL_POWER = 0x0851, 95 POWER_STATE_D1_LOW_POWER = 0x0852, 96 POWER_STATE_D2_STANDBY_POWER_WITH_WAKEUP = 0x0853, 97 POWER_STATE_D3_SLEEP_WITH_WAKEUP = 0x0854, 98 POWER_STATE_D4_POWER_OFF = 0x0855, 99 }; 100 } // namespace PowerStateUsage 101 102 } // namespace Sensor 103 } // namespace Hid 104 #endif // HID_SENSOR_DEF_H_ 105 106