33 #define MAX30100_I2C_ADDRESS 0x57 44 typedef void (*func_sample_ready_handler)(
max30100_value sample,
void* arg);
49 MAX30100_SAMPLE_STATE_IDLE,
51 MAX30100_SAMPLE_STATE_ONE_SHOT,
53 MAX30100_SAMPLE_STATE_CONTINUOUS,
55 MAX30100_SAMPLE_STATE_CONTINUOUS_BUFFERED
56 } MAX30100_SAMPLE_STATE;
61 MAX30100_REG_INTERRUPT_STATUS = 0x00,
63 MAX30100_REG_INTERRUPT_ENABLE = 0x01,
65 MAX30100_REG_FIFO_WR_PTR = 0x02,
67 MAX30100_REG_FIFO_OVF_COUNTER = 0x03,
69 MAX30100_REG_FIFO_RD_PTR = 0x04,
71 MAX30100_REG_FIFO_DATA = 0x05,
73 MAX30100_REG_MODE_CONFIG = 0x06,
75 MAX30100_REG_SPO2_CONFIG = 0x07,
77 MAX30100_REG_LED_CONFIG = 0x09,
79 MAX30100_REG_TEMP_INTEGER = 0x16,
81 MAX30100_REG_TEMP_FRACTION = 0x17,
83 MAX30100_REG_REV_ID = 0xFE,
85 MAX30100_REG_PART_ID = 0xFF
90 #define MAX30100_A_FULL (1 << 7) 92 #define MAX30100_TEMP_RDY (1 << 6) 94 #define MAX30100_HR_RDY (1 << 5) 96 #define MAX30100_SPO2_RDY (1 << 4) 98 #define MAX30100_PWR_RDY (1 << 0) 102 #define MAX30100_EN_A_FULL (1 << 7) 104 #define MAX30100_EN_TEMP_RDY (1 << 6) 106 #define MAX30100_EN_HR_RDY (1 << 5) 108 #define MAX30100_EN_SPO2_RDY (1 << 4) 112 #define MAX30100_SHDN (1 << 7) 114 #define MAX30100_RESET (1 << 6) 116 #define MAX30100_TEMP_EN (1 << 3) 118 typedef enum _MAX30100_MODE {
120 MAX30100_MODE_DISABLED = 0x00,
122 MAX30100_MODE_HR_EN = 0x02,
124 MAX30100_MODE_SPO2_EN = 0x03
128 #define MAX30100_SPO2_HI_RES_EN (1 << 6) 129 typedef enum _MAX30100_SR {
130 MAX30100_SR_50_HZ = 0x00,
131 MAX30100_SR_100_HZ = 0x01,
132 MAX30100_SR_167_HZ = 0x02,
133 MAX30100_SR_200_HZ = 0x03,
134 MAX30100_SR_400_HZ = 0x04,
135 MAX30100_SR_600_HZ = 0x05,
136 MAX30100_SR_900_HZ = 0x06,
137 MAX30100_SR_1000_HZ = 0x07
140 typedef enum _MAX30100_LED_PW {
141 MAX30100_LED_PW_200_US_13_BITS = 0x00,
142 MAX30100_LED_PW_400_US_14_BITS = 0x01,
143 MAX30100_LED_PW_800_US_15_BITS = 0x02,
144 MAX30100_LED_PW_1600_US_16_BITS = 0x03
149 typedef enum _MAX30100_LED_CURRENT {
150 MAX30100_LED_CURRENT_0_0_MA = 0x00,
151 MAX30100_LED_CURRENT_4_4_MA = 0x01,
152 MAX30100_LED_CURRENT_7_6_MA = 0x02,
153 MAX30100_LED_CURRENT_11_0_MA = 0x03,
154 MAX30100_LED_CURRENT_14_2_MA = 0x04,
155 MAX30100_LED_CURRENT_17_4_MA = 0x05,
156 MAX30100_LED_CURRENT_20_8_MA = 0x06,
157 MAX30100_LED_CURRENT_24_0_MA = 0x07,
158 MAX30100_LED_CURRENT_27_1_MA = 0x08,
159 MAX30100_LED_CURRENT_30_6_MA = 0x09,
160 MAX30100_LED_CURRENT_33_8_MA = 0x0a,
161 MAX30100_LED_CURRENT_37_0_MA = 0x0b,
162 MAX30100_LED_CURRENT_40_2_MA = 0x0c,
163 MAX30100_LED_CURRENT_43_6_MA = 0x0d,
164 MAX30100_LED_CURRENT_46_8_MA = 0x0e,
165 MAX30100_LED_CURRENT_50_0_MA = 0x0f
166 } MAX30100_LED_CURRENT;
Definition: max30100_regs.h:36