1 /*
2  * Copyright (c) 2022 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #ifndef PEDOMETER_BMI160_H
10 #define PEDOMETER_BMI160_H
11 
12 #include "sensor_pedometer_driver.h"
13 #include "sensor_config_parser.h"
14 
15 #define PEDOMETER_TEST_NUM                   1000
16 
17 /* PEDOMETER DATA REGISTERS ADDR */
18 #define BMI160_PEDOMETER_LSB_ADDR            0x78
19 #define BMI160_PEDOMETER_MSB_ADDR            0x79
20 #define BMI160_STATUS_ADDR                   0x1B
21 
22 /* PEDOMETER DATA READY */
23 #define BMI160_PEDOMETER_DATA_READY_MASK     0x80
24 
25 int32_t DetectPedometerBim160Chip(struct SensorCfgData *data);
26 struct Bmi160DrvData {
27     struct IDeviceIoService ioService;
28     struct HdfDeviceObject *device;
29     struct SensorCfgData *sensorCfg;
30 };
31 
32 #endif /* PEDOMETER_BMI160_H */
33