MAX30001G  1.2.0
Arduino library for MAX30001G ECG and BIOZ AFE
max30001g_typedefs.h
Go to the documentation of this file.
1 /******************************************************************************************************/
2 /* Structures */
3 /******************************************************************************************************/
4 
5 #ifndef MAX30001G_TYPEDEFS_H
6 #define MAX30001G_TYPEDEFS_H
7 
8 #include <stdint.h>
9 #include "max30001g_defs.h"
10 
17  float magnitude;
18  float phase;
19 };
20 
29 };
30 
40  bool spi_ok;
41  uint32_t info_reg;
42  uint32_t status_reg;
45 };
46 
52 enum BIOZScanPhaseRange : uint8_t {
55 };
56 
78  uint8_t avg;
79  bool fast;
80  bool fourleads;
83  uint8_t max_retries;
91  uint8_t freq_end_index;
95  uint8_t settle_samples;
97 
99  : avg(2),
100  fast(false),
101  fourleads(false),
102  use_internal_resistor(false),
103  internal_resistor_ohm(1000),
104  max_retries(4),
105  low_target_fraction(0.10f),
106  high_target_fraction(0.90f),
107  target_fraction(0.60f),
109  outlier_sigma(2.5f),
110  timeout_margin_ms(50),
111  freq_start_index(0),
112  freq_end_index(7),
114  internal_bist_ahpf(255U),
115  initial_current_nA(8000),
116  settle_samples(24),
118 };
119 
126  bool valid;
127  uint32_t en_int1;
128  uint32_t en_int2;
129  uint32_t mngr_int;
130  uint32_t mngr_dyn;
131  uint32_t cnfg_gen;
132  uint32_t cnfg_cal;
133  uint32_t cnfg_emux;
134  uint32_t cnfg_ecg;
135  uint32_t cnfg_bmux;
136  uint32_t cnfg_bioz;
137  uint32_t cnfg_bioz_lc;
138  uint32_t cnfg_rtor1;
139  uint32_t cnfg_rtor2;
140 };
141 
142 #endif // MAX30001G_TYPEDEFS_H
#define MAX30001_BIOZ_NUM_FREQUENCIES
Definition: max30001g_defs.h:11
BIOZScanPhaseRange
BIOZ scan phase-density selection.
Definition: max30001g_typedefs.h:52
@ BIOZ_SCAN_PHASE_FULL
Definition: max30001g_typedefs.h:53
@ BIOZ_SCAN_PHASE_REDUCED
Definition: max30001g_typedefs.h:54
BIOZScanConfig configuration structure fields:
Definition: max30001g_typedefs.h:77
BIOZScanConfig()
Definition: max30001g_typedefs.h:98
bool use_internal_resistor
Definition: max30001g_typedefs.h:81
uint8_t internal_bist_ahpf
Definition: max30001g_typedefs.h:93
uint8_t freq_end_index
Definition: max30001g_typedefs.h:91
bool fourleads
Definition: max30001g_typedefs.h:80
int32_t initial_current_nA
Definition: max30001g_typedefs.h:94
float high_target_fraction
Definition: max30001g_typedefs.h:85
BIOZScanPhaseRange phase_range
Definition: max30001g_typedefs.h:92
uint8_t settle_samples
Definition: max30001g_typedefs.h:95
float target_fraction
Definition: max30001g_typedefs.h:86
uint8_t freq_start_index
Definition: max30001g_typedefs.h:90
float low_target_fraction
Definition: max30001g_typedefs.h:84
float outlier_sigma
Definition: max30001g_typedefs.h:88
uint8_t outlier_min_samples
Definition: max30001g_typedefs.h:87
uint8_t avg
Definition: max30001g_typedefs.h:78
uint16_t internal_resistor_ohm
Definition: max30001g_typedefs.h:82
uint16_t timeout_margin_ms
Definition: max30001g_typedefs.h:89
bool fast
Definition: max30001g_typedefs.h:79
uint8_t max_retries
Definition: max30001g_typedefs.h:83
uint8_t current_change_settle_samples
Definition: max30001g_typedefs.h:96
ConfigSnapshot structure for storing/restoring MAX30001G register configurations.
Definition: max30001g_typedefs.h:125
uint32_t cnfg_rtor2
Definition: max30001g_typedefs.h:139
uint32_t en_int2
Definition: max30001g_typedefs.h:128
uint32_t cnfg_bioz
Definition: max30001g_typedefs.h:136
uint32_t en_int1
Definition: max30001g_typedefs.h:127
uint32_t cnfg_gen
Definition: max30001g_typedefs.h:131
uint32_t cnfg_emux
Definition: max30001g_typedefs.h:133
uint32_t mngr_dyn
Definition: max30001g_typedefs.h:130
uint32_t mngr_int
Definition: max30001g_typedefs.h:129
uint32_t cnfg_ecg
Definition: max30001g_typedefs.h:134
uint32_t cnfg_bmux
Definition: max30001g_typedefs.h:135
uint32_t cnfg_cal
Definition: max30001g_typedefs.h:132
uint32_t cnfg_bioz_lc
Definition: max30001g_typedefs.h:137
bool valid
Definition: max30001g_typedefs.h:126
uint32_t cnfg_rtor1
Definition: max30001g_typedefs.h:138
HealthCheckResult structure for storing health check results.
Definition: max30001g_typedefs.h:39
bool spi_ok
Definition: max30001g_typedefs.h:40
bool pll_unlocked
Definition: max30001g_typedefs.h:43
uint32_t info_reg
Definition: max30001g_typedefs.h:41
uint32_t status_reg
Definition: max30001g_typedefs.h:42
bool fault_present
Definition: max30001g_typedefs.h:44
ImpedanceModel structure for storing impedance measurement results.
Definition: max30001g_typedefs.h:16
float phase
Definition: max30001g_typedefs.h:18
float magnitude
Definition: max30001g_typedefs.h:17
ImpedanceSpectrum structure for storing one full BIOZ sweep.
Definition: max30001g_typedefs.h:25
float magnitude[MAX30001_BIOZ_NUM_FREQUENCIES]
Definition: max30001g_typedefs.h:27
float phase[MAX30001_BIOZ_NUM_FREQUENCIES]
Definition: max30001g_typedefs.h:28
float frequency[MAX30001_BIOZ_NUM_FREQUENCIES]
Definition: max30001g_typedefs.h:26