11#include " protocentral_afe44xx.h"
22#include " Protocentral_spo2_algorithm.h"
33
4- static int32_t an_x[ BUFFER_SIZE];
5- static int32_t an_y[ BUFFER_SIZE];
6-
74const 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 ,
85 99 , 99 , 99 , 99 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 ,
96 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,
1714
1815void 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)
1916{
17+ static int32_t an_x[ BUFFER_SIZE];
18+ static int32_t an_y[ BUFFER_SIZE];
19+
2020 uint32_t un_ir_mean;
2121 int32_t k, n_i_ratio_count;
2222 int32_t i, n_exact_ir_valley_locs_count, n_middle_idx;
0 commit comments