1
1
#include " protocentral_afe44xx.h"
2
2
#include " Protocentral_spo2_algorithm.h"
3
3
4
- static int32_t an_x[ BUFFER_SIZE];
5
- static int32_t an_y[ BUFFER_SIZE];
6
-
7
4
const uint8_t uch_spo2_table[184 ]={ 95 , 95 , 95 , 96 , 96 , 96 , 97 , 97 , 97 , 97 , 97 , 98 , 98 , 98 , 98 , 98 , 99 , 99 , 99 , 99 ,
8
5
99 , 99 , 99 , 99 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 ,
9
6
100 , 100 , 100 , 100 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 98 , 98 , 98 , 98 , 98 , 98 , 97 , 97 ,
@@ -17,6 +14,9 @@ const uint8_t uch_spo2_table[184]={ 95, 95, 95, 96, 96, 96, 97, 97, 97, 97, 97,
17
14
18
15
void spo2_algorithm :: estimate_spo2(uint16_t *pun_ir_buffer, int32_t n_ir_buffer_length, uint16_t *pun_red_buffer, int32_t *pn_spo2, int8_t *pch_spo2_valid, int32_t *pn_heart_rate, int8_t *pch_hr_valid)
19
16
{
17
+ static int32_t an_x[ BUFFER_SIZE];
18
+ static int32_t an_y[ BUFFER_SIZE];
19
+
20
20
uint32_t un_ir_mean;
21
21
int32_t k, n_i_ratio_count;
22
22
int32_t i, n_exact_ir_valley_locs_count, n_middle_idx;
0 commit comments