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.
Dependents: AS-289R2_Hello-World AS-289R2_Hello-World-mbed-OS hybrid_image_as289r2 microbit_AS-289R2 ... more
Diff: AS289R2.h
- Revision:
- 10:b7d6c02caf97
- Parent:
- 9:7f8acb87da7c
diff -r 7f8acb87da7c -r b7d6c02caf97 AS289R2.h
--- a/AS289R2.h Sat Mar 11 08:38:58 2017 +0000
+++ b/AS289R2.h Mon Jan 20 00:33:01 2020 +0900
@@ -2,8 +2,8 @@
******************************************************************************
* @file AS289R2.h
* @author Toyomasa Watarai
- * @version V1.0.0
- * @date 11 March 2017
+ * @version V1.1.0
+ * @date 20 January 2020
* @brief This file contains the class of a AS289R2 thermal control component
******************************************************************************
* @attention
@@ -44,7 +44,7 @@
* #include "AS829R2.h"
*
* Serial pc(USBTX, USBRX);
- * AS829R2 tp(D1); // tx, 9600bps
+ * AS829R2 tp(D1, D0); // tx, rx, 9600bps (default)
*
* int main()
* {
@@ -169,9 +169,10 @@
* which is connected to specified Serial pin with specified baud rate
*
* @param tx Serial TX pin
+ * @param rx Serial RX pin (dummy)
* @param baud (option) serial baud rate (default: 9600bps)
*/
- AS289R2(PinName tx, uint32_t baud = 9600);
+ AS289R2(PinName tx, PinName rx, uint32_t baud = 9600);
/** Create a AS289R2 instance
* which is connected to specified Serial instance with specified baud rate
@@ -179,7 +180,7 @@
* @param serial_obj Serial object (instance)
* @param baud (option) serial baud rate (default: 9600bps)
*/
- AS289R2(Serial &serial_obj, uint32_t baud = 9600);
+ AS289R2(RawSerial &serial_obj, uint32_t baud = 9600);
/** Destructor of AS289R2
*/
@@ -365,8 +366,8 @@
void defaultBarCodeBarSize(void);
private:
- Serial *_serial_p;
- Serial &_serial;
+ RawSerial *_serial_p;
+ RawSerial &_serial;
protected:
// Stream implementation functions
AS-289R2 Thermal Printer Shield