MAX30208 Example Program

Dependencies:   max32630fthr USBDevice

Committer:
tlyp
Date:
Wed Aug 12 20:02:32 2020 +0000
Revision:
3:27e027ab268b
Parent:
0:d996cb30964c
Cleaned up comments and header files;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tlyp 0:d996cb30964c 1 /*******************************************************************************
tlyp 3:27e027ab268b 2 * Copyright (C) Maxim Integrated Products, Inc., All Rights Reserved.
tlyp 3:27e027ab268b 3 *
tlyp 3:27e027ab268b 4 * Permission is hereby granted, free of charge, to any person obtaining a
tlyp 3:27e027ab268b 5 * copy of this software and associated documentation files (the "Software"),
tlyp 3:27e027ab268b 6 * to deal in the Software without restriction, including without limitation
tlyp 3:27e027ab268b 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
tlyp 3:27e027ab268b 8 * and/or sell copies of the Software, and to permit persons to whom the
tlyp 3:27e027ab268b 9 * Software is furnished to do so, subject to the following conditions:
tlyp 3:27e027ab268b 10 *
tlyp 3:27e027ab268b 11 * The above copyright notice and this permission notice shall be included
tlyp 3:27e027ab268b 12 * in all copies or substantial portions of the Software.
tlyp 3:27e027ab268b 13 *
tlyp 3:27e027ab268b 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
tlyp 3:27e027ab268b 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
tlyp 3:27e027ab268b 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
tlyp 3:27e027ab268b 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
tlyp 3:27e027ab268b 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
tlyp 3:27e027ab268b 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
tlyp 3:27e027ab268b 20 * OTHER DEALINGS IN THE SOFTWARE.
tlyp 3:27e027ab268b 21 *
tlyp 3:27e027ab268b 22 * Except as contained in this notice, the name of Maxim Integrated
tlyp 3:27e027ab268b 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
tlyp 3:27e027ab268b 24 * Products, Inc. Branding Policy.
tlyp 3:27e027ab268b 25 *
tlyp 3:27e027ab268b 26 * The mere transfer of this software does not imply any licenses
tlyp 3:27e027ab268b 27 * of trade secrets, proprietary technology, copyrights, patents,
tlyp 3:27e027ab268b 28 * trademarks, maskwork rights, or any other form of intellectual
tlyp 3:27e027ab268b 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
tlyp 3:27e027ab268b 30 * ownership rights.
tlyp 3:27e027ab268b 31 *******************************************************************************
tlyp 3:27e027ab268b 32 * @file MAX30208.h
tlyp 3:27e027ab268b 33 * @brief This is the header file used for the MAX30208 human body temperature sensor library.
tlyp 3:27e027ab268b 34 * @version 1.0
tlyp 3:27e027ab268b 35 * @notes This file needs to be imported along with MAX30208.cpp for the program to work properly. This is library containing basic functions to be used in conjunction with the MAX30208. This library does not support any other devices. This is an MBed tested library.
tlyp 3:27e027ab268b 36 *****************************************************************************/
tlyp 3:27e027ab268b 37
tlyp 0:d996cb30964c 38 #ifndef __MAX30208_H_
tlyp 0:d996cb30964c 39 #define __MAX30208_H_
tlyp 0:d996cb30964c 40
tlyp 0:d996cb30964c 41 #include "mbed.h"
tlyp 0:d996cb30964c 42
tlyp 0:d996cb30964c 43 /**
tlyp 3:27e027ab268b 44 * @brief Library for the MAX30208
tlyp 0:d996cb30964c 45 *
tlyp 0:d996cb30964c 46 * @code
tlyp 0:d996cb30964c 47 * #include "mbed.h"
tlyp 0:d996cb30964c 48 * #include "max32630fthr.h"
tlyp 0:d996cb30964c 49 * #include "MAX30208.h"
tlyp 0:d996cb30964c 50 *
tlyp 0:d996cb30964c 51 * MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3);
tlyp 0:d996cb30964c 52 *
tlyp 0:d996cb30964c 53 * //Get I2C instance
tlyp 0:d996cb30964c 54 * I2C i2cBus(I2C1_SDA, I2C1_SCL);
tlyp 0:d996cb30964c 55 *
tlyp 0:d996cb30964c 56 * //Get temp sensor instance
tlyp 3:27e027ab268b 57 * MAX30208 BodyTempSensor(i2cBus, 0x50); //Constructor takes 7-bit slave adress. 0x50 is default slave address for MAX30208 Ev-Kit
tlyp 0:d996cb30964c 58 *
tlyp 0:d996cb30964c 59 * int main(void)
tlyp 0:d996cb30964c 60 * {
tlyp 0:d996cb30964c 61 * //use sensor
tlyp 0:d996cb30964c 62 * }
tlyp 0:d996cb30964c 63 * @endcode
tlyp 0:d996cb30964c 64 */
tlyp 0:d996cb30964c 65
tlyp 0:d996cb30964c 66 class MAX30208
tlyp 0:d996cb30964c 67 {
tlyp 0:d996cb30964c 68
tlyp 0:d996cb30964c 69 public:
tlyp 0:d996cb30964c 70 /// MAX30208 Register Addresses
tlyp 0:d996cb30964c 71 enum Registers_e {
tlyp 0:d996cb30964c 72 Status = 0x00,
tlyp 0:d996cb30964c 73 Interrupt_Enable = 0x01,
tlyp 0:d996cb30964c 74 FIFO_Write_Pointer = 0x04,
tlyp 0:d996cb30964c 75 FIFO_Read_Pointer = 0x05,
tlyp 0:d996cb30964c 76 FIFO_Overflow_Counter = 0x06,
tlyp 0:d996cb30964c 77 FIFO_Data_Counter = 0x07,
tlyp 0:d996cb30964c 78 FIFO_Data = 0x08,
tlyp 0:d996cb30964c 79 FIFO_Config1 = 0x09,
tlyp 0:d996cb30964c 80 FIFO_Config2 = 0x0A,
tlyp 0:d996cb30964c 81 System_Control = 0x0C,
tlyp 0:d996cb30964c 82 Alarm_High_MSB = 0x10,
tlyp 0:d996cb30964c 83 Alarm_Low_MSB = 0x12,
tlyp 0:d996cb30964c 84 Temp_Sensor_Setup = 0x14,
tlyp 0:d996cb30964c 85 GPIO_Setup = 0x20,
tlyp 0:d996cb30964c 86 GPIO_Control = 0x21
tlyp 0:d996cb30964c 87 };
tlyp 0:d996cb30964c 88
tlyp 3:27e027ab268b 89 //Intterupt Register Config
tlyp 0:d996cb30964c 90 union Configuration_InterruptEnable{
tlyp 0:d996cb30964c 91 uint8_t all;
tlyp 0:d996cb30964c 92 struct BitField_s{
tlyp 0:d996cb30964c 93 uint8_t TEMP_RDY_EN : 1;
tlyp 0:d996cb30964c 94 uint8_t TEMP_HI_EN : 1;
tlyp 0:d996cb30964c 95 uint8_t TEMP_LO_EN : 1;
tlyp 0:d996cb30964c 96 uint8_t : 4; //unused bits
tlyp 0:d996cb30964c 97 uint8_t A_FULL_EN : 1;
tlyp 0:d996cb30964c 98 }config;
tlyp 0:d996cb30964c 99 };
tlyp 0:d996cb30964c 100
tlyp 3:27e027ab268b 101 //FIFO Config 2 Register
tlyp 3:27e027ab268b 102 union Configuration_FIFOConfig2{
tlyp 0:d996cb30964c 103 uint8_t all;
tlyp 0:d996cb30964c 104 struct BitField_s{
tlyp 0:d996cb30964c 105 uint8_t : 1; //unused bit
tlyp 0:d996cb30964c 106 uint8_t FIFO_RO : 1;
tlyp 0:d996cb30964c 107 uint8_t A_FULL_TYPE : 1;
tlyp 0:d996cb30964c 108 uint8_t FIFO_STAT_CLR : 1;
tlyp 0:d996cb30964c 109 uint8_t FLUSH_FIFO : 1;
tlyp 0:d996cb30964c 110 uint8_t : 0; //unused bits
tlyp 0:d996cb30964c 111 }config;
tlyp 0:d996cb30964c 112 };
tlyp 0:d996cb30964c 113
tlyp 3:27e027ab268b 114 //GPIO Setup Register
tlyp 0:d996cb30964c 115 union Configuration_GPIOSetup{
tlyp 0:d996cb30964c 116 uint8_t all;
tlyp 0:d996cb30964c 117 struct BitField_s{
tlyp 0:d996cb30964c 118 uint8_t GPIO0_MODE : 2;
tlyp 0:d996cb30964c 119 uint8_t : 4; //unused bits
tlyp 0:d996cb30964c 120 uint8_t GPIO1_MODE : 2;
tlyp 0:d996cb30964c 121 }config;
tlyp 0:d996cb30964c 122 };
tlyp 0:d996cb30964c 123
tlyp 3:27e027ab268b 124 //GPIO Control Register
tlyp 0:d996cb30964c 125 union Configuration_GPIOControl{
tlyp 0:d996cb30964c 126 uint8_t all;
tlyp 0:d996cb30964c 127 struct BitField_s{
tlyp 0:d996cb30964c 128 uint8_t GPIO0_LL : 1;
tlyp 0:d996cb30964c 129 uint8_t : 2; //unused bits
tlyp 0:d996cb30964c 130 uint8_t GPIO1_LL : 1;
tlyp 0:d996cb30964c 131 uint8_t : 0; //unused bits
tlyp 0:d996cb30964c 132 }config;
tlyp 0:d996cb30964c 133 };
tlyp 0:d996cb30964c 134
tlyp 0:d996cb30964c 135 /**
tlyp 0:d996cb30964c 136 * @brief Constructor using reference to I2C object
tlyp 0:d996cb30964c 137 * @param i2c - Reference to I2C object
tlyp 0:d996cb30964c 138 * @param slaveAddress - 7-bit I2C address
tlyp 0:d996cb30964c 139 */
tlyp 0:d996cb30964c 140 MAX30208(I2C &i2c, uint8_t slaveAddress);
tlyp 0:d996cb30964c 141
tlyp 0:d996cb30964c 142 /** @brief Destructor */
tlyp 0:d996cb30964c 143 ~MAX30208(void);
tlyp 0:d996cb30964c 144
tlyp 0:d996cb30964c 145 /**
tlyp 0:d996cb30964c 146 * @brief Write Interrupt Register
tlyp 0:d996cb30964c 147 * @param config - Reference to Configuration type, config.all is written upon succesful register write
tlyp 0:d996cb30964c 148 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 149 */
tlyp 0:d996cb30964c 150 int32_t writeInterruptRegister(Configuration_InterruptEnable config);
tlyp 0:d996cb30964c 151
tlyp 0:d996cb30964c 152 /**
tlyp 0:d996cb30964c 153 * @brief Read Interrupt Register Configuration
tlyp 0:d996cb30964c 154 * @param config - Reference to Configuration type, config.all is updated upon succesful register read
tlyp 0:d996cb30964c 155 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 156 */
tlyp 0:d996cb30964c 157 int32_t readInterruptRegister(Configuration_InterruptEnable &config);
tlyp 0:d996cb30964c 158
tlyp 0:d996cb30964c 159 /**
tlyp 0:d996cb30964c 160 * @brief Read Status Register
tlyp 0:d996cb30964c 161 * @param[out] value - Status Register Value on succesful read
tlyp 0:d996cb30964c 162 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 163 */
tlyp 0:d996cb30964c 164 int32_t readStatus(uint16_t &value);
tlyp 0:d996cb30964c 165
tlyp 0:d996cb30964c 166 /**
tlyp 0:d996cb30964c 167 * @brief Read FIFO Write Pointer Value
tlyp 0:d996cb30964c 168 * @param[out] value - FIFO Write Pointer value on succesful read
tlyp 0:d996cb30964c 169 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 170 */
tlyp 0:d996cb30964c 171 int32_t readWritePointer(uint16_t &value);
tlyp 0:d996cb30964c 172
tlyp 0:d996cb30964c 173 /**
tlyp 0:d996cb30964c 174 * @brief Read FIFO Read Pointer Value
tlyp 0:d996cb30964c 175 * @param[out] value - FIFO Read Pointer value on succesful read
tlyp 0:d996cb30964c 176 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 177 */
tlyp 0:d996cb30964c 178 int32_t readReadPointer(uint16_t &value);
tlyp 0:d996cb30964c 179
tlyp 0:d996cb30964c 180 /**
tlyp 0:d996cb30964c 181 * @brief Write FIFO Read Pointer Value
tlyp 0:d996cb30964c 182 * @param config - New FIFO Read Pointer value on succesful write
tlyp 0:d996cb30964c 183 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 184 */
tlyp 0:d996cb30964c 185 int32_t writeReadPointer(uint8_t config);
tlyp 0:d996cb30964c 186
tlyp 0:d996cb30964c 187 /**
tlyp 0:d996cb30964c 188 * @brief Read FIFO Overflow Register
tlyp 0:d996cb30964c 189 * @param[out] value - Overflow Counter value on succesful read
tlyp 0:d996cb30964c 190 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 191 */
tlyp 0:d996cb30964c 192 int32_t readOverflow(uint16_t &value);
tlyp 0:d996cb30964c 193
tlyp 0:d996cb30964c 194 /**
tlyp 0:d996cb30964c 195 * @brief Read Data Counter Register
tlyp 0:d996cb30964c 196 * @param[out] value - Data Count register value on succesful read
tlyp 0:d996cb30964c 197 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 198 */
tlyp 0:d996cb30964c 199 int32_t readDataCounter(uint16_t &value);
tlyp 0:d996cb30964c 200
tlyp 0:d996cb30964c 201 /**
tlyp 0:d996cb30964c 202 * @brief Read FIFO Data at FIFO Read Pointer
tlyp 0:d996cb30964c 203 * @param[out] value - Temperature value from FIFO data register on succesful read
tlyp 0:d996cb30964c 204 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 205 */
tlyp 0:d996cb30964c 206 int32_t readData(uint16_t &value);
tlyp 0:d996cb30964c 207
tlyp 0:d996cb30964c 208 /**
tlyp 0:d996cb30964c 209 * @brief Take a new temperature reading
tlyp 0:d996cb30964c 210 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 211 */
tlyp 0:d996cb30964c 212 int32_t takeDataMeasurment();
tlyp 0:d996cb30964c 213
tlyp 0:d996cb30964c 214 /**
tlyp 0:d996cb30964c 215 * @brief Read FIFO Config1 Register
tlyp 0:d996cb30964c 216 * @param[out] value - FIFO Config1 value on succesful read
tlyp 0:d996cb30964c 217 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 218 */
tlyp 0:d996cb30964c 219 int32_t readFIFOConfig1(uint16_t &value);
tlyp 0:d996cb30964c 220
tlyp 0:d996cb30964c 221 /**
tlyp 0:d996cb30964c 222 * @brief Write FIFO Config1 register
tlyp 0:d996cb30964c 223 * @param config - FIFO Config1 register data to write
tlyp 0:d996cb30964c 224 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 225 */
tlyp 0:d996cb30964c 226 int32_t writeFIFOConfig1(uint8_t config);
tlyp 0:d996cb30964c 227
tlyp 0:d996cb30964c 228 /**
tlyp 0:d996cb30964c 229 * @brief Read FIFO Config2 register
tlyp 0:d996cb30964c 230 * @param[out] config - Reference to Configuration type, config.all is updated upon succesful register read
tlyp 0:d996cb30964c 231 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 232 */
tlyp 0:d996cb30964c 233 int32_t readFIFOConfig2(Configuration_FIFOConfig2 &config);
tlyp 0:d996cb30964c 234
tlyp 0:d996cb30964c 235 /**
tlyp 0:d996cb30964c 236 * @brief Read FIFO Config2 register
tlyp 0:d996cb30964c 237 * @param config - Reference to Configuration type, config.all is written upon succesful register write
tlyp 0:d996cb30964c 238 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 239 */
tlyp 0:d996cb30964c 240 int32_t writeFIFOConfig2(Configuration_FIFOConfig2 config);
tlyp 0:d996cb30964c 241
tlyp 0:d996cb30964c 242 /**
tlyp 0:d996cb30964c 243 * @brief Reset Device to factory default
tlyp 0:d996cb30964c 244 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 245 */
tlyp 0:d996cb30964c 246 int32_t resetDevice(); //set bit 0 in system register to 1 to factory reset
tlyp 0:d996cb30964c 247
tlyp 0:d996cb30964c 248 /**
tlyp 0:d996cb30964c 249 * @brief Read High Temperature Alarm Value
tlyp 0:d996cb30964c 250 * @param[out] temp - High Temperature Alarm Value
tlyp 0:d996cb30964c 251 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 252 */
tlyp 0:d996cb30964c 253 int32_t readAlarmHigh(uint16_t &temp);
tlyp 0:d996cb30964c 254
tlyp 0:d996cb30964c 255 /**
tlyp 0:d996cb30964c 256 * @brief Write High Temperature Alarm Value
tlyp 0:d996cb30964c 257 * @param temp - 16-bit High Temperature Value to Write
tlyp 0:d996cb30964c 258 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 259 */
tlyp 0:d996cb30964c 260 int32_t writeAlarmHigh(uint16_t temp);
tlyp 0:d996cb30964c 261
tlyp 0:d996cb30964c 262 /**
tlyp 0:d996cb30964c 263 * @brief Read Low Temperature Alarm Value
tlyp 0:d996cb30964c 264 * @param[out] temp - Low Temperature Alarm Value
tlyp 0:d996cb30964c 265 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 266 */
tlyp 0:d996cb30964c 267 int32_t readAlarmLow(uint16_t &value);
tlyp 0:d996cb30964c 268
tlyp 0:d996cb30964c 269 /**
tlyp 0:d996cb30964c 270 * @brief Write Low Temperature Alarm Value
tlyp 0:d996cb30964c 271 * @param temp - 16-bit Low Temperature Value to Write
tlyp 0:d996cb30964c 272 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 273 */
tlyp 0:d996cb30964c 274 int32_t writeAlarmLow(uint16_t temp);
tlyp 0:d996cb30964c 275
tlyp 0:d996cb30964c 276 /**
tlyp 0:d996cb30964c 277 * @brief Read GPIO Setup register
tlyp 0:d996cb30964c 278 * @param config - Reference to Configuration type, config.all is updated upon succesful register read
tlyp 0:d996cb30964c 279 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 280 */
tlyp 0:d996cb30964c 281 int32_t readGPIOSetup(Configuration_GPIOSetup &config);
tlyp 0:d996cb30964c 282
tlyp 0:d996cb30964c 283 /**
tlyp 0:d996cb30964c 284 * @brief Write GPIO Setup register
tlyp 0:d996cb30964c 285 * @param config - Reference to Configuration type, config.all is written to register upon succesful register write
tlyp 0:d996cb30964c 286 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 287 */
tlyp 0:d996cb30964c 288 int32_t writeGPIOSetup(Configuration_GPIOSetup config);
tlyp 0:d996cb30964c 289
tlyp 0:d996cb30964c 290 /**
tlyp 0:d996cb30964c 291 * @brief Read GPIO Control register
tlyp 0:d996cb30964c 292 * @param config - Reference to Configuration type, config.all is updated upon succesful register read
tlyp 0:d996cb30964c 293 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 294 */
tlyp 0:d996cb30964c 295 int32_t readGPIOControl(Configuration_GPIOControl &config);
tlyp 0:d996cb30964c 296
tlyp 0:d996cb30964c 297 /**
tlyp 0:d996cb30964c 298 * @brief Write GPIO Control register
tlyp 0:d996cb30964c 299 * @param config - Reference to Configuration type, config.all is written to register upon succesful register write
tlyp 0:d996cb30964c 300 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 301 */
tlyp 0:d996cb30964c 302 int32_t writeGPIOControl(Configuration_GPIOControl config);
tlyp 0:d996cb30964c 303
tlyp 0:d996cb30964c 304 /**
tlyp 0:d996cb30964c 305 * @brief Convert Raw Sensor Data to degrees Celisus
tlyp 0:d996cb30964c 306 * @param rawTemp - 16 bit raw temperature data
tlyp 0:d996cb30964c 307 * @return Returns the converted Celsius Temperature
tlyp 0:d996cb30964c 308 */
tlyp 0:d996cb30964c 309 float toCelsius(uint16_t rawTemp);
tlyp 0:d996cb30964c 310
tlyp 0:d996cb30964c 311 /**
tlyp 0:d996cb30964c 312 * @brief Convert Celsius Temperature to Fahrenheit
tlyp 0:d996cb30964c 313 * @param temperatureC - Temperature in degrees Celsius that will be converted
tlyp 0:d996cb30964c 314 * @return Returns the converted Fahrenheit temperature
tlyp 0:d996cb30964c 315 */
tlyp 0:d996cb30964c 316 float toFahrenheit(float temperatureC);
tlyp 0:d996cb30964c 317
tlyp 0:d996cb30964c 318 protected:
tlyp 0:d996cb30964c 319
tlyp 0:d996cb30964c 320 /**
tlyp 0:d996cb30964c 321 * @brief Write register of device at slave address
tlyp 0:d996cb30964c 322 * @param reg - char array that contains address of register and write value
tlyp 0:d996cb30964c 323 * @param value - Data written to register on sucessful write
tlyp 0:d996cb30964c 324 * @param bytesWritten - Number of bytes to write
tlyp 0:d996cb30964c 325 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 326 */
tlyp 0:d996cb30964c 327 int32_t writeRegister(Registers_e reg, uint16_t value, int bytesWritten);
tlyp 0:d996cb30964c 328 /**
tlyp 0:d996cb30964c 329 * @brief Read register of device at slave address
tlyp 0:d996cb30964c 330 * @param reg - Register address
tlyp 0:d996cb30964c 331 * @param[out] value - Read data on successful read
tlyp 0:d996cb30964c 332 * @param bytesRead - Number of bytes to read
tlyp 0:d996cb30964c 333 * @return 0 on success, non-zero on failure
tlyp 0:d996cb30964c 334 */
tlyp 0:d996cb30964c 335 int32_t readRegister(Registers_e reg, uint16_t &value, int bytesRead);
tlyp 0:d996cb30964c 336
tlyp 0:d996cb30964c 337 private:
tlyp 0:d996cb30964c 338 /// I2C object
tlyp 0:d996cb30964c 339 I2C & m_i2c;
tlyp 0:d996cb30964c 340 /// Device slave addresses
tlyp 0:d996cb30964c 341 uint8_t m_writeAddress, m_readAddress;
tlyp 0:d996cb30964c 342 };
tlyp 0:d996cb30964c 343
tlyp 0:d996cb30964c 344 #endif /* __MAX30208_H_ */