Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit 29f229a

Browse files
committed
Dfu.Device: fix visibility of internal abstract methods
Signed-off-by: Benedek Kupper <[email protected]>
1 parent d7ae051 commit 29f229a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Dfu/Device.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,49 +77,49 @@ public Identification(ushort vendorId, ushort productId, ushort bcdProductVersio
7777
/// <summary>
7878
/// Returns the number of available alternate settings of the DFU interface.
7979
/// </summary>
80-
public abstract byte NumberOfAlternateSettings { get; }
80+
protected abstract byte NumberOfAlternateSettings { get; }
8181

8282
/// <summary>
8383
/// Gets or sets the DFU interface's alternate setting.
8484
/// </summary>
85-
public abstract byte AlternateSetting { get; set; }
85+
protected abstract byte AlternateSetting { get; set; }
8686

8787
/// <summary>
8888
/// Returns the string index of the specified alternate selector.
8989
/// </summary>
9090
/// <param name="altSetting">The alternate selector index</param>
9191
/// <returns>The string index</returns>
92-
public abstract byte iAlternateSetting(byte altSetting);
92+
protected abstract byte iAlternateSetting(byte altSetting);
9393

9494
/// <summary>
9595
/// Reads the USB device string for a specific string index.
9696
/// </summary>
9797
/// <param name="iString">USB device string index to read with</param>
9898
/// <returns>The string from the device</returns>
99-
public abstract string GetString(byte iString);
99+
protected abstract string GetString(byte iString);
100100

101101
/// <summary>
102102
/// USB class-specific control transfer to the DFU interface, with 0 length.
103103
/// </summary>
104104
/// <param name="request">Class request code</param>
105105
/// <param name="value">Value field of the setup request</param>
106-
public abstract void ControlTransfer(Request request, ushort value = 0);
106+
protected abstract void ControlTransfer(Request request, ushort value = 0);
107107

108108
/// <summary>
109109
/// USB class-specific control transfer to the DFU interface, with OUT data.
110110
/// </summary>
111111
/// <param name="request">Class request code</param>
112112
/// <param name="value">Value field of the setup request</param>
113113
/// <param name="outdata">OUT data to send to the device</param>
114-
public abstract void ControlTransfer(Request request, ushort value, byte[] outdata);
114+
protected abstract void ControlTransfer(Request request, ushort value, byte[] outdata);
115115

116116
/// <summary>
117117
/// USB class-specific control transfer to the DFU interface, with IN data.
118118
/// </summary>
119119
/// <param name="request">Class request code</param>
120120
/// <param name="value">Value field of the setup request</param>
121121
/// <param name="indata">IN data to fill from the device</param>
122-
public abstract void ControlTransfer(Request request, ushort value, ref byte[] indata);
122+
protected abstract void ControlTransfer(Request request, ushort value, ref byte[] indata);
123123

124124
// not used, only added for symmetry
125125
//public abstract void Open();
@@ -139,7 +139,7 @@ public Identification(ushort vendorId, ushort productId, ushort bcdProductVersio
139139
/// Performs a USB bus reset for the device (also closing the device in the operation).
140140
/// Only required for devices which don't WillDetach, or are ManifestationTolerant.
141141
/// </summary>
142-
public abstract void BusReset();
142+
protected abstract void BusReset();
143143
#endregion
144144

145145
#region DFU class requests

0 commit comments

Comments
 (0)