Modified for compatibility with Rev.E. hardware
Fork of AkmSensor by
Diff: akmakd.cpp
- Revision:
- 16:d85be9bafb80
- Parent:
- 15:1238993fd75f
- Child:
- 18:b7182d5ad8d5
diff -r 1238993fd75f -r d85be9bafb80 akmakd.cpp --- a/akmakd.cpp Fri Oct 28 21:27:33 2016 +0000 +++ b/akmakd.cpp Wed Jan 04 00:52:30 2017 +0000 @@ -218,17 +218,17 @@ subId == AkmAkd::SUB_ID_AK09912C || subId == AkmAkd::SUB_ID_AK09915C ) ){ // Push-Pull DRDY - drdy->rise(this, &AkmAkd::detectDRDY); + drdy->rise(callback(this, &AkmAkd::detectDRDY)); } else if( primaryId == AKM_PRIMARY_ID_AKD_I2C && (subId == AkmAkd::SUB_ID_AK09915D || subId == AkmAkd::SUB_ID_AK09916D ) ){ // Open Drain DRDY - drdy->fall(this, &AkmAkd::detectDRDY); + drdy->fall(callback(this, &AkmAkd::detectDRDY)); } else{ // No DRDY - ticker.attach(this, &AkmAkd::checkDRDY, 0.005); // 200Hz + ticker.attach(callback(this, &AkmAkd::checkDRDY), 0.005); // 200Hz } // set operation mode