AS-289R2 library test code for mbed 2 (classic)

Dependencies:   AS289R2 mbed

Revision:
5:53deb3bfdd08
Parent:
4:c86842a92553
--- a/main.cpp	Sun Sep 04 03:01:57 2016 +0000
+++ b/main.cpp	Mon Sep 19 13:47:53 2016 +0000
@@ -1,5 +1,5 @@
 /* AS289R2 library test program
- * Copyright (c) 2016, Toyomasa Watarai 
+ * Copyright (c) 2016, Toyomasa Watarai
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -25,6 +25,8 @@
 Serial pc(USBTX, USBRX);
 AS289R2 tp(D1);
 
+const char url[] = "https://developer.mbed.org/components/AS-289R2-Thermal-Printer-Shield/";
+
 int main()
 {
     tp.initialize();
@@ -65,8 +67,8 @@
 
     tp.setANKFont(AS289R2::ANK_8x16);
     tp.printf("QR\r");
-    tp.printQRCode(AS289R2::QR_ERR_LVL_M, "https://developer.mbed.org/components/AS-289R2-Thermal-Printer-Shield/");
-    tp.printf("\rhttps://developer.mbed.org/components/AS-289R2-Thermal-Printer-Shield/\r");
+    tp.printQRCode(AS289R2::QR_ERR_LVL_M, url);
+    tp.printf("\r%s\r", url);
     tp.putLineFeed(2);
 
     tp.printf("UPC-A\r");