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
// add the pin to the event listener in order to receive the callbacks from the native interrupts
60
-
s_eventListener.AddPin(this);
48
+
s_gpioPinEventManager.AddPin(this);
61
49
62
50
returntrue;
63
51
}
@@ -93,31 +81,11 @@ public TimeSpan DebounceTimeout
93
81
/// <value>
94
82
/// The pin number of the GPIO pin.
95
83
/// </value>
96
-
publicintPinNumber{
97
-
get
98
-
{
99
-
lock(_syncLock)
100
-
{
101
-
// check if pin has been disposed
102
-
if(!_disposedValue){return_pinNumber;}
103
-
104
-
thrownewObjectDisposedException();
105
-
}
106
-
}
107
-
}
108
-
109
-
/// <summary>
110
-
/// Gets the sharing mode in which the general-purpose I/O (GPIO) pin is open.
111
-
/// </summary>
112
-
/// <value>
113
-
/// The sharing mode in which the GPIO pin is open.
114
-
/// </value>
115
-
publicGpioSharingModeSharingMode
84
+
publicintPinNumber
116
85
{
117
86
get
118
87
{
119
-
// at this time pins can't be shared, use is exclusive exclusive (pun intended!)
120
-
returnGpioSharingMode.Exclusive;
88
+
return_pinNumber;
121
89
}
122
90
}
123
91
@@ -126,7 +94,7 @@ public GpioSharingMode SharingMode
126
94
/// </summary>
127
95
/// <returns>An enumeration value that indicates the current drive mode for the GPIO pin.
128
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>
129
-
publicGpioPinDriveModeGetDriveMode()
97
+
publicPinModeGetDriveMode()
130
98
{
131
99
lock(_syncLock)
132
100
{
@@ -142,11 +110,11 @@ public GpioPinDriveMode GetDriveMode()
142
110
/// </summary>
143
111
/// <param name="driveMode">The drive mode that you want to check for support.</param>
144
112
/// <returns>
145
-
/// True if the GPIO pin supports the drive mode that driveMode specifies; otherwise false.
113
+
/// <see langword="true"/> if the GPIO pin supports the drive mode that driveMode specifies; otherwise false.
146
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.
@@ -166,10 +134,10 @@ public bool IsDriveModeSupported(GpioPinDriveMode driveMode)
166
134
/// <remarks>The following exceptions can be thrown by this method:
167
135
/// <list type="bullet">
168
136
/// <item><term>E_INVALIDARG : The GPIO pin does not support the specified drive mode.</term></item>
169
-
/// <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_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>
170
138
/// </list>
171
139
/// </remarks>
172
-
publicvoidSetDriveMode(GpioPinDriveModevalue)
140
+
publicvoidSetDriveMode(PinModevalue)
173
141
{
174
142
lock(_syncLock)
175
143
{
@@ -191,7 +159,7 @@ public void SetDriveMode(GpioPinDriveMode value)
191
159
/// </summary>
192
160
/// <returns>The current value of the GPIO pin. If the pin is configured as an output, this value is the last value written to the pin.</returns>
193
161
[MethodImpl(MethodImplOptions.InternalCall)]
194
-
publicexternGpioPinValueRead();
162
+
publicexternPinValueRead();
195
163
196
164
/// <summary>
197
165
/// Drives the specified value onto the general purpose I/O (GPIO) pin according to the current drive mode for the pin
@@ -206,7 +174,7 @@ public void SetDriveMode(GpioPinDriveMode value)
206
174
/// <item><term>E_ACCESSDENIED : The GPIO pin is open in shared read-only mode. To write to the pin, close the pin and reopen the pin in exclusive mode.</term></item>
207
175
/// </list>
208
176
/// </remarks>
209
-
publicvoidWrite(GpioPinValuevalue)
177
+
publicvoidWrite(PinValuevalue)
210
178
{
211
179
lock(_syncLock)
212
180
{
@@ -220,17 +188,17 @@ public void Write(GpioPinValue value)
220
188
WriteNative(value);
221
189
222
190
// trigger the pin value changed event, if any is set
@@ -239,7 +207,7 @@ public void Write(GpioPinValue value)
239
207
/// <summary>
240
208
/// Occurs when the value of the general-purpose I/O (GPIO) pin changes, either because of an external stimulus when the pin is configured as an input, or when a value is written to the pin when the pin in configured as an output.
0 commit comments