Home | History | Annotate | Download | only in libsensors_iio
      1 /*
      2 * Copyright (C) 2012 Invensense, Inc.
      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 
     17 #ifndef INV_SENSOR_PARAMS_H
     18 #define INV_SENSOR_PARAMS_H
     19 
     20 /* Physical parameters of the sensors supported by Invensense MPL */
     21 #define SENSORS_ROTATION_VECTOR_HANDLE    (ID_RV)
     22 #define SENSORS_LINEAR_ACCEL_HANDLE       (ID_LA)
     23 #define SENSORS_GRAVITY_HANDLE            (ID_GR)
     24 #define SENSORS_GYROSCOPE_HANDLE          (ID_GY)
     25 #define SENSORS_RAW_GYROSCOPE_HANDLE      (ID_RG)
     26 #define SENSORS_ACCELERATION_HANDLE       (ID_A)
     27 #define SENSORS_MAGNETIC_FIELD_HANDLE     (ID_M)
     28 #define SENSORS_ORIENTATION_HANDLE        (ID_O)
     29 #define SENSORS_SCREEN_ORIENTATION_HANDLE (ID_SO)
     30 
     31 /******************************************/
     32 //MPU9250 INV_COMPASS
     33 #define COMPASS_MPU9250_RANGE           (9830.f)
     34 #define COMPASS_MPU9250_RESOLUTION      (0.15f)
     35 #define COMPASS_MPU9250_POWER           (10.f)
     36 #define COMPASS_MPU9250_MINDELAY        (10000)
     37 //MPU9150 INV_COMPASS
     38 #define COMPASS_MPU9150_RANGE           (9830.f)
     39 #define COMPASS_MPU9150_RESOLUTION      (0.285f)
     40 #define COMPASS_MPU9150_POWER           (10.f)
     41 #define COMPASS_MPU9150_MINDELAY        (10000)
     42 //COMPASS_ID_AK8975
     43 #define COMPASS_AKM8975_RANGE           (9830.f)
     44 #define COMPASS_AKM8975_RESOLUTION      (0.285f)
     45 #define COMPASS_AKM8975_POWER           (10.f)
     46 #define COMPASS_AKM8975_MINDELAY        (10000)
     47 //COMPASS_ID_AK8963C
     48 #define COMPASS_AKM8963_RANGE           (9830.f)
     49 #define COMPASS_AKM8963_RESOLUTION      (0.15f)
     50 #define COMPASS_AKM8963_POWER           (10.f)
     51 #define COMPASS_AKM8963_MINDELAY        (10000)
     52 //COMPASS_ID_AMI30X
     53 #define COMPASS_AMI30X_RANGE            (5461.f)
     54 #define COMPASS_AMI30X_RESOLUTION       (0.9f)
     55 #define COMPASS_AMI30X_POWER            (0.15f)
     56 //COMPASS_ID_AMI306
     57 #define COMPASS_AMI306_RANGE            (5461.f)
     58 #define COMPASS_AMI306_RESOLUTION       (0.9f)
     59 #define COMPASS_AMI306_POWER            (0.15f)
     60 #define COMPASS_AMI306_MINDELAY         (10000)
     61 //COMPASS_ID_YAS529
     62 #define COMPASS_YAS529_RANGE            (19660.f)
     63 #define COMPASS_YAS529_RESOLUTION       (0.012f)
     64 #define COMPASS_YAS529_POWER            (4.f)
     65 //COMPASS_ID_YAS53x
     66 #define COMPASS_YAS53x_RANGE            (8001.f)
     67 #define COMPASS_YAS53x_RESOLUTION       (0.012f)
     68 #define COMPASS_YAS53x_POWER            (4.f)
     69 #define COMPASS_YAS53x_MINDELAY         (10000)
     70 //COMPASS_ID_HMC5883
     71 #define COMPASS_HMC5883_RANGE           (10673.f)
     72 #define COMPASS_HMC5883_RESOLUTION      (10.f)
     73 #define COMPASS_HMC5883_POWER           (0.24f)
     74 //COMPASS_ID_LSM303DLH
     75 #define COMPASS_LSM303DLH_RANGE         (10240.f)
     76 #define COMPASS_LSM303DLH_RESOLUTION    (1.f)
     77 #define COMPASS_LSM303DLH_POWER         (1.f)
     78 //COMPASS_ID_LSM303DLM
     79 #define COMPASS_LSM303DLM_RANGE         (10240.f)
     80 #define COMPASS_LSM303DLM_RESOLUTION    (1.f)
     81 #define COMPASS_LSM303DLM_POWER         (1.f)
     82 //COMPASS_ID_MMC314X
     83 #define COMPASS_MMC314X_RANGE           (400.f)
     84 #define COMPASS_MMC314X_RESOLUTION      (2.f)
     85 #define COMPASS_MMC314X_POWER           (0.55f)
     86 //COMPASS_ID_HSCDTD002B
     87 #define COMPASS_HSCDTD002B_RANGE        (9830.f)
     88 #define COMPASS_HSCDTD002B_RESOLUTION   (1.f)
     89 #define COMPASS_HSCDTD002B_POWER        (1.f)
     90 //COMPASS_ID_HSCDTD004A
     91 #define COMPASS_HSCDTD004A_RANGE        (9830.f)
     92 #define COMPASS_HSCDTD004A_RESOLUTION   (1.f)
     93 #define COMPASS_HSCDTD004A_POWER        (1.f)
     94 /*******************************************/
     95 //ACCEL_ID_MPU6500
     96 #define ACCEL_MPU6500_RANGE             (2.f * GRAVITY_EARTH)
     97 #define ACCEL_MPU6500_RESOLUTION        (0.004f * GRAVITY_EARTH)
     98 #define ACCEL_MPU6500_POWER             (0.f)
     99 #define ACCEL_MPU6500_MINDELAY          (1000)
    100 //ACCEL_ID_MPU9250
    101 #define ACCEL_MPU9250_RANGE             (2.f * GRAVITY_EARTH)
    102 #define ACCEL_MPU9250_RESOLUTION        (0.004f * GRAVITY_EARTH)
    103 #define ACCEL_MPU9250_POWER             (0.f)
    104 #define ACCEL_MPU9250_MINDELAY          (1000)
    105 //ACCEL_ID_MPU9150
    106 #define ACCEL_MPU9150_RANGE             (2.f * GRAVITY_EARTH)
    107 #define ACCEL_MPU9150_RESOLUTION        (0.004f * GRAVITY_EARTH)
    108 #define ACCEL_MPU9150_POWER             (0.f)
    109 #define ACCEL_MPU9150_MINDELAY          (1000)
    110 //ACCEL_ID_LIS331
    111 #define ACCEL_LIS331_RANGE              (2.48f * GRAVITY_EARTH)
    112 #define ACCEL_LIS331_RESOLUTION         (0.001f * GRAVITY_EARTH)
    113 #define ACCEL_LIS331_POWER              (1.f)
    114 //ACCEL_ID_LSM303DLX
    115 #define ACCEL_LSM303DLX_RANGE           (2.48f * GRAVITY_EARTH)
    116 #define ACCEL_LSM303DLX_RESOLUTION      (0.001f * GRAVITY_EARTH)
    117 #define ACCEL_LSM303DLX_POWER           (1.f)
    118 //ACCEL_ID_LIS3DH
    119 #define ACCEL_LIS3DH_RANGE              (2.48f * GRAVITY_EARTH)
    120 #define ACCEL_LIS3DH_RESOLUTION         (0.001f * GRAVITY_EARTH)
    121 #define ACCEL_LIS3DH_POWER              (1.f)
    122 //ACCEL_ID_KXSD9
    123 #define ACCEL_KXSD9_RANGE               (2.5006f * GRAVITY_EARTH)
    124 #define ACCEL_KXSD9_RESOLUTION          (0.001f * GRAVITY_EARTH)
    125 #define ACCEL_KXSD9_POWER               (1.f)
    126 //ACCEL_ID_KXTF9
    127 #define ACCEL_KXTF9_RANGE               (1.f * GRAVITY_EARTH)
    128 #define ACCEL_KXTF9_RESOLUTION          (0.033f * GRAVITY_EARTH)
    129 #define ACCEL_KXTF9_POWER               (0.35f)
    130 //ACCEL_ID_BMA150
    131 #define ACCEL_BMA150_RANGE              (2.f * GRAVITY_EARTH)
    132 #define ACCEL_BMA150_RESOLUTION         (0.004f * GRAVITY_EARTH)
    133 #define ACCEL_BMA150_POWER              (0.2f)
    134 //ACCEL_ID_BMA222
    135 #define ACCEL_BMA222_RANGE              (2.f * GRAVITY_EARTH)
    136 #define ACCEL_BMA222_RESOLUTION         (0.001f * GRAVITY_EARTH)
    137 #define ACCEL_BMA222_POWER              (0.1f)
    138 //ACCEL_ID_BMA250
    139 #define ACCEL_BMA250_RANGE              (2.f * GRAVITY_EARTH)
    140 #define ACCEL_BMA250_RESOLUTION         (0.00391f * GRAVITY_EARTH)
    141 #define ACCEL_BMA250_POWER              (0.139f)
    142 #define ACCEL_BMA250_MINDELAY           (1000)
    143 //ACCEL_ID_ADXL34X
    144 #define ACCEL_ADXL34X_RANGE             (2.f * GRAVITY_EARTH)
    145 #define ACCEL_ADXL34X_RESOLUTION        (0.001f * GRAVITY_EARTH)
    146 #define ACCEL_ADXL34X_POWER             (1.f)
    147 //ACCEL_ID_MMA8450
    148 #define ACCEL_MMA8450_RANGE             (2.f * GRAVITY_EARTH)
    149 #define ACCEL_MMA8450_RESOLUTION        (0.001f * GRAVITY_EARTH)
    150 #define ACCEL_MMA8450_POWER             (1.0f)
    151 //ACCEL_ID_MMA845X
    152 #define ACCEL_MMA845X_RANGE             (2.f * GRAVITY_EARTH)
    153 #define ACCEL_MMA845X_RESOLUTION        (0.001f * GRAVITY_EARTH)
    154 #define ACCEL_MMA845X_POWER             (1.f)
    155 //ACCEL_ID_MPU6050
    156 #define ACCEL_MPU6050_RANGE             (2.f * GRAVITY_EARTH)
    157 #define ACCEL_MPU6050_RESOLUTION        (0.004f * GRAVITY_EARTH)
    158 #define ACCEL_MPU6050_POWER             (0.f)
    159 #define ACCEL_MPU6050_MINDELAY          (1000)
    160 /******************************************/
    161 //GYRO MPU3050
    162 #define RAD_P_DEG                       (3.14159f / 180.f)
    163 #define GYRO_MPU3050_RANGE              (2000.f * RAD_P_DEG)
    164 #define GYRO_MPU3050_RESOLUTION         (2000.f / 32768.f * RAD_P_DEG)
    165 #define GYRO_MPU3050_POWER              (6.1f)
    166 #define GYRO_MPU3050_MINDELAY           (1000)
    167 //GYRO MPU6050
    168 #define GYRO_MPU6050_RANGE              (2000.f * RAD_P_DEG)
    169 #define GYRO_MPU6050_RESOLUTION         (2000.f / 32768.f * RAD_P_DEG)
    170 #define GYRO_MPU6050_POWER              (5.5f)
    171 #define GYRO_MPU6050_MINDELAY           (1000)
    172 //GYRO MPU9150
    173 #define GYRO_MPU9150_RANGE              (2000.f * RAD_P_DEG)
    174 #define GYRO_MPU9150_RESOLUTION         (2000.f / 32768.f * RAD_P_DEG)
    175 #define GYRO_MPU9150_POWER              (5.5f)
    176 #define GYRO_MPU9150_MINDELAY           (1000)
    177 //GYRO MPU9250
    178 #define GYRO_MPU9250_RANGE              (2000.f * RAD_P_DEG)
    179 #define GYRO_MPU9250_RESOLUTION         (2000.f / 32768.f * RAD_P_DEG)
    180 #define GYRO_MPU9250_POWER              (5.5f)
    181 #define GYRO_MPU9250_MINDELAY           (1000)
    182 //GYRO MPU6500
    183 #define GYRO_MPU6500_RANGE              (2000.f * RAD_P_DEG)
    184 #define GYRO_MPU6500_RESOLUTION         (2000.f / 32768.f * RAD_P_DEG)
    185 #define GYRO_MPU6500_POWER              (5.5f)
    186 #define GYRO_MPU6500_MINDELAY           (1000)
    187 //GYRO ITG3500
    188 #define GYRO_ITG3500_RANGE              (2000.f * RAD_P_DEG)
    189 #define GYRO_ITG3500_RESOLUTION         (2000.f / 32768.f * RAD_P_DEG)
    190 #define GYRO_ITG3500_POWER              (5.5f)
    191 #define GYRO_ITG3500_MINDELAY           (1000)
    192 
    193 #endif  /* INV_SENSOR_PARAMS_H */
    194 
    195