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.
Diff: MCP9808.hpp
- Revision:
- 2:4f8e1fb852d3
- Parent:
- 1:7e98ef2bd303
--- a/MCP9808.hpp Mon Jan 09 17:57:58 2017 +0000
+++ b/MCP9808.hpp Fri Jan 20 19:48:45 2017 +0000
@@ -56,6 +56,14 @@
MCP9808_CFG_FLAG_SHDN_ENABLED = (1 << 8),
};
+ /** Manufacturer ID from MCP9808_REG_MFG_ID register
+ */
+ static const uint16_t MCP9808_MFG_ID = 0x0054;
+
+ /** Device ID from MCP9808_REG_DEV_ID register
+ */
+ static const uint16_t MCP9808_DEV_ID = 0x0400;
+
/** Create an MCP9808 using the specified pins for I2C and specified I2C
* address
*
@@ -67,6 +75,12 @@
virtual ~MCP9808();
+ /** Detects the sensor's presence
+ *
+ * @returns true if sensor is detected
+ */
+ bool is_detected();
+
/** Puts the sensor into (low-power) shutdown mode
*
* @returns 0 on success, negative on error