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: DeepCover Embedded Security in IoT MaximInterface MAXREFDES155#
Diff: Devices/DS2465.cpp
- Revision:
- 6:471901a04573
- Parent:
- 5:a8c83a2e6fa4
--- a/Devices/DS2465.cpp Wed Jan 23 13:11:04 2019 -0600
+++ b/Devices/DS2465.cpp Mon Mar 04 08:10:00 2019 -0600
@@ -206,9 +206,7 @@
return error_code();
}
// Set the level
- Config newConfig = curConfig;
- newConfig.setSPU(level == StrongLevel);
- return writeConfig(newConfig);
+ return writeConfig(Config(curConfig).setSPU(level == StrongLevel));
}
error_code DS2465::setLevel(Level newLevel) {
@@ -229,9 +227,7 @@
return error_code();
}
// Set the speed
- Config newConfig = curConfig;
- newConfig.set1WS(newSpeed == OverdriveSpeed);
- return writeConfig(newConfig);
+ return writeConfig(Config(curConfig).set1WS(newSpeed == OverdriveSpeed));
}
error_code DS2465::triplet(TripletData & data) {