File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments