Optical Sensor for Heart Rate Monitor IC
BH1790GLC.h@2:eb95a49c8a29, 2019-12-07 (annotated)
- Committer:
- mcm
- Date:
- Sat Dec 07 19:41:58 2019 +0000
- Revision:
- 2:eb95a49c8a29
- Parent:
- 1:0eef8dbbf614
- Child:
- 3:11ba607ded8d
Function file is ready to be tested.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mcm | 1:0eef8dbbf614 | 1 | /** |
mcm | 1:0eef8dbbf614 | 2 | * @brief BH1790GLC.h |
mcm | 1:0eef8dbbf614 | 3 | * @details Optical Sensor for Heart Rate Monitor IC. |
mcm | 1:0eef8dbbf614 | 4 | * Header file. |
mcm | 1:0eef8dbbf614 | 5 | * |
mcm | 1:0eef8dbbf614 | 6 | * |
mcm | 1:0eef8dbbf614 | 7 | * @return N/A |
mcm | 1:0eef8dbbf614 | 8 | * |
mcm | 1:0eef8dbbf614 | 9 | * @author Manuel Caballero |
mcm | 1:0eef8dbbf614 | 10 | * @date 07/December/2019 |
mcm | 1:0eef8dbbf614 | 11 | * @version 07/December/2019 The ORIGIN |
mcm | 1:0eef8dbbf614 | 12 | * @pre N/A. |
mcm | 1:0eef8dbbf614 | 13 | * @warning N/A |
mcm | 1:0eef8dbbf614 | 14 | * @pre This code belongs to AqueronteBlog ( http://unbarquero.blogspot.com ). |
mcm | 1:0eef8dbbf614 | 15 | */ |
mcm | 1:0eef8dbbf614 | 16 | #ifndef BH1790GLC_H |
mcm | 1:0eef8dbbf614 | 17 | #define BH1790GLC_H |
mcm | 1:0eef8dbbf614 | 18 | |
mcm | 1:0eef8dbbf614 | 19 | #include "mbed.h" |
mcm | 1:0eef8dbbf614 | 20 | |
mcm | 1:0eef8dbbf614 | 21 | |
mcm | 1:0eef8dbbf614 | 22 | /** |
mcm | 1:0eef8dbbf614 | 23 | Example: |
mcm | 1:0eef8dbbf614 | 24 | @code |
mcm | 1:0eef8dbbf614 | 25 | |
mcm | 1:0eef8dbbf614 | 26 | @endcode |
mcm | 1:0eef8dbbf614 | 27 | */ |
mcm | 1:0eef8dbbf614 | 28 | |
mcm | 1:0eef8dbbf614 | 29 | |
mcm | 1:0eef8dbbf614 | 30 | /*! |
mcm | 1:0eef8dbbf614 | 31 | Library for the BH1790GLC Optical Sensor for Heart Rate Monitor IC. |
mcm | 1:0eef8dbbf614 | 32 | */ |
mcm | 1:0eef8dbbf614 | 33 | class BH1790GLC |
mcm | 1:0eef8dbbf614 | 34 | { |
mcm | 1:0eef8dbbf614 | 35 | public: |
mcm | 1:0eef8dbbf614 | 36 | /** |
mcm | 1:0eef8dbbf614 | 37 | * @brief DEFAULT ADDRESS |
mcm | 1:0eef8dbbf614 | 38 | */ |
mcm | 1:0eef8dbbf614 | 39 | typedef enum { |
mcm | 1:0eef8dbbf614 | 40 | BH1790GLC_ADDRESS = ( 0b1011011 << 1U ) /*!< ADDR */ |
mcm | 1:0eef8dbbf614 | 41 | } BH1790GLC_address_t; |
mcm | 1:0eef8dbbf614 | 42 | |
mcm | 1:0eef8dbbf614 | 43 | |
mcm | 1:0eef8dbbf614 | 44 | |
mcm | 1:0eef8dbbf614 | 45 | /** |
mcm | 1:0eef8dbbf614 | 46 | * @brief REGISTER MAP |
mcm | 1:0eef8dbbf614 | 47 | */ |
mcm | 1:0eef8dbbf614 | 48 | typedef enum { |
mcm | 1:0eef8dbbf614 | 49 | BH1790GLC_MANUFACTURER_ID = 0x0F, /*!< Manufacturer ID */ |
mcm | 1:0eef8dbbf614 | 50 | BH1790GLC_PART_ID = 0x10, /*!< Part ID */ |
mcm | 1:0eef8dbbf614 | 51 | BH1790GLC_RESET = 0x40, /*!< SWRESET */ |
mcm | 1:0eef8dbbf614 | 52 | BH1790GLC_MEAS_CONTROL1 = 0x41, /*!< Measurement setting Control */ |
mcm | 1:0eef8dbbf614 | 53 | BH1790GLC_MEAS_CONTROL2 = 0x42, /*!< Measurement setting Control */ |
mcm | 1:0eef8dbbf614 | 54 | BH1790GLC_MEAS_START = 0x43, /*!< Start Measurement */ |
mcm | 1:0eef8dbbf614 | 55 | BH1790GLC_DATAOUT_LEDOFF_LSB = 0x54, /*!< Measurement Data LSB (LED OFF) */ |
mcm | 1:0eef8dbbf614 | 56 | BH1790GLC_DATAOUT_LEDOFF_MSB = 0x55, /*!< Measurement Data MSB (LED OFF) */ |
mcm | 1:0eef8dbbf614 | 57 | BH1790GLC_DATAOUT_LEDON_LSB = 0x56, /*!< Measurement Data LSB (LED ON) */ |
mcm | 1:0eef8dbbf614 | 58 | BH1790GLC_DATAOUT_LEDON_MSB = 0x57 /*!< Measurement Data MSB (LED ON) */ |
mcm | 1:0eef8dbbf614 | 59 | } BH1790GLC_register_map_t; |
mcm | 1:0eef8dbbf614 | 60 | |
mcm | 1:0eef8dbbf614 | 61 | |
mcm | 1:0eef8dbbf614 | 62 | |
mcm | 1:0eef8dbbf614 | 63 | /** |
mcm | 1:0eef8dbbf614 | 64 | * @brief MANUFACTOR ID REGISTER |
mcm | 1:0eef8dbbf614 | 65 | */ |
mcm | 1:0eef8dbbf614 | 66 | typedef enum { |
mcm | 1:0eef8dbbf614 | 67 | MANUFACTOR_ID_MANUFACTURER_ID = 0xE0 /*!< Manufacturer ID */ |
mcm | 1:0eef8dbbf614 | 68 | } BH1790GLC_manufactor_id_manufacturer_id_t; |
mcm | 1:0eef8dbbf614 | 69 | |
mcm | 1:0eef8dbbf614 | 70 | |
mcm | 1:0eef8dbbf614 | 71 | /** |
mcm | 1:0eef8dbbf614 | 72 | * @brief PART ID REGISTER |
mcm | 1:0eef8dbbf614 | 73 | */ |
mcm | 1:0eef8dbbf614 | 74 | typedef enum { |
mcm | 1:0eef8dbbf614 | 75 | PART_ID_PART_ID = 0x0D /*!< Part ID */ |
mcm | 1:0eef8dbbf614 | 76 | } BH1790GLC_part_id_part_id_t; |
mcm | 1:0eef8dbbf614 | 77 | |
mcm | 1:0eef8dbbf614 | 78 | |
mcm | 1:0eef8dbbf614 | 79 | /** |
mcm | 1:0eef8dbbf614 | 80 | * @brief RESET REGISTER |
mcm | 1:0eef8dbbf614 | 81 | */ |
mcm | 1:0eef8dbbf614 | 82 | /* SWRESET <7> |
mcm | 1:0eef8dbbf614 | 83 | * NOTE: Software reset. |
mcm | 1:0eef8dbbf614 | 84 | */ |
mcm | 1:0eef8dbbf614 | 85 | typedef enum { |
mcm | 1:0eef8dbbf614 | 86 | RESET_SWRESET_MASK = ( 1U << 7U ), /*!< SWRESET mask */ |
mcm | 1:0eef8dbbf614 | 87 | RESET_SWRESET_ENABLED = ( 1U << 7U ), /*!< Software reset is performed */ |
mcm | 1:0eef8dbbf614 | 88 | RESET_SWRESET_DISABLED = ( 0U << 7U ) /*!< Software reset is completed */ |
mcm | 1:0eef8dbbf614 | 89 | } BH1790GLC_reset_swreset_t; |
mcm | 1:0eef8dbbf614 | 90 | |
mcm | 1:0eef8dbbf614 | 91 | |
mcm | 1:0eef8dbbf614 | 92 | /** |
mcm | 1:0eef8dbbf614 | 93 | * @brief MEAS_CONTROL1 REGISTER |
mcm | 1:0eef8dbbf614 | 94 | * |
mcm | 1:0eef8dbbf614 | 95 | */ |
mcm | 1:0eef8dbbf614 | 96 | /* RDY <7> |
mcm | 1:0eef8dbbf614 | 97 | * NOTE: OSC block. |
mcm | 1:0eef8dbbf614 | 98 | */ |
mcm | 1:0eef8dbbf614 | 99 | typedef enum { |
mcm | 1:0eef8dbbf614 | 100 | MEAS_CONTROL1_RDY_MASK = ( 1U << 7U ), /*!< RDY mask */ |
mcm | 1:0eef8dbbf614 | 101 | MEAS_CONTROL1_RDY_PROHIBITED = ( 0U << 7U ), /*!< Prohibited */ |
mcm | 1:0eef8dbbf614 | 102 | MEAS_CONTROL1_RDY_OSC_BLOCK_ACTIVE = ( 1U << 7U ) /*!< OSC block clock to internal block */ |
mcm | 1:0eef8dbbf614 | 103 | } BH1790GLC_meas_control1_rdy_t; |
mcm | 1:0eef8dbbf614 | 104 | |
mcm | 1:0eef8dbbf614 | 105 | |
mcm | 1:0eef8dbbf614 | 106 | /* LED_LIGHTING_FREQ <2> |
mcm | 1:0eef8dbbf614 | 107 | * NOTE: Select LED emitting frequency. |
mcm | 1:0eef8dbbf614 | 108 | */ |
mcm | 1:0eef8dbbf614 | 109 | typedef enum { |
mcm | 1:0eef8dbbf614 | 110 | MEAS_CONTROL1_LED_LIGHTING_FREQ_MASK = ( 1U << 2U ), /*!< LED_LIGHTLING_FREQ mask */ |
mcm | 1:0eef8dbbf614 | 111 | MEAS_CONTROL1_LED_LIGHTING_FREQ_128HZ_MODE = ( 0U << 2U ), /*!< 128Hz Mode */ |
mcm | 1:0eef8dbbf614 | 112 | MEAS_CONTROL1_LED_LIGHTING_FREQ_64HZ_MODE = ( 1U << 2U ) /*!< 64Hz Mode */ |
mcm | 1:0eef8dbbf614 | 113 | } BH1790GLC_meas_control1_led_lighting_freq_t; |
mcm | 1:0eef8dbbf614 | 114 | |
mcm | 1:0eef8dbbf614 | 115 | |
mcm | 1:0eef8dbbf614 | 116 | /* RCYCLE <1:0> |
mcm | 1:0eef8dbbf614 | 117 | * NOTE: Select Data reading frequency. |
mcm | 1:0eef8dbbf614 | 118 | */ |
mcm | 1:0eef8dbbf614 | 119 | typedef enum { |
mcm | 1:0eef8dbbf614 | 120 | MEAS_CONTROL1_RCYCLE_MASK = ( 0b11 << 0U ), /*!< RCYCLE mask */ |
mcm | 1:0eef8dbbf614 | 121 | MEAS_CONTROL1_RCYCLE_64HZ_MODE = ( 0b01 << 0U ), /*!< 128Hz Mode */ |
mcm | 1:0eef8dbbf614 | 122 | MEAS_CONTROL1_RCYCLE_32HZ_MODE = ( 0b10 << 0U ) /*!< 64Hz Mode */ |
mcm | 1:0eef8dbbf614 | 123 | } BH1790GLC_meas_control1_rcycle_t; |
mcm | 1:0eef8dbbf614 | 124 | |
mcm | 1:0eef8dbbf614 | 125 | |
mcm | 1:0eef8dbbf614 | 126 | /** |
mcm | 1:0eef8dbbf614 | 127 | * @brief MEAS_CONTROL2 REGISTER |
mcm | 1:0eef8dbbf614 | 128 | * |
mcm | 1:0eef8dbbf614 | 129 | */ |
mcm | 1:0eef8dbbf614 | 130 | /* LED_EN <7:6> |
mcm | 1:0eef8dbbf614 | 131 | * NOTE: Select LED driver mode. |
mcm | 1:0eef8dbbf614 | 132 | */ |
mcm | 1:0eef8dbbf614 | 133 | typedef enum { |
mcm | 1:0eef8dbbf614 | 134 | MEAS_CONTROL2_LED_EN_MASK = ( 0b11 << 6U ), /*!< LED_EN mask */ |
mcm | 1:0eef8dbbf614 | 135 | MEAS_CONTROL2_LED_EN_0 = ( 0b00 << 6U ), /*!< LED1 and LED2 pulsed light emit */ |
mcm | 1:0eef8dbbf614 | 136 | MEAS_CONTROL2_LED_EN_1 = ( 0b01 << 6U ), /*!< LED1 constant light LED2 pulsed light emit*/ |
mcm | 1:0eef8dbbf614 | 137 | MEAS_CONTROL2_LED_EN_2 = ( 0b10 << 6U ), /*!< LED1 pulsed light emit LED2 constant light*/ |
mcm | 1:0eef8dbbf614 | 138 | MEAS_CONTROL2_LED_EN_3 = ( 0b11 << 6U ) /*!< LED1 and LED2 constant light */ |
mcm | 1:0eef8dbbf614 | 139 | } BH1790GLC_meas_control2_led_en_t; |
mcm | 1:0eef8dbbf614 | 140 | |
mcm | 1:0eef8dbbf614 | 141 | |
mcm | 1:0eef8dbbf614 | 142 | /* LED_ON_TIME <5> |
mcm | 1:0eef8dbbf614 | 143 | * NOTE: Select LED emitting time. |
mcm | 1:0eef8dbbf614 | 144 | */ |
mcm | 1:0eef8dbbf614 | 145 | typedef enum { |
mcm | 1:0eef8dbbf614 | 146 | MEAS_CONTROL2_LED_ON_TIME_MASK = ( 1U << 5U ), /*!< LED_ON_TIME mask */ |
mcm | 1:0eef8dbbf614 | 147 | MEAS_CONTROL2_LED_ON_TIME_0_3_MS_MODE = ( 0U << 5U ), /*!< 0.3ms Mode */ |
mcm | 1:0eef8dbbf614 | 148 | MEAS_CONTROL2_LED_ON_TIME_0_6_MS_MODE = ( 1U << 5U ) /*!< 0.6ms Mode */ |
mcm | 1:0eef8dbbf614 | 149 | } BH1790GLC_meas_control2_led_on_time_t; |
mcm | 1:0eef8dbbf614 | 150 | |
mcm | 1:0eef8dbbf614 | 151 | |
mcm | 1:0eef8dbbf614 | 152 | /* LED_CURRENT <3:0> |
mcm | 1:0eef8dbbf614 | 153 | * NOTE: Select LED lighting current. |
mcm | 1:0eef8dbbf614 | 154 | */ |
mcm | 1:0eef8dbbf614 | 155 | typedef enum { |
mcm | 1:0eef8dbbf614 | 156 | MEAS_CONTROL2_LED_CURRENT_MASK = ( 0b1111 << 0U ), /*!< LED_CURRENT mask */ |
mcm | 1:0eef8dbbf614 | 157 | MEAS_CONTROL2_LED_CURRENT_0_MA_MODE = ( 0x0 << 0U ), /*!< 0mA Mode */ |
mcm | 1:0eef8dbbf614 | 158 | MEAS_CONTROL2_LED_CURRENT_1_MA_MODE = ( 0x8 << 0U ), /*!< 1mA Mode */ |
mcm | 1:0eef8dbbf614 | 159 | MEAS_CONTROL2_LED_CURRENT_2_MA_MODE = ( 0x9 << 0U ), /*!< 2mA Mode */ |
mcm | 1:0eef8dbbf614 | 160 | MEAS_CONTROL2_LED_CURRENT_3_MA_MODE = ( 0xA << 0U ), /*!< 3mA Mode */ |
mcm | 1:0eef8dbbf614 | 161 | MEAS_CONTROL2_LED_CURRENT_6_MA_MODE = ( 0xB << 0U ), /*!< 6mA Mode */ |
mcm | 1:0eef8dbbf614 | 162 | MEAS_CONTROL2_LED_CURRENT_10_MA_MODE = ( 0xC << 0U ), /*!< 10mA Mode */ |
mcm | 1:0eef8dbbf614 | 163 | MEAS_CONTROL2_LED_CURRENT_20_MA_MODE = ( 0xD << 0U ), /*!< 20mA Mode */ |
mcm | 1:0eef8dbbf614 | 164 | MEAS_CONTROL2_LED_CURRENT_30_MA_MODE = ( 0xE << 0U ), /*!< 30mA Mode */ |
mcm | 1:0eef8dbbf614 | 165 | MEAS_CONTROL2_LED_CURRENT_60_MA_MODE = ( 0xF << 0U ) /*!< 60mA Mode */ |
mcm | 1:0eef8dbbf614 | 166 | } BH1790GLC_meas_control2_led_current_t; |
mcm | 1:0eef8dbbf614 | 167 | |
mcm | 1:0eef8dbbf614 | 168 | |
mcm | 1:0eef8dbbf614 | 169 | /** |
mcm | 1:0eef8dbbf614 | 170 | * @brief MEAS_START REGISTER |
mcm | 1:0eef8dbbf614 | 171 | * |
mcm | 1:0eef8dbbf614 | 172 | */ |
mcm | 1:0eef8dbbf614 | 173 | /* LED_EN <0> |
mcm | 1:0eef8dbbf614 | 174 | * NOTE: Flag of start measurement. Start measurement by writing 'MEAS_ST=1' after writing 'RDY=1'. Measurement doesn�t restart if writing |
mcm | 1:0eef8dbbf614 | 175 | * 'MEAS_ST=1' after start measurement. When stop measurement, write 'SWRESET=1' without writing 'MEAS_ST=0'. |
mcm | 1:0eef8dbbf614 | 176 | */ |
mcm | 1:0eef8dbbf614 | 177 | typedef enum { |
mcm | 1:0eef8dbbf614 | 178 | MEAS_START_MEAS_ST_MASK = ( 1U << 0U ), /*!< MEAS_ST mask */ |
mcm | 1:0eef8dbbf614 | 179 | MEAS_START_MEAS_ST_MEASUREMENT_START = ( 1U << 0U ) /*!< Measurement start */ |
mcm | 1:0eef8dbbf614 | 180 | } BH1790GLC_meas_start_meas_st_t; |
mcm | 1:0eef8dbbf614 | 181 | |
mcm | 1:0eef8dbbf614 | 182 | |
mcm | 1:0eef8dbbf614 | 183 | |
mcm | 1:0eef8dbbf614 | 184 | #ifndef BH1790GLC_VECTOR_STRUCT_H |
mcm | 1:0eef8dbbf614 | 185 | #define BH1790GLC_VECTOR_STRUCT_H |
mcm | 1:0eef8dbbf614 | 186 | typedef struct { |
mcm | 1:0eef8dbbf614 | 187 | /* Raw dataout */ |
mcm | 1:0eef8dbbf614 | 188 | uint16_t dataOut_LED_OFF; /*!< Green Data Count Value when LED no emitting */ |
mcm | 1:0eef8dbbf614 | 189 | uint16_t dataOut_LED_ON; /*!< Green Data Count Value when LED emitting */ |
mcm | 1:0eef8dbbf614 | 190 | |
mcm | 1:0eef8dbbf614 | 191 | /* System control setting */ |
mcm | 1:0eef8dbbf614 | 192 | BH1790GLC_meas_control1_rdy_t rdy; /*!< OSC block is supply clock to internal block */ |
mcm | 1:0eef8dbbf614 | 193 | BH1790GLC_meas_control1_led_lighting_freq_t led_lighting_freq; /*!< Select LED emitting frequency */ |
mcm | 1:0eef8dbbf614 | 194 | BH1790GLC_meas_control1_rcycle_t rcycle; /*!< Select Measurement time */ |
mcm | 1:0eef8dbbf614 | 195 | |
mcm | 1:0eef8dbbf614 | 196 | /* Measurement control setting */ |
mcm | 1:0eef8dbbf614 | 197 | BH1790GLC_meas_control2_led_en_t led_en; /*!< Select LED driver mode */ |
mcm | 1:0eef8dbbf614 | 198 | BH1790GLC_meas_control2_led_on_time_t led_on_time; /*!< Select LED emitting time */ |
mcm | 1:0eef8dbbf614 | 199 | BH1790GLC_meas_control2_led_current_t led_current; /*!< Select LED driver current */ |
mcm | 1:0eef8dbbf614 | 200 | |
mcm | 1:0eef8dbbf614 | 201 | /* Device identifications */ |
mcm | 1:0eef8dbbf614 | 202 | uint8_t manufacturer_id; /*!< Manufacturer ID */ |
mcm | 2:eb95a49c8a29 | 203 | uint8_t part_id; /*!< Part ID */ |
mcm | 1:0eef8dbbf614 | 204 | } BH1790GLC_data_t; |
mcm | 1:0eef8dbbf614 | 205 | #endif |
mcm | 1:0eef8dbbf614 | 206 | |
mcm | 1:0eef8dbbf614 | 207 | |
mcm | 1:0eef8dbbf614 | 208 | /** |
mcm | 1:0eef8dbbf614 | 209 | * @brief INTERNAL CONSTANTS |
mcm | 1:0eef8dbbf614 | 210 | */ |
mcm | 1:0eef8dbbf614 | 211 | typedef enum { |
mcm | 1:0eef8dbbf614 | 212 | BH1790GLC_SUCCESS = 0U, /*!< I2C communication success */ |
mcm | 1:0eef8dbbf614 | 213 | BH1790GLC_FAILURE = 1U, /*!< I2C communication failure */ |
mcm | 1:0eef8dbbf614 | 214 | I2C_SUCCESS = 0U /*!< I2C communication was fine */ |
mcm | 1:0eef8dbbf614 | 215 | } BH1790GLC_status_t; |
mcm | 1:0eef8dbbf614 | 216 | |
mcm | 1:0eef8dbbf614 | 217 | |
mcm | 1:0eef8dbbf614 | 218 | |
mcm | 1:0eef8dbbf614 | 219 | |
mcm | 1:0eef8dbbf614 | 220 | /** Create an BH1790GLC object connected to the specified I2C pins. |
mcm | 1:0eef8dbbf614 | 221 | * |
mcm | 1:0eef8dbbf614 | 222 | * @param sda I2C data pin |
mcm | 1:0eef8dbbf614 | 223 | * @param scl I2C clock pin |
mcm | 1:0eef8dbbf614 | 224 | * @param addr I2C slave address |
mcm | 1:0eef8dbbf614 | 225 | * @param freq I2C frequency |
mcm | 1:0eef8dbbf614 | 226 | */ |
mcm | 1:0eef8dbbf614 | 227 | BH1790GLC ( PinName sda, PinName scl, uint32_t addr, uint32_t freq ); |
mcm | 1:0eef8dbbf614 | 228 | |
mcm | 1:0eef8dbbf614 | 229 | /** Delete BH1790GLC object. |
mcm | 1:0eef8dbbf614 | 230 | */ |
mcm | 1:0eef8dbbf614 | 231 | ~BH1790GLC(); |
mcm | 1:0eef8dbbf614 | 232 | |
mcm | 1:0eef8dbbf614 | 233 | /** It gets the manufacturer ID. |
mcm | 1:0eef8dbbf614 | 234 | */ |
mcm | 1:0eef8dbbf614 | 235 | BH1790GLC_status_t BH1790GLC_GetManufacturerID ( BH1790GLC_data_t* myManufacturerID ); |
mcm | 1:0eef8dbbf614 | 236 | |
mcm | 1:0eef8dbbf614 | 237 | /** It gets the part ID. |
mcm | 1:0eef8dbbf614 | 238 | */ |
mcm | 1:0eef8dbbf614 | 239 | BH1790GLC_status_t BH1790GLC_GetPartID ( BH1790GLC_data_t* myPartID ); |
mcm | 1:0eef8dbbf614 | 240 | |
mcm | 1:0eef8dbbf614 | 241 | /** It performs a soft reset. |
mcm | 1:0eef8dbbf614 | 242 | */ |
mcm | 1:0eef8dbbf614 | 243 | BH1790GLC_status_t BH1790GLC_SoftReset ( void ); |
mcm | 1:0eef8dbbf614 | 244 | |
mcm | 1:0eef8dbbf614 | 245 | /** It triggers a new measurement sample. |
mcm | 1:0eef8dbbf614 | 246 | */ |
mcm | 1:0eef8dbbf614 | 247 | BH1790GLC_status_t BH1790GLC_StartMeasurement ( BH1790GLC_data_t myConfData ); |
mcm | 1:0eef8dbbf614 | 248 | |
mcm | 1:0eef8dbbf614 | 249 | /** It gets the DATAOUT ( DATAOUT_LEDOFF and DATAOUT_LEDON data ). Raw data value. |
mcm | 1:0eef8dbbf614 | 250 | */ |
mcm | 1:0eef8dbbf614 | 251 | BH1790GLC_status_t BH1790GLC_GetRawDataOut ( BH1790GLC_data_t* myRawDataOut ); |
mcm | 1:0eef8dbbf614 | 252 | |
mcm | 1:0eef8dbbf614 | 253 | |
mcm | 1:0eef8dbbf614 | 254 | private: |
mcm | 1:0eef8dbbf614 | 255 | I2C _i2c; |
mcm | 1:0eef8dbbf614 | 256 | uint32_t _BH1790GLC_Addr; |
mcm | 1:0eef8dbbf614 | 257 | }; |
mcm | 1:0eef8dbbf614 | 258 | |
mcm | 1:0eef8dbbf614 | 259 | #endif |