diff options
Diffstat (limited to 'include/android')
-rw-r--r-- | include/android/configuration.h | 1 | ||||
-rw-r--r-- | include/android/keycodes.h | 2 | ||||
-rw-r--r-- | include/android/looper.h | 2 | ||||
-rw-r--r-- | include/android/sensor.h | 22 |
4 files changed, 26 insertions, 1 deletions
diff --git a/include/android/configuration.h b/include/android/configuration.h index 6d8784d..97d4c42 100644 --- a/include/android/configuration.h +++ b/include/android/configuration.h @@ -83,6 +83,7 @@ enum { ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03, ACONFIGURATION_UI_MODE_TYPE_TELEVISION = 0x04, ACONFIGURATION_UI_MODE_TYPE_APPLIANCE = 0x05, + ACONFIGURATION_UI_MODE_TYPE_WATCH = 0x06, ACONFIGURATION_UI_MODE_NIGHT_ANY = 0x00, ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1, diff --git a/include/android/keycodes.h b/include/android/keycodes.h index 1ca1332..b6a5f4c 100644 --- a/include/android/keycodes.h +++ b/include/android/keycodes.h @@ -266,6 +266,8 @@ enum { AKEYCODE_BRIGHTNESS_DOWN = 220, AKEYCODE_BRIGHTNESS_UP = 221, AKEYCODE_MEDIA_AUDIO_TRACK = 222, + AKEYCODE_SLEEP = 223, + AKEYCODE_WAKEUP = 224, // NOTE: If you add a new keycode here you must also add it to several other files. // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list. diff --git a/include/android/looper.h b/include/android/looper.h index 24e3967..74c0383 100644 --- a/include/android/looper.h +++ b/include/android/looper.h @@ -253,4 +253,4 @@ int ALooper_removeFd(ALooper* looper, int fd); }; #endif -#endif // ANDROID_NATIVE_WINDOW_H +#endif // ANDROID_LOOPER_H diff --git a/include/android/sensor.h b/include/android/sensor.h index 129ea3e..b71bccb 100644 --- a/include/android/sensor.h +++ b/include/android/sensor.h @@ -66,6 +66,7 @@ enum { * Sensor accuracy measure */ enum { + ASENSOR_STATUS_NO_CONTACT = -1, ASENSOR_STATUS_UNRELIABLE = 0, ASENSOR_STATUS_ACCURACY_LOW = 1, ASENSOR_STATUS_ACCURACY_MEDIUM = 2, @@ -130,6 +131,11 @@ typedef struct AUncalibratedEvent { }; } AUncalibratedEvent; +typedef struct AHeartRateEvent { + float bpm; + int8_t status; +} AHeartRateEvent; + /* NOTE: Must match hardware/sensors.h */ typedef struct ASensorEvent { int32_t version; /* sizeof(struct ASensorEvent) */ @@ -151,6 +157,7 @@ typedef struct ASensorEvent { AUncalibratedEvent uncalibrated_gyro; AUncalibratedEvent uncalibrated_magnetic; AMetaDataEvent meta_data; + AHeartRateEvent heart_rate; }; union { uint64_t data[8]; @@ -281,6 +288,21 @@ float ASensor_getResolution(ASensor const* sensor); */ int ASensor_getMinDelay(ASensor const* sensor); +/* + * Returns the maximum size of batches for this sensor. Batches will often be + * smaller, as the hardware fifo might be used for other sensors. + */ +int ASensor_getFifoMaxEventCount(ASensor const* sensor); + +/* + * Returns the hardware batch fifo size reserved to this sensor. + */ +int ASensor_getFifoReservedEventCount(ASensor const* sensor); + +/* + * Returns this sensor's string type. + */ +const char* ASensor_getStringType(ASensor const* sensor); #ifdef __cplusplus }; |