accelerometer.h
Go to the documentation of this file.
/*
* Copyright © 2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Authored by: Ricardo Mendoza <ricardo.mendoza@canonical.com>
*/
#ifndef UBUNTU_APPLICATION_SENSORS_ACCELEROMETER_EVENT_H_
#define UBUNTU_APPLICATION_SENSORS_ACCELEROMETER_EVENT_H_
#include <ubuntu/visibility.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef void UASAccelerometerEvent;
UBUNTU_DLL_PUBLIC uint64_t
uas_accelerometer_event_get_timestamp(
UASAccelerometerEvent* event);
UBUNTU_DLL_PUBLIC UStatus
uas_accelerometer_event_get_acceleration_x(
UASAccelerometerEvent* event,
float* value);
UBUNTU_DLL_PUBLIC UStatus
uas_accelerometer_event_get_acceleration_y(
UASAccelerometerEvent* event,
float* value);
UBUNTU_DLL_PUBLIC UStatus
uas_accelerometer_event_get_acceleration_z(
UASAccelerometerEvent* event,
float* value);
#ifdef __cplusplus
}
#endif
#endif /* UBUNTU_APPLICATION_SENSORS_ACCELEROMETER_EVENT_H_ */
uas_accelerometer_event_get_timestamp
UBUNTU_DLL_PUBLIC uint64_t uas_accelerometer_event_get_timestamp(UASAccelerometerEvent *event)
Query the timestamp of the sensor reading.
uas_accelerometer_event_get_acceleration_z
UBUNTU_DLL_PUBLIC UStatus uas_accelerometer_event_get_acceleration_z(UASAccelerometerEvent *event, float *value)
Query the acceleration in z-axis direction.
UbuntuStatus
UbuntuStatus
Indicates the status of an operation.
Definition: status.h:26
uas_accelerometer_event_get_acceleration_y
UBUNTU_DLL_PUBLIC UStatus uas_accelerometer_event_get_acceleration_y(UASAccelerometerEvent *event, float *value)
Query the acceleration in y-axis direction.
uas_accelerometer_event_get_acceleration_x
UBUNTU_DLL_PUBLIC UStatus uas_accelerometer_event_get_acceleration_x(UASAccelerometerEvent *event, float *value)
Query the acceleration in x-axis direction.
visibility.h
UASAccelerometerEvent
void UASAccelerometerEvent
Opaque type describing an accelerometer reading.
Definition: accelerometer.h:34
UBUNTU_DLL_PUBLIC
#define UBUNTU_DLL_PUBLIC
Definition: visibility.h:26