Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: BLE_Nano_MPU6050Service
Diff: MPU6050.cpp
- Revision:
- 4:5a52b575fbc6
- Parent:
- 3:a6e53ab2c8c0
- Child:
- 5:5739a7a6d0e9
--- a/MPU6050.cpp Wed Jul 22 12:20:10 2015 +0000
+++ b/MPU6050.cpp Wed Jul 22 13:20:30 2015 +0000
@@ -1253,7 +1253,7 @@
uint8_t tmp;
if (this->read(REG_PWR_MGMT_2, &tmp, timeout_secs))
{
- *clockSource = static_cast<ClockSource>(tmp & WAKE_FREQ_MASK);
+ *wakeFrequency = static_cast<WakeFrequency>(tmp & WAKE_FREQ_MASK);
return true;
}
@@ -1263,7 +1263,7 @@
bool MPU6050::setWakeFrequency(WakeFrequency wakeFrequency, float timeout_secs)
{
uint8_t tmp;
- return (this->read(REG_PWR_MGMT_2, &tmp, timeout_secs)) && (this->write(REG_PWR_MGMT_2, (tmp & (~WAKE_FREQ_MASK)) | clockSource, timeout_secs));
+ return (this->read(REG_PWR_MGMT_2, &tmp, timeout_secs)) && (this->write(REG_PWR_MGMT_2, (tmp & (~WAKE_FREQ_MASK)) | wakeFrequency, timeout_secs));
}
bool MPU6050::getGyroXStandbyEnabled(bool *enabled, float timeout_secs)
@@ -1431,7 +1431,7 @@
return this->read(REG_FIFO_R_W, data, lenght, timeout_secs);
}
-bool MPU6050::writeFIFO(uint8_t data, size_t lenght, float timeout_secs)
+bool MPU6050::writeFIFO(uint8_t *data, size_t lenght, float timeout_secs)
{
return this->write(REG_FIFO_R_W, data, lenght, timeout_secs);
}
