ARM mbed M2X API Client: The ARM mbed client library is used to send/receive data to/from AT&T's M2X service from mbed LPC1768 microcontrollers.
Dependents: m2x-demo-all M2X_MTS_ACCEL_DEMO M2X_MTS_Accel M2X_K64F_ACCEL ... more
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 |