-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add empty CrashReport on Teensy 2.0, LC, 3.x
- Loading branch information
1 parent
63b0363
commit 7f0c153
Showing
6 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <Arduino.h> | ||
#include <CrashReport.h> | ||
|
||
size_t CrashReportClass::printTo(Print& p) const | ||
{ | ||
p.println("CrashReport is not available on Teensy 2.0"); | ||
return 1; | ||
} | ||
|
||
void CrashReportClass::clear() | ||
{ | ||
} | ||
|
||
CrashReportClass::operator bool() | ||
{ | ||
return false; | ||
} | ||
|
||
CrashReportClass CrashReport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include <Printable.h> | ||
#include <WString.h> | ||
|
||
class CrashReportClass: public Printable { | ||
public: | ||
virtual size_t printTo(Print& p) const; | ||
void clear(); | ||
operator bool(); | ||
}; | ||
|
||
extern CrashReportClass CrashReport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <Arduino.h> | ||
#include <CrashReport.h> | ||
|
||
size_t CrashReportClass::printTo(Print& p) const | ||
{ | ||
p.println("CrashReport is not available on Teensy LC & 3.x"); | ||
return 1; | ||
} | ||
|
||
void CrashReportClass::clear() | ||
{ | ||
} | ||
|
||
CrashReportClass::operator bool() | ||
{ | ||
return false; | ||
} | ||
|
||
CrashReportClass CrashReport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include <Printable.h> | ||
#include <WString.h> | ||
|
||
class CrashReportClass: public Printable { | ||
public: | ||
virtual size_t printTo(Print& p) const; | ||
void clear(); | ||
operator bool(); | ||
}; | ||
|
||
extern CrashReportClass CrashReport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7f0c153
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks right