Merge branch 'doxy-rm-protected' of ssh://github.com/ARMmbed/mbed-os into ARMmbed-doxy-rm-protected

pull/8423/head
Cruz Monrreal II 2018-10-12 21:46:57 -05:00
commit 46e4cb2b9d
5 changed files with 43 additions and 4 deletions

View File

@ -114,7 +114,7 @@ public:
} }
protected: protected:
#if !defined(DOXYGEN_ONLY)
virtual void lock() virtual void lock()
{ {
_mutex->lock(); _mutex->lock();
@ -127,6 +127,7 @@ protected:
analogin_t _adc; analogin_t _adc;
static SingletonPtr<PlatformMutex> _mutex; static SingletonPtr<PlatformMutex> _mutex;
#endif //!defined(DOXYGEN_ONLY)
}; };
} // namespace mbed } // namespace mbed

View File

@ -141,7 +141,7 @@ public:
} }
protected: protected:
#if !defined(DOXYGEN_ONLY)
virtual void lock() virtual void lock()
{ {
_mutex.lock(); _mutex.lock();
@ -154,6 +154,7 @@ protected:
dac_t _dac; dac_t _dac;
PlatformMutex _mutex; PlatformMutex _mutex;
#endif //!defined(DOXYGEN_ONLY)
}; };
} // namespace mbed } // namespace mbed

View File

@ -108,6 +108,11 @@ public:
/** An operator shorthand for read() /** An operator shorthand for read()
* \sa DigitalIn::read() * \sa DigitalIn::read()
* @code
* DigitalIn button(BUTTON1);
* DigitalOut led(LED1);
* led = button; // Equivalent to led.write(button.read())
* @endcode
*/ */
operator int() operator int()
{ {
@ -116,7 +121,9 @@ public:
} }
protected: protected:
#if !defined(DOXYGEN_ONLY)
gpio_t gpio; gpio_t gpio;
#endif //!defined(DOXYGEN_ONLY)
}; };
} // namespace mbed } // namespace mbed

View File

@ -121,6 +121,13 @@ public:
/** A shorthand for write() /** A shorthand for write()
* \sa DigitalInOut::write() * \sa DigitalInOut::write()
* @code
* DigitalInOut inout(PIN);
* DigitalIn button(BUTTON1);
* inout.output();
*
* inout = button; // Equivalent to inout.write(button.read())
* @endcode
*/ */
DigitalInOut &operator= (int value) DigitalInOut &operator= (int value)
{ {
@ -129,7 +136,8 @@ public:
return *this; return *this;
} }
/** A shorthand for write() /**A shorthand for write() using the assignment operator which copies the
* state from the DigitalInOut argument.
* \sa DigitalInOut::write() * \sa DigitalInOut::write()
*/ */
DigitalInOut &operator= (DigitalInOut &rhs) DigitalInOut &operator= (DigitalInOut &rhs)
@ -142,6 +150,13 @@ public:
/** A shorthand for read() /** A shorthand for read()
* \sa DigitalInOut::read() * \sa DigitalInOut::read()
* @code
* DigitalInOut inout(PIN);
* DigitalOut led(LED1);
*
* inout.input();
* led = inout; // Equivalent to led.write(inout.read())
* @endcode
*/ */
operator int() operator int()
{ {
@ -150,7 +165,9 @@ public:
} }
protected: protected:
#if !defined(DOXYGEN_ONLY)
gpio_t gpio; gpio_t gpio;
#endif //!defined(DOXYGEN_ONLY)
}; };
} // namespace mbed } // namespace mbed

View File

@ -104,6 +104,11 @@ public:
/** A shorthand for write() /** A shorthand for write()
* \sa DigitalOut::write() * \sa DigitalOut::write()
* @code
* DigitalIn button(BUTTON1);
* DigitalOut led(LED1);
* led = button; // Equivalent to led.write(button.read())
* @endcode
*/ */
DigitalOut &operator= (int value) DigitalOut &operator= (int value)
{ {
@ -112,7 +117,8 @@ public:
return *this; return *this;
} }
/** A shorthand for write() /** A shorthand for write() using the assignment operator which copies the
* state from the DigitalOut argument.
* \sa DigitalOut::write() * \sa DigitalOut::write()
*/ */
DigitalOut &operator= (DigitalOut &rhs) DigitalOut &operator= (DigitalOut &rhs)
@ -125,6 +131,11 @@ public:
/** A shorthand for read() /** A shorthand for read()
* \sa DigitalOut::read() * \sa DigitalOut::read()
* @code
* DigitalIn button(BUTTON1);
* DigitalOut led(LED1);
* led = button; // Equivalent to led.write(button.read())
* @endcode
*/ */
operator int() operator int()
{ {
@ -133,7 +144,9 @@ public:
} }
protected: protected:
#if !defined(DOXYGEN_ONLY)
gpio_t gpio; gpio_t gpio;
#endif //!defined(DOXYGEN_ONLY)
}; };
} // namespace mbed } // namespace mbed