|
板凳
楼主 |
发表于 2016-10-12 15:14:28
|
只看该作者
使用mm可以编译,但是报错了,查了下adxl提供的文件太久远了,2013年的,结构体参数都不一样了,即使在android4.2源码里面也没有找到。。。
Import includes file: out/target/product/myimx6ek_6dq/obj/SHARED_LIBRARIES/sensors.default_intermediates/import_includes
target thumb C: sensors.default <= hardware/sensors/sensors_adxl34x.c
hardware/sensors/sensors_adxl34x.c:77:34: error: field 'device' has incomplete type
struct sensors_control_device_t device;
^
hardware/sensors/sensors_adxl34x.c:83:31: error: field 'device' has incomplete type
struct sensors_data_device_t device;
^
hardware/sensors/sensors_adxl34x.c:85:2: error: unknown type name 'sensors_data_t'
sensors_data_t sensors[MAX_NUM_SENSORS];
^
hardware/sensors/sensors_adxl34x.c: In function 'open_sensors_phy':
hardware/sensors/sensors_adxl34x.c:117:4: warning: implicit declaration of function 'LOGE' [-Wimplicit-function-declaration]
LOGE("Couldn't open %s, error = %d", devname, fd);
^
hardware/sensors/sensors_adxl34x.c:132:4: warning: implicit declaration of function 'LOGD' [-Wimplicit-function-declaration]
LOGD("using %s (name=%s)", devname, name);
^
hardware/sensors/sensors_adxl34x.c:91:62: warning: unused parameter 'dev' [-Wunused-parameter]
static int open_sensors_phy(struct sensors_control_device_t *dev, int keep_open)
^
hardware/sensors/sensors_adxl34x.c: In function 'sensors_get_list':
hardware/sensors/sensors_adxl34x.c:194:54: warning: unused parameter 'module' [-Wunused-parameter]
static int sensors_get_list(struct sensors_module_t *module,
^
hardware/sensors/sensors_adxl34x.c: In function 'control_set_delay':
hardware/sensors/sensors_adxl34x.c:258:64: warning: unused parameter 'dev' [-Wunused-parameter]
static int control_set_delay(struct sensors_control_context_t *dev, int32_t ms)
^
hardware/sensors/sensors_adxl34x.c: In function 'control_wake':
hardware/sensors/sensors_adxl34x.c:293:3: warning: implicit declaration of function 'LOGD_IF' [-Wimplicit-function-declaration]
LOGD_IF(err < 0, "control__wake, err=%d (%s)", errno, strerror(errno));
^
hardware/sensors/sensors_adxl34x.c:283:59: warning: unused parameter 'dev' [-Wunused-parameter]
static int control_wake(struct sensors_control_context_t *dev)
^
hardware/sensors/sensors_adxl34x.c: In function 'sensors__data_open':
hardware/sensors/sensors_adxl34x.c:318:18: error: request for member 'vector' in something not a structure or union
dev->sensors.vector.status = SENSOR_STATUS_ACCURACY_HIGH;
^
hardware/sensors/sensors_adxl34x.c: At top level:
hardware/sensors/sensors_adxl34x.c:339:67: error: unknown type name 'sensors_data_t'
static int sensors__data_poll(struct sensors_data_context_t *dev, sensors_data_t * values)
^
hardware/sensors/sensors_adxl34x.c: In function 'open_sensors':
hardware/sensors/sensors_adxl34x.c:413:20: error: 'SENSORS_HARDWARE_CONTROL' undeclared (first use in this function)
if (!strcmp(name, SENSORS_HARDWARE_CONTROL)) {
^
hardware/sensors/sensors_adxl34x.c:413:20: note: each undeclared identifier is reported only once for each function it appears in
hardware/sensors/sensors_adxl34x.c:427:27: error: 'SENSORS_HARDWARE_DATA' undeclared (first use in this function)
} else if (!strcmp(name, SENSORS_HARDWARE_DATA)) {
^
hardware/sensors/sensors_adxl34x.c:438:22: error: 'sensors__data_poll' undeclared (first use in this function)
dev->device.poll = sensors__data_poll;
|
|