Driver for the Digole Serial universal LCD display adapter

Fork of DigoleSerialDisp by Michael Shimniok

Files at this revision

API Documentation at this revision

Comitter:
jpnovak
Date:
Tue Nov 17 16:09:34 2015 +0000
Parent:
4:c4b2a8f0d056
Commit message:
text commands working. not recognizing header files in command set. Only partial commands working. ;

Changed in this revision

DigoleSerialDisp.cpp Show annotated file Show diff for this revision Revisions of this file
DigoleSerialDisp.h Show annotated file Show diff for this revision Revisions of this file
diff -r c4b2a8f0d056 -r 7d3fd21b9ead DigoleSerialDisp.cpp
--- a/DigoleSerialDisp.cpp	Mon Feb 25 06:12:59 2013 +0000
+++ b/DigoleSerialDisp.cpp	Tue Nov 17 16:09:34 2015 +0000
@@ -20,7 +20,7 @@
 
 char buf[128];
 char tmp[128];
-
+/*
 DigoleSerialDisp::DigoleSerialDisp(PinName sda, PinName scl, uint8_t address):
     _device(sda, scl)
 {
@@ -28,6 +28,16 @@
     _device.frequency(100000);
     _Comdelay=70;
 }
+*/
+/*
+DigoleSerialDisp(PinName tx, PinName rx, unsigned long baud) //UART set up
+    {
+        _mySerial = s;
+        _Baud = baud;
+        _Comdelay=2;
+    }
+*/
+   
 
 size_t DigoleSerialDisp::write(const char x)
 {
diff -r c4b2a8f0d056 -r 7d3fd21b9ead DigoleSerialDisp.h
--- a/DigoleSerialDisp.h	Mon Feb 25 06:12:59 2013 +0000
+++ b/DigoleSerialDisp.h	Tue Nov 17 16:09:34 2015 +0000
@@ -33,6 +33,31 @@
 class DigoleSerialDisp {
 public:
 
+#if defined(_Digole_Serial_UART_)
+
+
+    size_t write(uint8_t value) {
+        _mySerial->write((uint8_t) value);
+        return 1; // assume sucess
+    }
+
+    void begin(void) {
+        _mySerial->begin(9600);
+        _mySerial->print("SB");
+        _mySerial->println(_Baud);
+        delay(100);
+        _mySerial->begin(_Baud);
+    }
+    size_t read1(void)
+    {
+        int t;
+        do {
+            t = _mySerial->read();
+        } while (t == -1);
+        return t;
+    }
+#endif
+
     /** Create a new Digole Serial Display interface
      *
      * @param sda is the pin for I2C SDA