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
00001 #ifndef WRITER_EMBEDDED_H 00002 #define WRITER_EMBEDDED_H 00003 00004 #include "stdint.h" 00005 #include "WriterBase.h" 00006 #include "RingBuffer.h" 00007 00008 namespace olc { 00009 00010 /** 00011 * write ol commands to a bytestring. 00012 **/ 00013 00014 template <class T> 00015 class WriterEmbedded : public WriterBase { 00016 00017 public: 00018 WriterEmbedded(T& aBuffer) : mBuffer(aBuffer) { 00019 }; 00020 inline int size() 00021 { 00022 return mBuffer.size(); 00023 }; 00024 inline int spaceLeft() 00025 { 00026 return mBuffer.capacityLeft(); 00027 }; 00028 00029 00030 protected: 00031 T& mBuffer; 00032 void put(uint8_t aValue) { 00033 mBuffer.pushBack(aValue); 00034 }; 00035 }; 00036 00037 } // end namespace ol 00038 00039 #endif // WRITER_BASE_H
Generated on Thu Jul 28 2022 18:01:06 by
1.7.2