Initial Release of Library for PAT9125 OTS on L476RG Platform

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
pixus_mbed
Date:
Tue Oct 17 09:23:10 2017 +0000
Parent:
0:411244c71423
Child:
2:4fb710ae08dd
Child:
3:cd3762bea4b1
Child:
5:61318505e528
Commit message:
No default sda and scl pins for pat9125_i2c. ; Always configure sda/scl pins from caller.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
pat9125_mbed/pat9125_i2c.h Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Oct 03 07:26:38 2017 +0000
+++ b/main.cpp	Tue Oct 17 09:23:10 2017 +0000
@@ -25,6 +25,8 @@
 
 
 Serial  pc(USBTX, USBRX);
+#define I2C_SDA_PIN I2C_SDA0
+#define I2C_SCL_PIN I2C_SCL0
 //DigitalIn sdaDummy(I2C_SDA0, PullUp);
 //DigitalIn sclDummy(I2C_SCL0, PullUp);
 pat9125_i2c *gp_pat9125_i2c;//(I2C_SDA0, I2C_SCL0);
@@ -64,7 +66,7 @@
     // ------- LCM Initialization ------- //
     
     // +++++++ PAT9125 Initialization +++++++ //
-    gp_pat9125_i2c = new pat9125_i2c();
+    gp_pat9125_i2c = new pat9125_i2c(I2C_SDA_PIN, I2C_SCL_PIN);
     gp_pat9125_i2c->frequency(400000); 
     g_pat9125_mbed_state.p_i2c = gp_pat9125_i2c;
     g_pat9125_mbed_state.p_pc = &pc;
--- a/pat9125_mbed/pat9125_i2c.h	Tue Oct 03 07:26:38 2017 +0000
+++ b/pat9125_mbed/pat9125_i2c.h	Tue Oct 17 09:23:10 2017 +0000
@@ -6,7 +6,7 @@
 class pat9125_i2c : public I2C
 {
     public:           
-        pat9125_i2c(PinName sda = I2C_SDA0, PinName scl = I2C_SCL0);
+        pat9125_i2c(PinName sda, PinName scl);
         static pat9125_i2c * reset() ;
 };