12 #include <Utilities.h>
17 #define MPR121_I2CADDR_DEFAULT 0x5A
19 #define MPR121_TOUCHSTATUS_L 0x00
20 #define MPR121_TOUCHSTATUS_H 0x01
21 #define MPR121_FILTDATA_0L 0x04
22 #define MPR121_FILTDATA_0H 0x05
23 #define MPR121_BASELINE_0 0x1E
24 #define MPR121_MHDR 0x2B
25 #define MPR121_NHDR 0x2C
26 #define MPR121_NCLR 0x2D
27 #define MPR121_FDLR 0x2E
28 #define MPR121_MHDF 0x2F
29 #define MPR121_NHDF 0x30
30 #define MPR121_NCLF 0x31
31 #define MPR121_FDLF 0x32
32 #define MPR121_NHDT 0x33
33 #define MPR121_NCLT 0x34
34 #define MPR121_FDLT 0x35
36 #define MPR121_TOUCHTH_0 0x41
37 #define MPR121_RELEASETH_0 0x42
38 #define MPR121_DEBOUNCE 0x5B
39 #define MPR121_CONFIG1 0x5C
40 #define MPR121_CONFIG2 0x5D
41 #define MPR121_CHARGECURR_0 0x5F
42 #define MPR121_CHARGETIME_1 0x6C
43 #define MPR121_ECR 0x5E
44 #define MPR121_AUTOCONFIG0 0x7B
45 #define MPR121_AUTOCONFIG1 0x7C
46 #define MPR121_UPLIMIT 0x7D
47 #define MPR121_LOWLIMIT 0x7E
48 #define MPR121_TARGETLIMIT 0x7F
50 #define MPR121_GPIODIR 0x76
51 #define MPR121_GPIOEN 0x77
52 #define MPR121_GPIOSET 0x78
53 #define MPR121_GPIOCLR 0x79
54 #define MPR121_GPIOTOGGLE 0x7A
56 #define MPR121_SOFTRESET 0x80
64 boolean begin(uint8_t bus = 1, uint8_t i2caddr = MPR121_I2CADDR_DEFAULT);
66 uint16_t filteredData(uint8_t t);
67 uint16_t baselineData(uint8_t t);
69 uint8_t readRegister8(uint8_t reg);
70 uint16_t readRegister16(uint8_t reg);
72 uint16_t touched(
void);
74 void setThresholds(uint8_t touch, uint8_t release);
76 int readI2C() {
return 0; }
void writeRegister(uint8_t reg, uint8_t value)
Writes 8-bits to the specified destination register.
Definition: I2C_MPR121.cpp:168
Definition: I2C_MPR121.h:58