MODSERIAL with support for mbed OS 5.1
Fork of MODSERIAL by
Revision 42:52e556a07fc9, committed 2016-08-18
- Comitter:
- rmardini
- Date:
- Thu Aug 18 19:04:23 2016 +0000
- Parent:
- 41:d8422efe4761
- Commit message:
- Replaced _name with getName() in MODSERIAL::claim to work with mbed OS 5.1
Changed in this revision
MODSERIAL.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/MODSERIAL.cpp Tue Nov 17 12:11:44 2015 -0300 +++ b/MODSERIAL.cpp Thu Aug 18 19:04:23 2016 +0000 @@ -94,13 +94,13 @@ bool MODSERIAL::claim (FILE *stream) { - if ( _name == NULL) { + if ( getName() == NULL) { error("claim requires a name to be given in the instantiator of the MODSERIAL instance!\r\n"); } //Add '/' before name: - char *path = new char[strlen(_name) + 2]; - sprintf(path, "/%s", _name); + char *path = new char[strlen(getName()) + 2]; + sprintf(path, "/%s", getName()); if (freopen(path, "w", stream) == NULL) { // Failed, should not happen