76 lines
2.6 KiB
C
Executable File
76 lines
2.6 KiB
C
Executable File
/* --------------------------------------------------------------------------------------------------------
|
|
* Copyright(C), 2010-2011, Fuzhou Rockchip Co., Ltd. All Rights Reserved.
|
|
*
|
|
* File: Acc_mma8452.h
|
|
*
|
|
* Desc:
|
|
*
|
|
* -----------------------------------------------------------------------------------
|
|
* < ϰÓï ºÍ ËõÂÔÓï > :
|
|
*
|
|
* -----------------------------------------------------------------------------------
|
|
* Usage:
|
|
*
|
|
* Note:
|
|
*
|
|
* Author: ChenZhen
|
|
*
|
|
* --------------------------------------------------------------------------------------------------------
|
|
* Version:
|
|
* v1.0
|
|
* --------------------------------------------------------------------------------------------------------
|
|
* Log:
|
|
*
|
|
* --------------------------------------------------------------------------------------------------------
|
|
*/
|
|
|
|
|
|
#ifndef __ACC_MMA8452_H__
|
|
#define __ACC_MMA8452_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* ---------------------------------------------------------------------------------------------------------
|
|
* Include Files
|
|
* ---------------------------------------------------------------------------------------------------------
|
|
*/
|
|
#include "AKCommon.h"
|
|
|
|
/* ---------------------------------------------------------------------------------------------------------
|
|
* Macros Definition
|
|
* ---------------------------------------------------------------------------------------------------------
|
|
*/
|
|
|
|
|
|
/* ---------------------------------------------------------------------------------------------------------
|
|
* Types and Structures Definition
|
|
* ---------------------------------------------------------------------------------------------------------
|
|
*/
|
|
|
|
|
|
/* ---------------------------------------------------------------------------------------------------------
|
|
* Global Functions' Prototype
|
|
* ---------------------------------------------------------------------------------------------------------
|
|
*/
|
|
int16_t Acc_InitDevice(void);
|
|
void Acc_DeinitDevice(void);
|
|
int16_t Acc_GetAccData(int16_t fData[3]);
|
|
int16_t Acc_SetEnable(const int8_t enabled);
|
|
int16_t Acc_SetDelay(const int64_t ns);
|
|
int16_t Acc_GetAccOffset(int16_t offset[3]);
|
|
void Acc_GetAccVector(const int16_t data[3], const int16_t offset[3], int16_t vec[3]);
|
|
|
|
/* ---------------------------------------------------------------------------------------------------------
|
|
* Inline Functions Implementation
|
|
* ---------------------------------------------------------------------------------------------------------
|
|
*/
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __ACC_MMA8452_H__ */
|
|
|