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.
PlayerEmbedded.h
00001 #ifndef PLAYER_EMBEDDED_H 00002 #define PLAYER_EMBEDDED_H 00003 00004 #include "stdint.h" 00005 00006 #include "PlayerBase.h" 00007 #include "RingBuffer.h" 00008 00009 // #include <iostream> 00010 00011 namespace olc { 00012 00013 class PlayerEmbedded : public PlayerBase 00014 { 00015 public: 00016 PlayerEmbedded(fou::RingBuffer8k &aBuffer) : mBuffer(aBuffer) {}; 00017 00018 // void setGalvo(uint16_t x, uint16_t y); 00019 // void setLaserPower(uint16_t power); 00020 // void wait(uint16_t ms); 00021 00022 protected: 00023 inline int bytesLeft() { 00024 // std::cout << "buffer size" << mBuffer.size() << std::endl; 00025 return mBuffer.size(); 00026 }; 00027 inline uint8_t get() { 00028 uint8_t d = mBuffer.front(); 00029 mBuffer.popFront(); 00030 return d; 00031 }; 00032 00033 fou::RingBuffer8k& mBuffer; 00034 }; 00035 00036 00037 }; // end namespace ol 00038 00039 #endif // PLAYER_BASE_H
Generated on Thu Jul 28 2022 18:01:06 by
1.7.2