summaryrefslogtreecommitdiffstats
path: root/AK8975_FS/akmdfs/AKFS_APIs.h
diff options
context:
space:
mode:
authorTsuyoshi Masuda <masuda.tv@om.asahi-kasei.co.jp>2012-09-28 15:02:55 +0900
committerTsuyoshi Masuda <masuda.tv@om.asahi-kasei.co.jp>2012-09-28 15:02:55 +0900
commitab17e987e7f5371df91fe4e137fcf9041489ffdf (patch)
treeb44566d63506ba4704c0bd7cfc7a1c5afbc0a503 /AK8975_FS/akmdfs/AKFS_APIs.h
parent6f701daf0b67ef38f1ba1700984ec78134669cd0 (diff)
downloadandroid_hardware_akm-ab17e987e7f5371df91fe4e137fcf9041489ffdf.tar.gz
android_hardware_akm-ab17e987e7f5371df91fe4e137fcf9041489ffdf.tar.bz2
android_hardware_akm-ab17e987e7f5371df91fe4e137fcf9041489ffdf.zip
AKM sensor code for AK8975
This package includes the following components. 1) Sensor Control Program (AK8975_FS/akmdfs) Source code of Daemon program to control sensor and to output calculated value. 2) Sensor HAL Module (AK8975_FS/libsensors) This is a sample implementation of HAL module, which can be connected to SensorManager. Change-Id: If68fdbfb5c4133a34f48445a5a1769f2f6eab771 Signed-off-by: Tsuyoshi Masuda <masuda.tv@om.asahi-kasei.co.jp>
Diffstat (limited to 'AK8975_FS/akmdfs/AKFS_APIs.h')
-rw-r--r--AK8975_FS/akmdfs/AKFS_APIs.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/AK8975_FS/akmdfs/AKFS_APIs.h b/AK8975_FS/akmdfs/AKFS_APIs.h
new file mode 100644
index 0000000..32076b8
--- /dev/null
+++ b/AK8975_FS/akmdfs/AKFS_APIs.h
@@ -0,0 +1,70 @@
+/******************************************************************************
+ * $Id: AKFS_APIs.h 580 2012-03-29 09:56:21Z yamada.rj $
+ ******************************************************************************
+ *
+ * Copyright (C) 2012 Asahi Kasei Microdevices Corporation, Japan
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef AKFS_INC_APIS_H
+#define AKFS_INC_APIS_H
+
+/* Include files for AK8975 library. */
+#include "AKFS_Compass.h"
+
+/*** Constant definition ******************************************************/
+#define AKFS_GEOMAG_MAX 70
+
+/*** Type declaration *********************************************************/
+
+/*** Global variables *********************************************************/
+
+/*** Prototype of function ****************************************************/
+int16 AKFS_Init(
+ const AKFS_PATNO hpat,
+ const uint8 regs[]
+);
+
+int16 AKFS_Release(void);
+
+int16 AKFS_Start(const char* path);
+
+int16 AKFS_Stop(const char* path);
+
+int16 AKFS_Get_MAGNETIC_FIELD(
+ const int16 mag[3],
+ const int16 status,
+ AKFLOAT* vx,
+ AKFLOAT* vy,
+ AKFLOAT* vz,
+ int16* accuracy
+);
+
+int16 AKFS_Get_ACCELEROMETER(
+ const int16 acc[3],
+ const int16 status,
+ AKFLOAT* vx,
+ AKFLOAT* vy,
+ AKFLOAT* vz,
+ int16* accuracy
+);
+
+int16 AKFS_Get_ORIENTATION(
+ AKFLOAT* azimuth,
+ AKFLOAT* pitch,
+ AKFLOAT* roll,
+ int16* accuracy
+);
+
+#endif
+