Demo Heart Rate with PAH8011

Dependencies:   pixart_heart_rate pixart_pah8011

Dependents:   PAH8011_nRF52_Program PixArt_PAH8011_HeartRate_NUCLEO-L476RG PixArt_PAH8011_HR_NUCLEO-L476RG

Files at this revision

API Documentation at this revision

Comitter:
bell_huang
Date:
Mon Oct 30 06:11:23 2017 +0000
Parent:
0:45616b53ea33
Child:
2:b3716992c4cb
Commit message:
fix

Changed in this revision

pixart_heart_rate_demo.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/pixart_heart_rate_demo.cpp	Mon Oct 30 06:05:00 2017 +0000
+++ b/pixart_heart_rate_demo.cpp	Mon Oct 30 06:11:23 2017 +0000
@@ -26,10 +26,10 @@
         system_clock_init();
         
         // interrupt
-        pah8011_interrupt.rise(this, heart_rate_demo::pah8011_interrupt_handle);
+        m_interrupt.rise(this, heart_rate_demo::pah8011_interrupt_handle);
         
         // heart_rate
-        pixart::heart_rate heart_rate(time_to_millisec);
+        pixart::heart_rate heart_rate(heart_rate_demo::time_to_millisec);
         heart_rate.enable_debug_print(heart_rate_demo::debug_print);
         if (!heart_rate.init())
         {
@@ -39,8 +39,8 @@
         
         // pah8011
         pixart::pah8011 pah8011;
-        pah8011.enable_debug_print(debug_print);
-        if (!pah8011.init(i2c))
+        pah8011.enable_debug_print(heart_rate_demo::debug_print);
+        if (!pah8011.init(m_i2c))
         {
             pc->printf("pah8011.init() failed\n");
             error_handler();