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 M2XStreamClient by
NullPrint.h@7:e64d9e1a800a, 2013-11-14 (annotated)
- Committer:
- citrusbyte
- Date:
- Thu Nov 14 15:14:54 2013 +0000
- Revision:
- 7:e64d9e1a800a
- Parent:
- 5:ea68c8980ad8
Fix compiling errors
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| citrusbyte | 5:ea68c8980ad8 | 1 | #ifndef NullPrint_h |
| citrusbyte | 5:ea68c8980ad8 | 2 | #define NullPrint_h |
| citrusbyte | 5:ea68c8980ad8 | 3 | |
| citrusbyte | 5:ea68c8980ad8 | 4 | #include "Print.h" |
| citrusbyte | 5:ea68c8980ad8 | 5 | |
| citrusbyte | 5:ea68c8980ad8 | 6 | // Null Print class used to calculate length to print |
| citrusbyte | 5:ea68c8980ad8 | 7 | class NullPrint : public Print { |
| citrusbyte | 5:ea68c8980ad8 | 8 | public: |
| citrusbyte | 5:ea68c8980ad8 | 9 | virtual size_t write(uint8_t b) { |
| citrusbyte | 5:ea68c8980ad8 | 10 | return 1; |
| citrusbyte | 5:ea68c8980ad8 | 11 | } |
| citrusbyte | 7:e64d9e1a800a | 12 | |
| citrusbyte | 5:ea68c8980ad8 | 13 | virtual size_t write(const uint8_t* buf, size_t size) { |
| citrusbyte | 5:ea68c8980ad8 | 14 | return size; |
| citrusbyte | 5:ea68c8980ad8 | 15 | } |
| citrusbyte | 5:ea68c8980ad8 | 16 | }; |
| citrusbyte | 5:ea68c8980ad8 | 17 | |
| citrusbyte | 5:ea68c8980ad8 | 18 | #endif /* NullPrint_h */ |
| citrusbyte | 5:ea68c8980ad8 | 19 |
