ads1115 only
Fork of mbed by
Diff: BusIn.h
- Revision:
- 122:f9eeca106725
- Parent:
- 93:e188a91d3eaa
- Child:
- 123:b0220dba8be7
--- a/BusIn.h Wed May 25 16:44:06 2016 +0100 +++ b/BusIn.h Thu Jul 07 14:34:11 2016 +0100 @@ -22,6 +22,8 @@ namespace mbed { /** A digital input bus, used for reading the state of a collection of pins + * + * @Note Synchronization level: Thread safe */ class BusIn { @@ -65,6 +67,7 @@ * Binary mask of connected pins */ int mask() { + // No lock needed since _nc_mask is not modified outside the constructor return _nc_mask; } @@ -87,8 +90,12 @@ */ int _nc_mask; + PlatformMutex _mutex; + /* disallow copy constructor and assignment operators */ private: + virtual void lock(); + virtual void unlock(); BusIn(const BusIn&); BusIn & operator = (const BusIn&); };