39#ifndef __INCLUDE_SENSING_TAP_H
40#define __INCLUDE_SENSING_TAP_H
76#define D_SA_STATUS_OK 0
82#define D_SA_STATUS_E_INVALID_ARGS -1
88#define D_SA_STATUS_E_UNEXPECTED -8
94#define SEC_PER_US 1000000
100#define NS_PER_US 1000
211 float calcR(
int i0,
int j0);
212 bool detect(
float x,
float y,
float z);
213 float getIndex(
int idx);
259 uint64_t time_stamp);
E_TAP_STATE
tap status
Definition: tap.h:117
@ E_TAP_STATE_IDLE
Definition: tap.h:118
@ E_TAP_STATE_TAP
Definition: tap.h:119
#define TAP_BUF_LEN
Maximum number of data of accel sensor to save.
Definition: tap.h:70
int TapClose(FAR TapClass *ins)
None.
int TapOpen(FAR TapClass *ins, FAR ST_TAP_OPEN *OpenParam)
Set coefficients necessary for parameter initialization and tap detection.
TapClass * TapCreate(void)
Create TapClass instance. return Address for instance of TapClass.
int TapWrite(FAR TapClass *ins, FAR ST_TAP_ACCEL *accelData)
Detect tap.
int TapWrite_timestamp(FAR TapClass *ins, FAR ST_TAP_ACCEL *accelData, uint64_t time_stamp)
Detect tap.
accel data
Definition: tap.h:149
float accel_x
Definition: tap.h:150
float accel_z
Definition: tap.h:152
float accel_y
Definition: tap.h:151
Coefficient required for tap detection.
Definition: tap.h:131
int stab_frame
Definition: tap.h:139
float long_thres
Definition: tap.h:136
float tap_period
Definition: tap.h:132