Developer World
Spresense SDK Library v3.3.0-375c679
tap.h File Reference
#include <sys/time.h>

Go to the source code of this file.

Classes

struct  ST_TAP_OPEN
 Coefficient required for tap detection. More...
 
struct  ST_TAP_ACCEL
 accel data More...
 
class  TapClass
 

Macros

#define TAP_BUF_LEN   16
 Maximum number of data of accel sensor to save.
 
#define D_SA_STATUS_OK   0
 [Error Code] OK
 
#define D_SA_STATUS_E_INVALID_ARGS   -1
 [Error Code] Invalid argument
 
#define D_SA_STATUS_E_UNEXPECTED   -8
 [Error Code] Unexpected error
 
#define SEC_PER_US   1000000
 second -> microsecond
 
#define NS_PER_US   1000
 nanosecond -> microsecond
 

Enumerations

enum  E_TAP_STATE { E_TAP_STATE_IDLE = 0 , E_TAP_STATE_TAP }
 tap status More...
 

Functions

TapClassTapCreate (void)
 Create TapClass instance. return Address for instance of TapClass.
 
int TapOpen (FAR TapClass *ins, FAR ST_TAP_OPEN *OpenParam)
 Set coefficients necessary for parameter initialization and tap detection. More...
 
int TapClose (FAR TapClass *ins)
 None. More...
 
int TapWrite (FAR TapClass *ins, FAR ST_TAP_ACCEL *accelData)
 Detect tap. More...
 
int TapWrite_timestamp (FAR TapClass *ins, FAR ST_TAP_ACCEL *accelData, uint64_t time_stamp)
 Detect tap. More...