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

Dependencies:   AS289R2 mbed

Files at this revision

API Documentation at this revision

Comitter:
MACRUM
Date:
Mon Sep 19 13:47:53 2016 +0000
Parent:
4:c86842a92553
Child:
6:7fa194979ae6
Commit message:
Update libraries and fix const strings

Changed in this revision

AS289R2.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/AS289R2.lib	Sun Sep 04 03:01:57 2016 +0000
+++ b/AS289R2.lib	Mon Sep 19 13:47:53 2016 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/MACRUM/code/AS289R2/#982a7efb3ef0
+https://developer.mbed.org/users/MACRUM/code/AS289R2/#ce25d0949cbd
--- 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");