Skip to content

Commit 4bde4c4

Browse files
Cruz Monrreal IICruz Monrreal II
authored andcommitted
Merge branch 'ARMmbed-doxy-rm-protected' into rollup2
2 parents 17cb750 + 46e4cb2 commit 4bde4c4

File tree

5 files changed

+43
-4
lines changed

5 files changed

+43
-4
lines changed

drivers/AnalogIn.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class AnalogIn {
114114
}
115115

116116
protected:
117-
117+
#if !defined(DOXYGEN_ONLY)
118118
virtual void lock()
119119
{
120120
_mutex->lock();
@@ -127,6 +127,7 @@ class AnalogIn {
127127

128128
analogin_t _adc;
129129
static SingletonPtr<PlatformMutex> _mutex;
130+
#endif //!defined(DOXYGEN_ONLY)
130131
};
131132

132133
} // namespace mbed

drivers/AnalogOut.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class AnalogOut {
141141
}
142142

143143
protected:
144-
144+
#if !defined(DOXYGEN_ONLY)
145145
virtual void lock()
146146
{
147147
_mutex.lock();
@@ -154,6 +154,7 @@ class AnalogOut {
154154

155155
dac_t _dac;
156156
PlatformMutex _mutex;
157+
#endif //!defined(DOXYGEN_ONLY)
157158
};
158159

159160
} // namespace mbed

drivers/DigitalIn.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ class DigitalIn {
108108

109109
/** An operator shorthand for read()
110110
* \sa DigitalIn::read()
111+
* @code
112+
* DigitalIn button(BUTTON1);
113+
* DigitalOut led(LED1);
114+
* led = button; // Equivalent to led.write(button.read())
115+
* @endcode
111116
*/
112117
operator int()
113118
{
@@ -116,7 +121,9 @@ class DigitalIn {
116121
}
117122

118123
protected:
124+
#if !defined(DOXYGEN_ONLY)
119125
gpio_t gpio;
126+
#endif //!defined(DOXYGEN_ONLY)
120127
};
121128

122129
} // namespace mbed

drivers/DigitalInOut.h

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ class DigitalInOut {
121121

122122
/** A shorthand for write()
123123
* \sa DigitalInOut::write()
124+
* @code
125+
* DigitalInOut inout(PIN);
126+
* DigitalIn button(BUTTON1);
127+
* inout.output();
128+
*
129+
* inout = button; // Equivalent to inout.write(button.read())
130+
* @endcode
124131
*/
125132
DigitalInOut &operator= (int value)
126133
{
@@ -129,7 +136,8 @@ class DigitalInOut {
129136
return *this;
130137
}
131138

132-
/** A shorthand for write()
139+
/**A shorthand for write() using the assignment operator which copies the
140+
* state from the DigitalInOut argument.
133141
* \sa DigitalInOut::write()
134142
*/
135143
DigitalInOut &operator= (DigitalInOut &rhs)
@@ -142,6 +150,13 @@ class DigitalInOut {
142150

143151
/** A shorthand for read()
144152
* \sa DigitalInOut::read()
153+
* @code
154+
* DigitalInOut inout(PIN);
155+
* DigitalOut led(LED1);
156+
*
157+
* inout.input();
158+
* led = inout; // Equivalent to led.write(inout.read())
159+
* @endcode
145160
*/
146161
operator int()
147162
{
@@ -150,7 +165,9 @@ class DigitalInOut {
150165
}
151166

152167
protected:
168+
#if !defined(DOXYGEN_ONLY)
153169
gpio_t gpio;
170+
#endif //!defined(DOXYGEN_ONLY)
154171
};
155172

156173
} // namespace mbed

drivers/DigitalOut.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ class DigitalOut {
104104

105105
/** A shorthand for write()
106106
* \sa DigitalOut::write()
107+
* @code
108+
* DigitalIn button(BUTTON1);
109+
* DigitalOut led(LED1);
110+
* led = button; // Equivalent to led.write(button.read())
111+
* @endcode
107112
*/
108113
DigitalOut &operator= (int value)
109114
{
@@ -112,7 +117,8 @@ class DigitalOut {
112117
return *this;
113118
}
114119

115-
/** A shorthand for write()
120+
/** A shorthand for write() using the assignment operator which copies the
121+
* state from the DigitalOut argument.
116122
* \sa DigitalOut::write()
117123
*/
118124
DigitalOut &operator= (DigitalOut &rhs)
@@ -125,6 +131,11 @@ class DigitalOut {
125131

126132
/** A shorthand for read()
127133
* \sa DigitalOut::read()
134+
* @code
135+
* DigitalIn button(BUTTON1);
136+
* DigitalOut led(LED1);
137+
* led = button; // Equivalent to led.write(button.read())
138+
* @endcode
128139
*/
129140
operator int()
130141
{
@@ -133,7 +144,9 @@ class DigitalOut {
133144
}
134145

135146
protected:
147+
#if !defined(DOXYGEN_ONLY)
136148
gpio_t gpio;
149+
#endif //!defined(DOXYGEN_ONLY)
137150
};
138151

139152
} // namespace mbed

0 commit comments

Comments
 (0)