File tree Expand file tree Collapse file tree 5 files changed +43
-4
lines changed Expand file tree Collapse file tree 5 files changed +43
-4
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ class AnalogIn {
114
114
}
115
115
116
116
protected:
117
-
117
+ # if !defined(DOXYGEN_ONLY)
118
118
virtual void lock ()
119
119
{
120
120
_mutex->lock ();
@@ -127,6 +127,7 @@ class AnalogIn {
127
127
128
128
analogin_t _adc;
129
129
static SingletonPtr<PlatformMutex> _mutex;
130
+ #endif // !defined(DOXYGEN_ONLY)
130
131
};
131
132
132
133
} // namespace mbed
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ class AnalogOut {
141
141
}
142
142
143
143
protected:
144
-
144
+ # if !defined(DOXYGEN_ONLY)
145
145
virtual void lock ()
146
146
{
147
147
_mutex.lock ();
@@ -154,6 +154,7 @@ class AnalogOut {
154
154
155
155
dac_t _dac;
156
156
PlatformMutex _mutex;
157
+ #endif // !defined(DOXYGEN_ONLY)
157
158
};
158
159
159
160
} // namespace mbed
Original file line number Diff line number Diff line change @@ -108,6 +108,11 @@ class DigitalIn {
108
108
109
109
/* * An operator shorthand for read()
110
110
* \sa DigitalIn::read()
111
+ * @code
112
+ * DigitalIn button(BUTTON1);
113
+ * DigitalOut led(LED1);
114
+ * led = button; // Equivalent to led.write(button.read())
115
+ * @endcode
111
116
*/
112
117
operator int ()
113
118
{
@@ -116,7 +121,9 @@ class DigitalIn {
116
121
}
117
122
118
123
protected:
124
+ #if !defined(DOXYGEN_ONLY)
119
125
gpio_t gpio;
126
+ #endif // !defined(DOXYGEN_ONLY)
120
127
};
121
128
122
129
} // namespace mbed
Original file line number Diff line number Diff line change @@ -121,6 +121,13 @@ class DigitalInOut {
121
121
122
122
/* * A shorthand for write()
123
123
* \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
124
131
*/
125
132
DigitalInOut &operator = (int value)
126
133
{
@@ -129,7 +136,8 @@ class DigitalInOut {
129
136
return *this ;
130
137
}
131
138
132
- /* * A shorthand for write()
139
+ /* *A shorthand for write() using the assignment operator which copies the
140
+ * state from the DigitalInOut argument.
133
141
* \sa DigitalInOut::write()
134
142
*/
135
143
DigitalInOut &operator = (DigitalInOut &rhs)
@@ -142,6 +150,13 @@ class DigitalInOut {
142
150
143
151
/* * A shorthand for read()
144
152
* \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
145
160
*/
146
161
operator int ()
147
162
{
@@ -150,7 +165,9 @@ class DigitalInOut {
150
165
}
151
166
152
167
protected:
168
+ #if !defined(DOXYGEN_ONLY)
153
169
gpio_t gpio;
170
+ #endif // !defined(DOXYGEN_ONLY)
154
171
};
155
172
156
173
} // namespace mbed
Original file line number Diff line number Diff line change @@ -104,6 +104,11 @@ class DigitalOut {
104
104
105
105
/* * A shorthand for write()
106
106
* \sa DigitalOut::write()
107
+ * @code
108
+ * DigitalIn button(BUTTON1);
109
+ * DigitalOut led(LED1);
110
+ * led = button; // Equivalent to led.write(button.read())
111
+ * @endcode
107
112
*/
108
113
DigitalOut &operator = (int value)
109
114
{
@@ -112,7 +117,8 @@ class DigitalOut {
112
117
return *this ;
113
118
}
114
119
115
- /* * A shorthand for write()
120
+ /* * A shorthand for write() using the assignment operator which copies the
121
+ * state from the DigitalOut argument.
116
122
* \sa DigitalOut::write()
117
123
*/
118
124
DigitalOut &operator = (DigitalOut &rhs)
@@ -125,6 +131,11 @@ class DigitalOut {
125
131
126
132
/* * A shorthand for read()
127
133
* \sa DigitalOut::read()
134
+ * @code
135
+ * DigitalIn button(BUTTON1);
136
+ * DigitalOut led(LED1);
137
+ * led = button; // Equivalent to led.write(button.read())
138
+ * @endcode
128
139
*/
129
140
operator int ()
130
141
{
@@ -133,7 +144,9 @@ class DigitalOut {
133
144
}
134
145
135
146
protected:
147
+ #if !defined(DOXYGEN_ONLY)
136
148
gpio_t gpio;
149
+ #endif // !defined(DOXYGEN_ONLY)
137
150
};
138
151
139
152
} // namespace mbed
You can’t perform that action at this time.
0 commit comments