proxy 2 pravi

Dependencies:   mbed proxy2 proxy2123

Files at this revision

API Documentation at this revision

Comitter:
pavledjo
Date:
Thu Jul 01 20:17:41 2021 +0000
Parent:
4:6a931904c92a
Commit message:
proxy2

Changed in this revision

main_classic.cpp Show annotated file Show diff for this revision Revisions of this file
rohm-rpr0521.lib Show annotated file Show diff for this revision Revisions of this file
rohm-sensor-hal.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 6a931904c92a -r f266d5aa7338 main_classic.cpp
--- a/main_classic.cpp	Tue Sep 20 11:16:04 2016 +0000
+++ b/main_classic.cpp	Thu Jul 01 20:17:41 2021 +0000
@@ -25,7 +25,14 @@
     bool error;
     uint16_t data[3];
     
-    error = rpr0521_read_data(&data[0]);
+    error = rpr0521_read_data(&data[0],0);
+    if (!error) {
+        pc.printf("PS[%4u], Als0[%4u], Als1[%4u]\n\r", data[0], data[1], data[2]);
+        }
+    else {
+        pc.printf("\n\r");
+        }
+    error = rpr0521_read_data(&data[0],1);
     if (!error) {
         pc.printf("PS[%4u], Als0[%4u], Als1[%4u]\n\r", data[0], data[1], data[2]);
         }
@@ -38,11 +45,15 @@
     pc.printf("\nRPR0521 library test program.\n\r");
     I2CCommonBegin();
 
-    rpr0521_wait_until_found();
+   rpr0521_wait_until_found(0);
     pc.printf("\nSensor found.\n\r");
-    rpr0521_initial_setup();
+    rpr0521_initial_setup(0);
     wait(1);
     
+    rpr0521_wait_until_found(1);
+    pc.printf("\nSensor found.\n\r");
+    rpr0521_initial_setup(1);
+    wait(1);    
     while(1) {
         rpr0521_print_one_value();
         wait(0.1);
diff -r 6a931904c92a -r f266d5aa7338 rohm-rpr0521.lib
--- a/rohm-rpr0521.lib	Tue Sep 20 11:16:04 2016 +0000
+++ b/rohm-rpr0521.lib	Thu Jul 01 20:17:41 2021 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/Rohm/code/rohm-rpr0521/#145f11782373
+https://os.mbed.com/users/pavledjo/code/proxy2/#83c4958e4bdc
diff -r 6a931904c92a -r f266d5aa7338 rohm-sensor-hal.lib
--- a/rohm-sensor-hal.lib	Tue Sep 20 11:16:04 2016 +0000
+++ b/rohm-sensor-hal.lib	Thu Jul 01 20:17:41 2021 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/Rohm/code/rohm-sensor-hal/#38c206f19bb7
+https://os.mbed.com/users/pavledjo/code/proxy2123/#37b8f497b698