Skip to content

Commit ce584a8

Browse files
committed
Update comments
1 parent 0393080 commit ce584a8

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/dev/mpr121.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,9 @@ class Mpr121
131131

132132
WriteRegister(MPR121_ECR, 0x0);
133133

134-
// this doesn't work for some reason...
135-
// uint8_t c = ReadRegister8(MPR121_CONFIG2);
134+
uint8_t c = ReadRegister8(MPR121_CONFIG2);
136135

137-
// if(c != 0x24)
138-
// return ERR;
136+
if (c != 0x24) return ERR;
139137

140138
SetThresholds(config_.touch_threshold, config_.release_threshold);
141139
WriteRegister(MPR121_MHDR, 0x01);
@@ -168,7 +166,7 @@ class Mpr121
168166
// enable X electrodes and start MPR121
169167
uint8_t ECR_SETTING
170168
= 0x80
171-
+ 12; // 5 bits for baseline tracking & proximity disabled + X
169+
+ 12; // enable baseline tracking (10) & disable proximity (00) + X
172170
// amount of electrodes running (12)
173171
WriteRegister(MPR121_ECR,
174172
ECR_SETTING); // start with above ECR setting

0 commit comments

Comments
 (0)