Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:f0ff6e3be000, committed 2020-02-07
- Comitter:
 - mauuuuul
 - Date:
 - Fri Feb 07 08:24:01 2020 +0000
 - Parent:
 - 0:9c725b5c2aab
 - Commit message:
 - Penyesuaian dengan printer Trawas
 
Changed in this revision
| TMU220.cpp | Show annotated file Show diff for this revision Revisions of this file | 
| TMU220.h | Show annotated file Show diff for this revision Revisions of this file | 
diff -r 9c725b5c2aab -r f0ff6e3be000 TMU220.cpp
--- a/TMU220.cpp	Fri Jul 05 10:32:43 2019 +0000
+++ b/TMU220.cpp	Fri Feb 07 08:24:01 2020 +0000
@@ -3,14 +3,14 @@
 
 TMU220::TMU220(PinName tx_, PinName rx_, uint32_t baud_)
     :
-    Com_p(new SoftSerial(tx_, rx_)),
+    Com_p(new Serial(tx_, rx_)),
     Com(*Com_p)
 {
     Com.baud(baud_);
 //    initialize();
 }
  
-TMU220::TMU220(SoftSerial &serial_obj, uint32_t baud_)
+TMU220::TMU220(Serial &serial_obj, uint32_t baud_)
     :
     Com_p(NULL),
     Com(serial_obj)
@@ -181,7 +181,7 @@
 {
     Com.putc(0x1D);
     Com.putc(0x56);
-    Com.putc(0x01);
+    Com.putc(0x31);
 }
 
 void TMU220::feednCut(uint8_t lines)
diff -r 9c725b5c2aab -r f0ff6e3be000 TMU220.h
--- a/TMU220.h	Fri Jul 05 10:32:43 2019 +0000
+++ b/TMU220.h	Fri Feb 07 08:24:01 2020 +0000
@@ -2,8 +2,6 @@
 #define TM220U_H
 
 //#include "mbed.h"
-#include "SoftSerial.h"
-
 #if defined(__CC_ARM)
 // To avoid "invalid multibyte character sequence" warning
 #pragma diag_suppress 870
@@ -18,7 +16,7 @@
     enum line_mode{single_line=1, double_line, triple_line};
 
     TMU220(PinName tx_, PinName rx_, uint32_t baud_=9600);
-    TMU220(SoftSerial &serial_obj, uint32_t baud_=9600);
+    TMU220(Serial &serial_obj, uint32_t baud_=9600);
     virtual ~TMU220();
     
     void initialize(void);
@@ -45,8 +43,8 @@
     void clearEnlargement();
     
 private :
-    SoftSerial *Com_p;
-    SoftSerial &Com;
+    Serial *Com_p;
+    Serial &Com;
     
 protected:
     // Stream implementation functions