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 VENDOR_LE_TRANSPORT = 0x20F410, 46 }; 47 } // nsmespace PropertyUsage 48 49 namespace SensorTypeUsage { 50 enum { 51 ACCELEROMETER_3D = 0x200073, 52 COMPASS_3D = 0x200083, 53 CUSTOM = 0x2000E1, 54 DEVICE_ORIENTATION = 0x20008A, 55 GYROMETER_3D = 0x200076, 56 }; 57 } // namespace SensorTypeUsage 58 59 namespace ReportUsage { 60 enum { 61 ACCELERATION_X_AXIS = 0x200453, 62 ACCELERATION_Y_AXIS = 0x200454, 63 ACCELERATION_Z_AXIS = 0x200455, 64 ANGULAR_VELOCITY_X_AXIS = 0x200457, 65 ANGULAR_VELOCITY_Y_AXIS = 0x200458, 66 ANGULAR_VELOCITY_Z_AXIS = 0x200459, 67 CUSTOM_VALUE_1 = 0x200544, 68 CUSTOM_VALUE_2 = 0x200545, 69 CUSTOM_VALUE_3 = 0x200546, 70 CUSTOM_VALUE_4 = 0x200547, 71 CUSTOM_VALUE_5 = 0x200548, 72 CUSTOM_VALUE_6 = 0x200549, 73 MAGNETIC_FLUX_X_AXIS = 0x200485, 74 MAGNETIC_FLUX_Y_AXIS = 0x200486, 75 MAGNETIC_FLUX_Z_AXIS = 0x200487, 76 MAGNETOMETER_ACCURACY = 0x200488, 77 ORIENTATION_QUATERNION = 0x200483, 78 }; 79 } // namespace ReportUsage 80 81 namespace ReportingStateUsage { 82 enum { 83 REPORTING_STATE_NO_EVENTS = 0x0840, 84 REPORTING_STATE_ALL_EVENTS = 0x0841, 85 REPORTING_STATE_REPORT_THRESHOLD_EVENTS = 0x0842, 86 REPORTING_STATE_REPORT_WAKE_ON_NO_EVENTS = 0x0843, 87 REPORTING_STATE_REPORT_WAKE_ON_ALL_EVENTS = 0x0844, 88 REPORTING_STATE_REPORT_WAKE_ON_THRESHOLD_EVENTS = 0x0845, 89 }; 90 } // namespace ReportingStateUsage 91 92 namespace PowerStateUsage { 93 enum { 94 POWER_STATE_UNDEFINED = 0x0850, 95 POWER_STATE_D0_FULL_POWER = 0x0851, 96 POWER_STATE_D1_LOW_POWER = 0x0852, 97 POWER_STATE_D2_STANDBY_POWER_WITH_WAKEUP = 0x0853, 98 POWER_STATE_D3_SLEEP_WITH_WAKEUP = 0x0854, 99 POWER_STATE_D4_POWER_OFF = 0x0855, 100 }; 101 } // namespace PowerStateUsage 102 103 namespace LeTransportUsage { 104 enum { 105 LE_TRANSPORT_ACL = 0xF800, 106 LE_TRANSPORT_ISO = 0xF801, 107 }; 108 } // namespace LeTransportUsage 109 110 } // namespace Sensor 111 } // namespace Hid 112 #endif // HID_SENSOR_DEF_H_ 113 114