15#ifndef _MiniR4_MXGesture_H_
16#define _MiniR4_MXGesture_H_
22#define ADDR_PCA954X 0x70
32 Serial.print(__FUNCTION__); \
33 Serial.print("(): "); \
34 Serial.print(__LINE__); \
35 Serial.print(" ] "); \
36 Serial.println(__VA_ARGS__); \
43#define PAJ7620_IIC_ADDR 0x73
44#define PAJ7620_PARTID 0x7620
47#define PAJ7620_REGITER_BANK_SEL (0xEF)
50#define PAJ7620_ADDR_PART_ID_LOW 0x00
51#define PAJ7620_ADDR_PART_ID_HIGH 0x01
52#define PAJ7620_ADDR_VERSION_ID 0x01
53#define PAJ7620_ADDR_SUSPEND_CMD 0x03
54#define PAJ7620_ADDR_GES_PS_DET_MASK_0 0x41
55#define PAJ7620_ADDR_GES_PS_DET_MASK_1 0x42
56#define PAJ7620_ADDR_GES_PS_DET_FLAG_0 0x43
57#define PAJ7620_ADDR_GES_PS_DET_FLAG_1 0x44
58#define PAJ7620_ADDR_STATE_INDICATOR 0x45
59#define PAJ7620_ADDR_PS_HIGH_THRESHOLD 0x69
60#define PAJ7620_ADDR_PS_LOW_THRESHOLD 0x6A
61#define PAJ7620_ADDR_PS_APPROACH_STATE 0x6B
62#define PAJ7620_ADDR_PS_RAW_DATA 0x6C
65#define PAJ7620_ADDR_PS_GAIN 0x44
66#define PAJ7620_ADDR_IDLE_S1_STEP_0 0x67
67#define PAJ7620_ADDR_IDLE_S1_STEP_1 0x68
68#define PAJ7620_ADDR_IDLE_S2_STEP_0 0x69
69#define PAJ7620_ADDR_IDLE_S2_STEP_1 0x6A
70#define PAJ7620_ADDR_OP_TO_S1_STEP_0 0x6B
71#define PAJ7620_ADDR_OP_TO_S1_STEP_1 0x6C
72#define PAJ7620_ADDR_OP_TO_S2_STEP_0 0x6D
73#define PAJ7620_ADDR_OP_TO_S2_STEP_1 0x6E
74#define PAJ7620_ADDR_OPERATION_ENABLE 0x72
76#define PAJ7620_BANK0 0
77#define PAJ7620_BANK1 1
80#define PAJ7620_I2C_WAKEUP 0x01
81#define PAJ7620_I2C_SUSPEND 0x00
84#define PAJ7620_ENABLE 0x01
85#define PAJ7620_DISABLE 0x00
87#define GES_REACTION_TIME 50
88#define GES_ENTRY_TIME 2000
89#define GES_QUIT_TIME 1000
92#define ERR_DATA_BUS -1
93#define ERR_IC_VERSION -2
220 void writeReg(uint8_t reg,
const void* pBuf,
size_t size);
230 uint8_t readReg(uint8_t reg,
void* pBuf,
size_t size);
233 static const uint8_t initRegisterArray[219][2];
240 bool _gestureHighRate =
true;
A class for MATRIX Gesture Seneor.
String gestureDescription(int gesture)
Get the string descritpion corresponding to the gesture number.
eRateMode_t
Gesture Update Rate.
void setGestureHighRate(bool b)
Set gesture detection mode.
int getGesture(void)
Get gesture.
eGesture_t
gesture information
@ eGestureWaveSlowlyUpDown
@ eGestureWaveSlowlyDisorder
@ eGestureWaveSlowlyForwardBackward
@ eGestureWaveSlowlyLeftRight
int begin(void)
init function