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.
Fork of iSerial by
Diff: iSerial.h
- Revision:
- 4:b38ef9675d39
- Parent:
- 3:d5353b68105f
- Child:
- 5:d83fc550ccbc
--- a/iSerial.h Sat Sep 01 12:28:28 2012 +0000
+++ b/iSerial.h Mon Sep 03 09:15:34 2012 +0000
@@ -16,64 +16,30 @@
class iSerial : public Serial {
protected:
+ const int txbufsize;
+ const int rxbufsize;
RingBuffer txbuf;
RingBuffer rxbuf;
+ char* str;
void tx_handler(void);
void rx_handler(void);
-
public:
enum TERMINL_CODES { CR=0x0D, LF=0x0A };
- /*
- * void init_sci(void)
- *
- *@|[gú»ÖDDDD·×ÄÌI/OÌÝèðsÁÄ¢éD
- *
- *@@øFȵ
- *@@ßèlFȵ
- *
- */
iSerial(PinName _tx, PinName _rx, const char *_name=NULL, int _txbufsize=100, int _rxbufsize=100);
-
- /*
- * VAüÍɶª é©Ç¤©`FbN
- * ÔlF O@@F¶ªÈ¢
- * OÈOF¶ªÄ¢é
- */
- int readable(void);
+ virtual ~iSerial();
- /*
- * VA©çê¶üÍ
- */
- int getc(void);
-
- /*
- *@VAÖê¶oÍ
- */
- void putc(short ch);
-
-
- /*
- *@VAÖ¶ñðoÍ
- *@@FêñÌÅå¶ÍLINESIZE
- *@@F¶ñÌIíèÉÍk¶ªKvD
- *
- *@@øF¶ñÖÌ|C^
- *@@ÔlFo͵½¶
- */
short int putstr(const char* s);
- /*@void outs(char* s)
- *@VAÖ¶ñðêsoÍ
- *@@FÅãÉüsR[hðé¼ÍoutstrƯ¶
- *
- *@@øF¶ñÖÌ|C^
- *@@ÔlFo͵½¶
- */
+ int readable(void);
+ int getc(void);
+ void putc(short ch);
short int puts(const char* s);
+ //void printf();
+ char* printf(const char* format, ...);
};
