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.
Revision 3:3c182751e655, committed 2014-05-02
- Comitter:
- chaegle
- Date:
- Fri May 02 17:08:05 2014 +0000
- Parent:
- 2:22dbeccb82be
- Commit message:
- Updated class constructors so as to set I2C bus frequency to 400KHz, in order to provide compatibility with FRDM-K64F platform.
Changed in this revision
| DS1721.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/DS1721.cpp Tue Jul 30 20:23:07 2013 +0000
+++ b/DS1721.cpp Fri May 02 17:08:05 2014 +0000
@@ -41,6 +41,7 @@
DS1721::DS1721(I2C &i2c, int addr) : m_i2c(i2c) , m_addr(addr)
{
+ m_i2c.frequency(400000);
_resolution = RES_9_BIT;
_polarity = POLARITY_ACTIVE_HIGH;
_mode = CONV_FOREVER;
@@ -51,7 +52,8 @@
DS1721::DS1721(I2C &i2c, int resolution, int polarity, int mode, int addr)
: m_i2c(i2c) , _resolution(resolution) , _polarity(polarity) , _mode(mode) , m_addr(addr)
-{
+{
+ m_i2c.frequency(400000);
_num_read = 1;
//setConfig(_resolution | _polarity | _mode);
}
DS1721