• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 xu
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 PROXIMITY_APDS9960_H
10 #define PROXIMITY_APDS9960_H
11 
12 #include "sensor_config_parser.h"
13 #include "sensor_proximity_driver.h"
14 
15 #define APDS9960_PROXIMITY_DATA_ADDR              0X9C    // Proximity Data
16 
17 #define APDS9960_PROXIMITY_THRESHOLD               7    // threshold
18 
19 int32_t DetectProximityApds9960Chip(struct SensorCfgData *data);
20 int32_t ReadApds9960Data(struct SensorCfgData *data);
21 
22 struct Apds9960DrvData {
23     struct IDeviceIoService ioService;
24     struct HdfDeviceObject *device;
25     struct SensorCfgData *sensorCfg;
26 };
27 
28 #endif /* PROXIMITY_APDS9960_H */