Skip to content

Commit

Permalink
Merge pull request #88 from ssilverman/master
Browse files Browse the repository at this point in the history
Fix for 3.0.2 not able to compile for Teensy
  • Loading branch information
wmacevoy authored Mar 21, 2019
2 parents e4f7a65 + e0710c7 commit 5431e99
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ArduinoUnitUtility/ArduinoUnitMockPrint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,12 @@ MockPrint::MockPrint(const String &_initial) : String(_initial) {}
MockPrint::~MockPrint() {}

size_t MockPrint::write(uint8_t x) { concat((char) x); return 1; }
size_t MockPrint::write(const uint8_t *buffer, size_t size) { concat((const char *)buffer,size); return size; }
size_t MockPrint::write(const uint8_t *buffer, size_t size) {
#ifdef TEENSYDUINO
append((const char *)buffer, size);
#else
concat((const char *)buffer, size);
#endif // TEENSYDUINO
return size;
}
int MockPrint::availableForWrite() { return INT_MAX; }

0 comments on commit 5431e99

Please sign in to comment.