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: WNCInterface_M2Xdemo ATT_WNCInterface_Info WNCInterface_HTTP_example Public_IoT_M2X_Cellular_Demo
Fork of M2XStreamClient by
NullPrint.h@5:ea68c8980ad8, 2013-10-24 (annotated)
- Committer:
- citrusbyte
- Date:
- Thu Oct 24 12:22:33 2013 +0000
- Revision:
- 5:ea68c8980ad8
- Child:
- 7:e64d9e1a800a
Initial commit for M2X mbed client library
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 | 5:ea68c8980ad8 | 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 |
