17 #ifndef UBUNTU_APPLICATION_SENSORS_MAGNETIC_H_ 18 #define UBUNTU_APPLICATION_SENSORS_MAGNETIC_H_ 58 UASensorsMagnetic* sensor);
68 UASensorsMagnetic* sensor);
78 UASensorsMagnetic* sensor);
88 UASensorsMagnetic* sensor,
99 UASensorsMagnetic* sensor,
110 UASensorsMagnetic* sensor,
122 UASensorsMagnetic* sensor,
135 UASensorsMagnetic* sensor,
void UASMagneticEvent
Opaque type describing a magnetic field reading.
UBUNTU_DLL_PUBLIC uint32_t ua_sensors_magnetic_get_min_delay(UASensorsMagnetic *sensor)
Queries the minimum delay between two readings for the supplied sensor.
UbuntuStatus
Indicates the status of an operation.
void(* on_magnetic_event_cb)(UASMagneticEvent *event, void *context)
Callback type used by applications to subscribe to magnetic sensor events.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_magnetic_get_min_value(UASensorsMagnetic *sensor, float *value)
Queries the minimum value that can be reported by the sensor.
UBUNTU_DLL_PUBLIC void ua_sensors_magnetic_set_reading_cb(UASensorsMagnetic *sensor, on_magnetic_event_cb cb, void *ctx)
Set the callback to be invoked whenever a new sensor reading is available.
void UASensorsMagnetic
Opaque type that models the Magnetic field.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_magnetic_set_event_rate(UASensorsMagnetic *sensor, uint32_t rate)
Set the sensor event delivery rate in nanoseconds..
UBUNTU_DLL_PUBLIC UStatus ua_sensors_magnetic_get_resolution(UASensorsMagnetic *sensor, float *value)
Queries the numeric resolution supported by the sensor.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_magnetic_enable(UASensorsMagnetic *sensor)
Enables the supplied magnetic field sensor.
#define UBUNTU_DLL_PUBLIC
UBUNTU_DLL_PUBLIC UASensorsMagnetic * ua_sensors_magnetic_new()
Create a new object for accessing the magnetic field sensor.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_magnetic_get_max_value(UASensorsMagnetic *sensor, float *value)
Queries the maximum value that can be reported by the sensor.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_magnetic_disable(UASensorsMagnetic *sensor)
Disables the supplied magnetic field sensor.