Skip to content

Commit

Permalink
Adds I2cDev::Info::exists()
Browse files Browse the repository at this point in the history
  • Loading branch information
epsilonrt committed Oct 7, 2018
1 parent 03a90c1 commit b59944c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/piduino/i2cdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <deque>
#include <string>
#include <piduino/system.h>
#include <piduino/iodevice.h>

/**
Expand Down Expand Up @@ -51,6 +52,9 @@ namespace Piduino {
return _path;
}
bool setPath (const std::string & path);
inline bool exists() const {
return System::charFileExists(_path);
}
bool operator== (const Info & other) {
return (_path == other._path) ;
}
Expand Down

0 comments on commit b59944c

Please sign in to comment.