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.
WriterEmbedded.h
- Committer:
- daan
- Date:
- 2011-12-16
- Revision:
- 1:578d6bbe9f09
File content as of revision 1:578d6bbe9f09:
#ifndef WRITER_EMBEDDED_H #define WRITER_EMBEDDED_H #include "stdint.h" #include "WriterBase.h" #include "RingBuffer.h" namespace olc { /** * write ol commands to a bytestring. **/ template <class T> class WriterEmbedded : public WriterBase { public: WriterEmbedded(T& aBuffer) : mBuffer(aBuffer) { }; inline int size() { return mBuffer.size(); }; inline int spaceLeft() { return mBuffer.capacityLeft(); }; protected: T& mBuffer; void put(uint8_t aValue) { mBuffer.pushBack(aValue); }; }; } // end namespace ol #endif // WRITER_BASE_H