PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
-
- /**
- * A print class for testing the encoder
- */
- class TestPrint : public Print {
-
- private:
- //a small test buffer
- uint8_t buffer[64];
-
- //pointer to the current write spot
- int bufferPointer;
-
- public:
-
- TestPrint(){
- bufferPointer = 0;
- }
-
- size_t write(uint8_t character) {
- buffer[bufferPointer++] = character;
- return character;
- }
-
- int size(){
- return bufferPointer;
- }
-
- uint8_t at(int index){
- return buffer[index];
- }
-
- void clear(){
- bufferPointer = 0;
- }
- };
|