You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Gets the current drive mode for the general-purpose I/O (GPIO) pin. The drive mode specifies whether the pin is configured as an input or an output, and determines how values are driven onto the pin.
94
+
/// Gets the current pin mode for the general-purpose I/O (GPIO) pin. The pin mode specifies whether the pin is configured as an input or an output, and determines how values are driven onto the pin.
94
95
/// </summary>
95
-
/// <returns>An enumeration value that indicates the current drive mode for the GPIO pin.
96
-
/// The drive mode specifies whether the pin is configured as an input or an output, and determines how values are driven onto the pin.</returns>
97
-
publicPinModeGetDriveMode()
96
+
/// <returns>An enumeration value that indicates the current pin mode for the GPIO pin.
97
+
/// The pin mode specifies whether the pin is configured as an input or an output, and determines how values are driven onto the pin.</returns>
98
+
publicPinModeGetPinMode()
98
99
{
99
100
lock(_syncLock)
100
101
{
101
102
// check if pin has been disposed
102
-
if(!_disposedValue){return_driveMode;}
103
+
if(!_disposedValue){return_pinMode;}
103
104
104
105
thrownewObjectDisposedException();
105
106
}
106
107
}
107
108
108
109
/// <summary>
109
-
/// Gets whether the general-purpose I/O (GPIO) pin supports the specified drive mode.
110
+
/// Gets whether the general-purpose I/O (GPIO) pin supports the specified pin mode.
110
111
/// </summary>
111
-
/// <param name="driveMode">The drive mode that you want to check for support.</param>
112
+
/// <param name="pinMode">The pin mode that you want to check for support.</param>
112
113
/// <returns>
113
-
/// <see langword="true"/> if the GPIO pin supports the drive mode that driveMode specifies; otherwise false.
114
-
/// If you specify a drive mode for which this method returns false when you call <see cref="SetDriveMode"/>, <see cref="SetDriveMode"/> generates an exception.
114
+
/// <see langword="true"/> if the GPIO pin supports the pin mode that pinMode specifies; otherwise false.
115
+
/// If you specify a pin mode for which this method returns false when you call <see cref="SetPinMode"/>, <see cref="SetPinMode"/> generates an exception.
/// Sets the drive mode of the general-purpose I/O (GPIO) pin.
130
-
/// The drive mode specifies whether the pin is configured as an input or an output, and determines how values are driven onto the pin.
130
+
/// Sets the pin mode of the general-purpose I/O (GPIO) pin.
131
+
/// The pin mode specifies whether the pin is configured as an input or an output, and determines how values are driven onto the pin.
131
132
/// </summary>
132
-
/// <param name="value">An enumeration value that specifies drive mode to use for the GPIO pin.
133
-
/// The drive mode specifies whether the pin is configured as an input or an output, and determines how values are driven onto the pin.</param>
133
+
/// <param name="value">An enumeration value that specifies pin mode to use for the GPIO pin.
134
+
/// The pin mode specifies whether the pin is configured as an input or an output, and determines how values are driven onto the pin.</param>
134
135
/// <remarks>The following exceptions can be thrown by this method:
135
136
/// <list type="bullet">
136
-
/// <item><term>E_INVALIDARG : The GPIO pin does not support the specified drive mode.</term></item>
137
-
/// <item><term>E_ACCESSDENIED : The pin is open in shared read-only mode. Close the pin and reopen it in exclusive mode to change the drive mode of the pin.</term></item>
137
+
/// <item><term>E_INVALIDARG : The GPIO pin does not support the specified pin mode.</term></item>
138
+
/// <item><term>E_ACCESSDENIED : The pin is open in shared read-only mode. Close the pin and reopen it in exclusive mode to change the pin mode of the pin.</term></item>
// need to call the native method directly because we are already inside a lock
149
-
if(NativeIsDriveModeSupported(value))
150
+
if(NativeIsPinModeSupported(value))
150
151
{
151
-
NativeSetDriveMode(value);
152
-
_driveMode=value;
152
+
NativeSetPinMode(value);
153
+
_pinMode=value;
153
154
}
154
155
}
155
156
}
@@ -162,11 +163,11 @@ public void SetDriveMode(PinMode value)
162
163
publicexternPinValueRead();
163
164
164
165
/// <summary>
165
-
/// Drives the specified value onto the general purpose I/O (GPIO) pin according to the current drive mode for the pin
166
+
/// Drives the specified value onto the general purpose I/O (GPIO) pin according to the current pin mode for the pin
166
167
/// if the pin is configured as an output, or updates the latched output value for the pin if the pin is configured as an input.
167
168
/// </summary>
168
169
/// <param name="value">The enumeration value to write to the GPIO pin.
169
-
/// <para>If the GPIO pin is configured as an output, the method drives the specified value onto the pin according to the current drive mode for the pin.</para>
170
+
/// <para>If the GPIO pin is configured as an output, the method drives the specified value onto the pin according to the current pin mode for the pin.</para>
170
171
/// <para>If the GPIO pin is configured as an input, the method updates the latched output value for the pin. The latched output value is driven onto the pin when the configuration for the pin changes to output.</para>
171
172
/// </param>
172
173
/// <remarks>The following exceptions can be thrown by this method:
@@ -224,7 +225,7 @@ public event PinValueChangedEventHandler ValueChanged
224
225
try
225
226
{
226
227
_callbacks=callbacksNew;
227
-
NativeSetDriveMode(_driveMode);
228
+
NativeSetPinMode(_pinMode);
228
229
}
229
230
catch
230
231
{
@@ -249,7 +250,7 @@ public event PinValueChangedEventHandler ValueChanged
0 commit comments