![]() |
MAXREFDES117# Code Documentation
V01.00
Heart Rate / SpO2 Monitor
|
#include <arduino.h>
Go to the source code of this file.
Macros | |
#define | I2C_WRITE_ADDR 0xAE |
#define | I2C_READ_ADDR 0xAF |
#define | REG_INTR_STATUS_1 0x00 |
#define | REG_INTR_STATUS_2 0x01 |
#define | REG_INTR_ENABLE_1 0x02 |
#define | REG_INTR_ENABLE_2 0x03 |
#define | REG_FIFO_WR_PTR 0x04 |
#define | REG_OVF_COUNTER 0x05 |
#define | REG_FIFO_RD_PTR 0x06 |
#define | REG_FIFO_DATA 0x07 |
#define | REG_FIFO_CONFIG 0x08 |
#define | REG_MODE_CONFIG 0x09 |
#define | REG_SPO2_CONFIG 0x0A |
#define | REG_LED1_PA 0x0C |
#define | REG_LED2_PA 0x0D |
#define | REG_PILOT_PA 0x10 |
#define | REG_MULTI_LED_CTRL1 0x11 |
#define | REG_MULTI_LED_CTRL2 0x12 |
#define | REG_TEMP_INTR 0x1F |
#define | REG_TEMP_FRAC 0x20 |
#define | REG_TEMP_CONFIG 0x21 |
#define | REG_PROX_INT_THRESH 0x30 |
#define | REG_REV_ID 0xFE |
#define | REG_PART_ID 0xFF |
Functions | |
bool | maxim_max30102_init () |
Initialize the MAX30102. | |
bool | maxim_max30102_read_fifo (uint32_t *pun_red_led, uint32_t *pun_ir_led) |
Read a set of samples from the MAX30102 FIFO register. | |
bool | maxim_max30102_write_reg (uint8_t uch_addr, uint8_t uch_data) |
Write a value to a MAX30102 register. | |
bool | maxim_max30102_read_reg (uint8_t uch_addr, uint8_t *puch_data) |
Read a MAX30102 register. | |
bool | maxim_max30102_reset (void) |
Reset the MAX30102. | |
******************************************************
Project: MAXREFDES117# Filename: max30102.h Description: This module is an embedded controller driver header file for MAX30102
Revision History:
1-18-2016 Rev 01.00 GL Initial release.
This code follows the following naming conventions:
char ch_pmod_value char (array) s_pmod_s_string[16] float f_pmod_value int32_t n_pmod_value int32_t (array) an_pmod_value[16] int16_t w_pmod_value int16_t (array) aw_pmod_value[16] uint16_t uw_pmod_value uint16_t (array) auw_pmod_value[16] uint8_t uch_pmod_value uint8_t (array) auch_pmod_buffer[16] uint32_t un_pmod_value int32_t * pn_pmod_value
Definition in file max30102.h.
#define I2C_READ_ADDR 0xAF |
Definition at line 67 of file max30102.h.
#define I2C_WRITE_ADDR 0xAE |
Definition at line 66 of file max30102.h.
#define REG_FIFO_CONFIG 0x08 |
Definition at line 78 of file max30102.h.
#define REG_FIFO_DATA 0x07 |
Definition at line 77 of file max30102.h.
#define REG_FIFO_RD_PTR 0x06 |
Definition at line 76 of file max30102.h.
#define REG_FIFO_WR_PTR 0x04 |
Definition at line 74 of file max30102.h.
#define REG_INTR_ENABLE_1 0x02 |
Definition at line 72 of file max30102.h.
#define REG_INTR_ENABLE_2 0x03 |
Definition at line 73 of file max30102.h.
#define REG_INTR_STATUS_1 0x00 |
Definition at line 70 of file max30102.h.
#define REG_INTR_STATUS_2 0x01 |
Definition at line 71 of file max30102.h.
#define REG_LED1_PA 0x0C |
Definition at line 81 of file max30102.h.
#define REG_LED2_PA 0x0D |
Definition at line 82 of file max30102.h.
#define REG_MODE_CONFIG 0x09 |
Definition at line 79 of file max30102.h.
#define REG_MULTI_LED_CTRL1 0x11 |
Definition at line 84 of file max30102.h.
#define REG_MULTI_LED_CTRL2 0x12 |
Definition at line 85 of file max30102.h.
#define REG_OVF_COUNTER 0x05 |
Definition at line 75 of file max30102.h.
#define REG_PART_ID 0xFF |
Definition at line 91 of file max30102.h.
#define REG_PILOT_PA 0x10 |
Definition at line 83 of file max30102.h.
#define REG_PROX_INT_THRESH 0x30 |
Definition at line 89 of file max30102.h.
#define REG_REV_ID 0xFE |
Definition at line 90 of file max30102.h.
#define REG_SPO2_CONFIG 0x0A |
Definition at line 80 of file max30102.h.
#define REG_TEMP_CONFIG 0x21 |
Definition at line 88 of file max30102.h.
#define REG_TEMP_FRAC 0x20 |
Definition at line 87 of file max30102.h.
#define REG_TEMP_INTR 0x1F |
Definition at line 86 of file max30102.h.
bool maxim_max30102_init | ( | ) |
Initialize the MAX30102.
None |
true | on success |
Definition at line 111 of file max30102.cpp.
bool maxim_max30102_read_fifo | ( | uint32_t * | pun_red_led, |
uint32_t * | pun_ir_led | ||
) |
Read a set of samples from the MAX30102 FIFO register.
[out] | *pun_red_led | - pointer that stores the red LED reading data |
[out] | *pun_ir_led | - pointer that stores the IR LED reading data |
true | on success |
Definition at line 154 of file max30102.cpp.
bool maxim_max30102_read_reg | ( | uint8_t | uch_addr, |
uint8_t * | puch_data | ||
) |
Read a MAX30102 register.
[in] | uch_addr | - register address |
[out] | puch_data | - pointer that stores the register data |
true | on success |
Definition at line 88 of file max30102.cpp.
bool maxim_max30102_reset | ( | void | ) |
Reset the MAX30102.
None |
true | on success |
Definition at line 202 of file max30102.cpp.
bool maxim_max30102_write_reg | ( | uint8_t | uch_addr, |
uint8_t | uch_data | ||
) |
Write a value to a MAX30102 register.
[in] | uch_addr | - register address |
[in] | uch_data | - register data |
true | on success |
Definition at line 66 of file max30102.cpp.