class heart_rate

Revision:
1:e9f4fb198b63
Parent:
0:31d7988294aa
Child:
2:5cb0e405a24c
--- a/pixart_heart_rate.h	Fri Oct 27 05:55:57 2017 +0000
+++ b/pixart_heart_rate.h	Fri Oct 27 06:32:02 2017 +0000
@@ -12,8 +12,11 @@
 namespace pixart {
     
     
+    struct pah_hr_data;
+    
     class heart_rate {
     public:
+        typedef void (*DEBUG_PRINTF_HANDLE)(const char *fmt, ...);
         typedef uint64_t (*TIME_TO_MILLISEC_HANDLE)(uint64_t time);
     
         enum gravity_mode {
@@ -57,6 +60,8 @@
         
         bool    init(gravity_mode gravity = gravity_4g);
         
+        void    set_debug_printf(DEBUG_PRINTF_HANDLE handler);
+        
         void    reset();
         
         bool    set_ppg_sample(const ppg_sample &ppg_sample);
@@ -75,11 +80,13 @@
     
     private:
         void flush();
+        void log_pah8series_data(const pah_hr_data *pxialg_data);
     
         const size_t                PPG_MAX_SAMPLE_NUM;
         const size_t                PPG_CH_NUM;
         const size_t                ACCEL_MAX_SAMPLE_NUM;
         
+        DEBUG_PRINTF_HANDLE         m_debug_printf_handler;
         TIME_TO_MILLISEC_HANDLE     m_time_to_millisec_handler;
         void                        *m_alg_buffer;
         gravity_mode                m_gravity_mode;