port oxullo library Arduino
Embed:
(wiki syntax)
Show/hide line numbers
MAX30100_Registers.h
00001 /* 00002 Arduino-MAX30100 oximetry / heart rate integrated sensor library 00003 Copyright (C) 2016 OXullo Intersecans <x@brainrapers.org> 00004 This program is free software: you can redistribute it and/or modify 00005 it under the terms of the GNU General Public License as published by 00006 the Free Software Foundation, either version 3 of the License, or 00007 (at your option) any later version. 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 You should have received a copy of the GNU General Public License 00013 along with this program. If not, see <http://www.gnu.org/licenses/>. 00014 */ 00015 00016 #ifndef MAX30100_REGISTERS_H 00017 #define MAX30100_REGISTERS_H 00018 00019 //#define MAX30100_I2C_ADDRESS 0x57 00020 #define I2C_WRITE_ADDR 0xAE 00021 #define I2C_READ_ADDR 0xAF 00022 00023 // Interrupt status register (RO) 00024 #define MAX30100_REG_INTERRUPT_STATUS 0x00 00025 #define MAX30100_IS_PWR_RDY (1 << 0) 00026 #define MAX30100_IS_SPO2_RDY (1 << 4) 00027 #define MAX30100_IS_HR_RDY (1 << 5) 00028 #define MAX30100_IS_TEMP_RDY (1 << 6) 00029 #define MAX30100_IS_A_FULL (1 << 7) 00030 00031 // Interrupt enable register 00032 #define MAX30100_REG_INTERRUPT_ENABLE 0x01 00033 #define MAX30100_IE_ENB_SPO2_RDY (1 << 4) 00034 #define MAX30100_IE_ENB_HR_RDY (1 << 5) 00035 #define MAX30100_IE_ENB_TEMP_RDY (1 << 6) 00036 #define MAX30100_IE_ENB_A_FULL (1 << 7) 00037 00038 // FIFO control and data registers 00039 #define MAX30100_REG_FIFO_WRITE_POINTER 0x02 00040 #define MAX30100_REG_FIFO_OVERFLOW_COUNTER 0x03 00041 #define MAX30100_REG_FIFO_READ_POINTER 0x04 00042 #define MAX30100_REG_FIFO_DATA 0x05 // Burst read does not autoincrement addr 00043 00044 // Mode Configuration register 00045 #define MAX30100_REG_MODE_CONFIGURATION 0x06 00046 #define MAX30100_MC_TEMP_EN (1 << 3) 00047 #define MAX30100_MC_RESET (1 << 6) 00048 #define MAX30100_MC_SHDN (1 << 7) 00049 typedef enum Mode { 00050 MAX30100_MODE_HRONLY = 0x02, 00051 MAX30100_MODE_SPO2_HR = 0x03 00052 } Mode; 00053 00054 // SpO2 Configuration register 00055 // Check tables 8 and 9, p19 of the MAX30100 datasheet to see the permissible 00056 // combinations of sampling rates and pulse widths 00057 #define MAX30100_REG_SPO2_CONFIGURATION 0x07 00058 #define MAX30100_SPC_SPO2_HI_RES_EN (1 << 6) 00059 typedef enum SamplingRate { 00060 MAX30100_SAMPRATE_50HZ = 0x00, 00061 MAX30100_SAMPRATE_100HZ = 0x01, 00062 MAX30100_SAMPRATE_167HZ = 0x02, 00063 MAX30100_SAMPRATE_200HZ = 0x03, 00064 MAX30100_SAMPRATE_400HZ = 0x04, 00065 MAX30100_SAMPRATE_600HZ = 0x05, 00066 MAX30100_SAMPRATE_800HZ = 0x06, 00067 MAX30100_SAMPRATE_1000HZ = 0x07 00068 } SamplingRate; 00069 00070 typedef enum LEDPulseWidth { 00071 MAX30100_SPC_PW_200US_13BITS = 0x00, 00072 MAX30100_SPC_PW_400US_14BITS = 0x01, 00073 MAX30100_SPC_PW_800US_15BITS = 0x02, 00074 MAX30100_SPC_PW_1600US_16BITS = 0x03 00075 } LEDPulseWidth; 00076 00077 // LED Configuration register 00078 #define MAX30100_REG_LED_CONFIGURATION 0x09 00079 typedef enum LEDCurrent { 00080 MAX30100_LED_CURR_0MA = 0x00, 00081 MAX30100_LED_CURR_4_4MA = 0x01, 00082 MAX30100_LED_CURR_7_6MA = 0x02, 00083 MAX30100_LED_CURR_11MA = 0x03, 00084 MAX30100_LED_CURR_14_2MA = 0x04, 00085 MAX30100_LED_CURR_17_4MA = 0x05, 00086 MAX30100_LED_CURR_20_8MA = 0x06, 00087 MAX30100_LED_CURR_24MA = 0x07, 00088 MAX30100_LED_CURR_27_1MA = 0x08, 00089 MAX30100_LED_CURR_30_6MA = 0x09, 00090 MAX30100_LED_CURR_33_8MA = 0x0a, 00091 MAX30100_LED_CURR_37MA = 0x0b, 00092 MAX30100_LED_CURR_40_2MA = 0x0c, 00093 MAX30100_LED_CURR_43_6MA = 0x0d, 00094 MAX30100_LED_CURR_46_8MA = 0x0e, 00095 MAX30100_LED_CURR_50MA = 0x0f 00096 } LEDCurrent; 00097 00098 // Temperature integer part register 00099 #define MAX30100_REG_TEMPERATURE_DATA_INT 0x16 00100 // Temperature fractional part register 00101 #define MAX30100_REG_TEMPERATURE_DATA_FRAC 0x17 00102 00103 // Revision ID register (RO) 00104 #define MAX30100_REG_REVISION_ID 0xfe 00105 // Part ID register 00106 #define MAX30100_REG_PART_ID 0xff 00107 00108 #endif
Generated on Wed Jul 13 2022 10:11:08 by
1.7.2