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@21:6878944d2ce2, 2016-01-02 (annotated)
- Committer:
- citrusbyte
- Date:
- Sat Jan 02 02:29:43 2016 +0000
- Revision:
- 21:6878944d2ce2
- Parent:
- 0:f479e4f4db0e
Update library version
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| jb8414 | 0:f479e4f4db0e | 1 | #ifndef NullPrint_h |
| jb8414 | 0:f479e4f4db0e | 2 | #define NullPrint_h |
| jb8414 | 0:f479e4f4db0e | 3 | |
| jb8414 | 0:f479e4f4db0e | 4 | #include "Print.h" |
| jb8414 | 0:f479e4f4db0e | 5 | |
| jb8414 | 0:f479e4f4db0e | 6 | // Null Print class used to calculate length to print |
| jb8414 | 0:f479e4f4db0e | 7 | class NullPrint : public Print { |
| jb8414 | 0:f479e4f4db0e | 8 | public: |
| jb8414 | 0:f479e4f4db0e | 9 | virtual size_t write(uint8_t b) { |
| jb8414 | 0:f479e4f4db0e | 10 | return 1; |
| jb8414 | 0:f479e4f4db0e | 11 | } |
| jb8414 | 0:f479e4f4db0e | 12 | |
| jb8414 | 0:f479e4f4db0e | 13 | virtual size_t write(const uint8_t* buf, size_t size) { |
| jb8414 | 0:f479e4f4db0e | 14 | return size; |
| jb8414 | 0:f479e4f4db0e | 15 | } |
| jb8414 | 0:f479e4f4db0e | 16 | }; |
| jb8414 | 0:f479e4f4db0e | 17 | |
| jb8414 | 0:f479e4f4db0e | 18 | #endif /* NullPrint_h */ |
