19 #ifndef UBUNTU_APPLICATION_SENSORS_GYROSCOPE_H_ 20 #define UBUNTU_APPLICATION_SENSORS_GYROSCOPE_H_ 60 UASensorsGyroscope* sensor);
70 UASensorsGyroscope* sensor);
80 UASensorsGyroscope* sensor);
90 UASensorsGyroscope* sensor,
101 UASensorsGyroscope* sensor,
112 UASensorsGyroscope* sensor,
124 UASensorsGyroscope* sensor,
137 UASensorsGyroscope* sensor,
144 #endif // UBUNTU_APPLICATION_SENSORS_GYROSCOPE_H_ UBUNTU_DLL_PUBLIC UASensorsGyroscope * ua_sensors_gyroscope_new()
Create a new object for accessing the gyroscopic sensor.
void(* on_gyroscope_event_cb)(UASGyroscopeEvent *event, void *context)
Callback type used by applications to subscribe to orientation events.
UbuntuStatus
Indicates the status of an operation.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_gyroscope_set_event_rate(UASensorsGyroscope *sensor, uint32_t rate)
Set the sensor event delivery rate in nanoseconds..
UBUNTU_DLL_PUBLIC UStatus ua_sensors_gyroscope_get_max_value(UASensorsGyroscope *sensor, float *value)
Queries the maximum value that can be reported by the sensor.
UBUNTU_DLL_PUBLIC uint32_t ua_sensors_gyroscope_get_min_delay(UASensorsGyroscope *sensor)
Queries the minimum delay between two readings for the supplied sensor.
void UASGyroscopeEvent
Opaque type describing a gyroscope reading.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_gyroscope_get_resolution(UASensorsGyroscope *sensor, float *value)
Queries the numeric resolution supported by the sensor.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_gyroscope_get_min_value(UASensorsGyroscope *sensor, float *value)
Queries the minimum value that can be reported by the sensor.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_gyroscope_enable(UASensorsGyroscope *sensor)
Enables the supplied gyroscopic sensor.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_gyroscope_disable(UASensorsGyroscope *sensor)
Disables the supplied gyroscopic sensor.
#define UBUNTU_DLL_PUBLIC
void UASensorsGyroscope
Opaque type that models the gyroscope.
UBUNTU_DLL_PUBLIC void ua_sensors_gyroscope_set_reading_cb(UASensorsGyroscope *sensor, on_gyroscope_event_cb cb, void *ctx)
Set the callback to be invoked whenever a new sensor reading is available.