X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=enumeration.h;h=c8ef2eb38c26ee4e86736736651d07cd815ab422;hb=a1f77941c182b0d017bb0b2519738803fc0ba1c0;hp=fa79166ccf8eb03d38007177fd2481f6069d6115;hpb=493c5eb55b080599fab798ffe1601e763ac4b3b6;p=android-x86%2Fhardware-intel-libsensors.git diff --git a/enumeration.h b/enumeration.h index fa79166..c8ef2eb 100644 --- a/enumeration.h +++ b/enumeration.h @@ -7,49 +7,17 @@ #include "common.h" -/* - * Macros associating iio sysfs entries to to sensor types ; see - * linux/kernel/drivers/iio/industrialio-core.c and - * hardware/libhardware/include/hardware/sensor.h - */ - -#define DECLARE_VOID_CHANNEL(tag) \ - tag, \ - "", \ - "", \ - "", \ - "", \ - "", \ - "", \ - -#define DECLARE_CHANNEL(tag, spacer, name) \ - name, \ - "in_"tag spacer name"_en", \ - "in_"tag spacer name"_type", \ - "in_"tag spacer name"_index", \ - "in_"tag spacer name"_raw", \ - "in_"tag spacer name"_input", \ - "in_"tag spacer name"_scale", \ - 0, {{0}}, - -#define DECLARE_NAMED_CHANNEL(tag, name) DECLARE_CHANNEL(tag, "_", name) - -#define DECLARE_GENERIC_CHANNEL(tag) DECLARE_CHANNEL(tag, "", "") - -#define DECLARE_EVENT(tag, spacer1, name, spacer2, type, spacer3, dir) \ - type, dir, \ - "in_"tag spacer1 name spacer2 type spacer3 dir"_en", \ - "in_"tag spacer1 name spacer2 type spacer3 dir"_value", \ - -#define DECLARE_GENERIC_EVENT(tag, name, type, dir) \ - DECLARE_EVENT(tag, "_", name, "_", type, "_", dir) -#define DECLARE_NAMED_EVENT(tag, name) \ - DECLARE_EVENT(tag, "_", name, "","","","") - int get_sensors_list (struct sensors_module_t* module, struct sensor_t const** list); void enumerate_sensors (void); void delete_enumeration_data (void); +/* + * These are fine-grained type definitions that are used internally, in the sensor array, but mapped to an Android sensor type in the processing pipeline. + * The sensor array uses these, not the desc array. + */ +#define SENSOR_TYPE_INTERNAL_ILLUMINANCE -1 /* Global illuminance, in lux */ +#define SENSOR_TYPE_INTERNAL_INTENSITY -2 /* Global intensity, in sensor specific units */ + #endif