diff options
Diffstat (limited to 'sensors/smdk4210_sensors.c')
-rw-r--r-- | sensors/smdk4210_sensors.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sensors/smdk4210_sensors.c b/sensors/smdk4210_sensors.c index adade2f..d2b19a4 100644 --- a/sensors/smdk4210_sensors.c +++ b/sensors/smdk4210_sensors.c @@ -30,7 +30,6 @@ #include "smdk4210_sensors.h" - /* * Sensors list */ @@ -38,16 +37,18 @@ struct sensor_t smdk4210_sensors[] = { { "K3DH Acceleration Sensor", "STMicroelectronics", 1, SENSOR_TYPE_ACCELEROMETER, SENSOR_TYPE_ACCELEROMETER, 2 * GRAVITY_EARTH, GRAVITY_EARTH / 90.0f / 8.0f, 0.23f, 20000, 0, 0, }, - { "AKM8975 Magnetic Sensor", "Asahi Kasei Microdevices", 1, SENSOR_TYPE_MAGNETIC_FIELD, - SENSOR_TYPE_MAGNETIC_FIELD, 2000.0f, 1.0f / 16, 6.8f, 16667, 0, 0, }, - { "Orientation Sensor", "SMDK4210 Sensors", 1, SENSOR_TYPE_ORIENTATION, - SENSOR_TYPE_ORIENTATION, 360.0f, 0.1f, 0.0f, 16667, 0, 0, }, - { "CM3663 Light Sensor", "Capella Microsystems", 1, SENSOR_TYPE_LIGHT, - SENSOR_TYPE_LIGHT, 10240.0f, 1.0f, 0.75f, 0, 0, 0, }, - { "CM3663 Proximity Sensor", "Capella Microsystems", 1, SENSOR_TYPE_PROXIMITY, - SENSOR_TYPE_PROXIMITY, 6.0f, 6.0f, 0.75f, 0, 0, 0, }, + { "AKM8975C 3-Axis Magnetic Sensor", "Asahi Kasei", 1, SENSOR_TYPE_MAGNETIC_FIELD, + SENSOR_TYPE_MAGNETIC_FIELD, 2000.0f, 1.0f / 16, 6.8f, 16667, 0, 0, SENSOR_STRING_TYPE_MAGNETIC_FIELD, 0, 0, + SENSOR_FLAG_CONTINUOUS_MODE, {}, }, + { "CM3663 Light Sensor", "Capella", 1, SENSOR_TYPE_LIGHT, + SENSOR_TYPE_LIGHT, 10240.0f, 1.0f, 0.75f, 0, 0, 0, SENSOR_STRING_TYPE_LIGHT, 0, 0, + SENSOR_FLAG_ON_CHANGE_MODE, {}, }, + { "CM3663 Proximity Sensor", "Capella", 1, SENSOR_TYPE_PROXIMITY, + SENSOR_TYPE_PROXIMITY, 6.0f, 6.0f, 0.75f, 0, 0, 0, SENSOR_STRING_TYPE_PROXIMITY, 0, 0, + SENSOR_FLAG_WAKE_UP | SENSOR_FLAG_ON_CHANGE_MODE, {}, }, { "K3G Gyroscope Sensor", "STMicroelectronics", 1, SENSOR_TYPE_GYROSCOPE, - SENSOR_TYPE_GYROSCOPE, 500.0f * (3.1415926535f / 180.0f), (70.0f / 4000.0f) * (3.1415926535f / 180.0f), 6.1f, 1190, 0, 0, }, + SENSOR_TYPE_GYROSCOPE, 500.0f * (3.1415926535f / 180.0f), (70.0f / 4000.0f) * (3.1415926535f / 180.0f), 6.1f, 1190, 0, 0, SENSOR_STRING_TYPE_GYROSCOPE, 0, 0, + SENSOR_FLAG_CONTINUOUS_MODE, {}, }, }; int smdk4210_sensors_count = sizeof(smdk4210_sensors) / sizeof(struct sensor_t); @@ -55,7 +56,6 @@ int smdk4210_sensors_count = sizeof(smdk4210_sensors) / sizeof(struct sensor_t); struct smdk4210_sensors_handlers *smdk4210_sensors_handlers[] = { &k3dh, &akm8975, - &orientation, &cm3663_light, &cm3663_proximity, &k3g, @@ -114,7 +114,7 @@ int smdk4210_sensors_set_delay(struct sensors_poll_device_t *dev, int handle, struct smdk4210_sensors_device *device; int i; - ALOGD("%s(%p, %d, %ld)", __func__, dev, handle, (long int) ns); + ALOGD("%s(%p, %d, %" PRId64 ")", __func__, dev, handle, ns); if (dev == NULL) return -EINVAL; @@ -129,7 +129,7 @@ int smdk4210_sensors_set_delay(struct sensors_poll_device_t *dev, int handle, continue; if (device->handlers[i]->handle == handle && device->handlers[i]->set_delay != NULL) - return device->handlers[i]->set_delay(device->handlers[i], (long int) ns); + return device->handlers[i]->set_delay(device->handlers[i], ns); } return 0; |