The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
Diff: drivers/BusOut.h
- Revision:
- 170:e95d10626187
- Parent:
- 156:ff21514d8981
- Child:
- 172:65be27845400
--- a/drivers/BusOut.h Fri Jun 22 15:38:59 2018 +0100 +++ b/drivers/BusOut.h Thu Sep 06 13:39:34 2018 +0100 @@ -87,7 +87,8 @@ * @returns * Binary mask of connected pins */ - int mask() { + int mask() + { // No lock needed since _nc_mask is not modified outside the constructor return _nc_mask; } @@ -95,13 +96,13 @@ /** A shorthand for write() * \sa BusOut::write() */ - BusOut& operator= (int v); - BusOut& operator= (BusOut& rhs); + BusOut &operator= (int v); + BusOut &operator= (BusOut &rhs); /** Access to particular bit in random-iterator fashion * @param index Bit Position */ - DigitalOut& operator[] (int index); + DigitalOut &operator[](int index); /** A shorthand for read() * \sa BusOut::read() @@ -111,7 +112,7 @@ protected: virtual void lock(); virtual void unlock(); - DigitalOut* _pin[16]; + DigitalOut *_pin[16]; /* Mask of bus's NC pins * If bit[n] is set to 1 - pin is connected