diff --git a/src/System.Device.Gpio.Tests/GpioControllerTestBase.cs b/src/System.Device.Gpio.Tests/GpioControllerTestBase.cs
index 73ee473d5830473829684217128da888a0d3cad8..8eb9e887c7cbf77fbff0674383b7f8a09867bca1 100644
--- a/src/System.Device.Gpio.Tests/GpioControllerTestBase.cs
+++ b/src/System.Device.Gpio.Tests/GpioControllerTestBase.cs
@@ -16,7 +16,7 @@ namespace System.Device.Gpio.Tests
private const int LedPin = 18;
private const int OutputPin = 16;
private const int InputPin = 12;
- private static readonly int WaitMilliSeconds = 1000;
+ private static readonly int WaitMilliseconds = 1000;
[Fact]
public void ControllerCanTurnOnLEDs()
@@ -143,7 +143,7 @@ namespace System.Device.Gpio.Tests
controller.Write(OutputPin, PinValue.Low);
controller.RegisterCallbackForPinValueChangedEvent(InputPin, PinEventTypes.Rising, callback);
controller.Write(OutputPin, PinValue.High);
- Thread.Sleep(WaitMilliSeconds);
+ Thread.Sleep(WaitMilliseconds);
Assert.True(wasCalled);
}
@@ -164,7 +164,7 @@ namespace System.Device.Gpio.Tests
controller.Write(OutputPin, PinValue.Low);
controller.RegisterCallbackForPinValueChangedEvent(InputPin, PinEventTypes.Falling, callback);
controller.Write(OutputPin, PinValue.High);
- Thread.Sleep(WaitMilliSeconds);
+ Thread.Sleep(WaitMilliseconds);
Assert.False(wasCalled);
}
@@ -203,9 +203,9 @@ namespace System.Device.Gpio.Tests
for (int i = 0; i < 10; i++)
{
controller.Write(OutputPin, PinValue.High);
- Thread.Sleep(WaitMilliSeconds);
+ Thread.Sleep(WaitMilliseconds);
controller.Write(OutputPin, PinValue.Low);
- Thread.Sleep(WaitMilliSeconds);
+ Thread.Sleep(WaitMilliseconds);
}
Assert.Equal(25, risingEventOccuredCount);
@@ -243,16 +243,16 @@ namespace System.Device.Gpio.Tests
controller.RegisterCallbackForPinValueChangedEvent(InputPin, PinEventTypes.Rising, callback4);
controller.Write(OutputPin, PinValue.High);
- Thread.Sleep(WaitMilliSeconds);
+ Thread.Sleep(WaitMilliseconds);
controller.UnregisterCallbackForPinValueChangedEvent(InputPin, callback1);
controller.UnregisterCallbackForPinValueChangedEvent(InputPin, callback2);
controller.UnregisterCallbackForPinValueChangedEvent(InputPin, callback3);
controller.UnregisterCallbackForPinValueChangedEvent(InputPin, callback4);
- Thread.Sleep(WaitMilliSeconds);
+ Thread.Sleep(WaitMilliseconds);
controller.Write(OutputPin, PinValue.Low);
- Thread.Sleep(WaitMilliSeconds);
+ Thread.Sleep(WaitMilliseconds);
controller.Write(OutputPin, PinValue.High);
Assert.Equal(1, risingEventOccuredCount);
@@ -283,11 +283,11 @@ namespace System.Device.Gpio.Tests
[Fact]
[Trait("SkipOnTestRun", "Windows_NT")] // The windows driver is returning none as the event type.
- public void WaitForEventCancelAfter10MilliSecondsTest()
+ public void WaitForEventCancelAfter10MillisecondsTest()
{
using (GpioController controller = new GpioController(GetTestNumberingScheme(), GetTestDriver()))
{
- CancellationTokenSource tokenSource = new CancellationTokenSource(WaitMilliSeconds);
+ CancellationTokenSource tokenSource = new CancellationTokenSource(WaitMilliseconds);
controller.OpenPin(InputPin, PinMode.Input);
controller.OpenPin(OutputPin, PinMode.Output);
controller.Write(OutputPin, PinValue.Low);
@@ -311,7 +311,7 @@ namespace System.Device.Gpio.Tests
Task.Run(() =>
{
- Thread.Sleep(WaitMilliSeconds);
+ Thread.Sleep(WaitMilliseconds);
controller.Write(OutputPin, PinValue.High);
});
@@ -335,7 +335,7 @@ namespace System.Device.Gpio.Tests
Task.Run(() =>
{
controller.Write(OutputPin, PinValue.High);
- Thread.Sleep(WaitMilliSeconds);
+ Thread.Sleep(WaitMilliseconds);
controller.Write(OutputPin, PinValue.Low);
});
diff --git a/src/System.Device.Gpio/System/Device/Pwm/Channels/UnixPwmChannel.Linux.cs b/src/System.Device.Gpio/System/Device/Pwm/Channels/UnixPwmChannel.Linux.cs
index 3951ccb8fee06210ad3b55d842316391a8ec9b3c..386b07a084f69d760acd0be0f111efaf7524e9d4 100644
--- a/src/System.Device.Gpio/System/Device/Pwm/Channels/UnixPwmChannel.Linux.cs
+++ b/src/System.Device.Gpio/System/Device/Pwm/Channels/UnixPwmChannel.Linux.cs
@@ -77,7 +77,7 @@ namespace System.Device.Pwm.Channels
///
/// The frequency in hertz.
/// The frequency period in nanoseconds.
- private static int GetPeriodInNanoSeconds(int frequency)
+ private static int GetPeriodInNanoseconds(int frequency)
{
// In Linux, the period needs to be a whole number and can't have a decimal point.
return (int)((1.0 / frequency) * 1_000_000_000);
@@ -94,8 +94,8 @@ namespace System.Device.Pwm.Channels
throw new ArgumentOutOfRangeException(nameof(frequency), frequency, "Value must not be negative.");
}
- int periodInNanoSeconds = GetPeriodInNanoSeconds(frequency);
- File.WriteAllText($"{_channelPath}/period", Convert.ToString(periodInNanoSeconds));
+ int periodInNanoseconds = GetPeriodInNanoseconds(frequency);
+ File.WriteAllText($"{_channelPath}/period", Convert.ToString(periodInNanoseconds));
_frequency = frequency;
}
@@ -111,8 +111,8 @@ namespace System.Device.Pwm.Channels
}
// In Linux, the period needs to be a whole number and can't have decimal point.
- int dutyCycleInNanoSeconds = (int)(GetPeriodInNanoSeconds(_frequency) * dutyCyclePercentage);
- File.WriteAllText($"{_channelPath}/duty_cycle", Convert.ToString(dutyCycleInNanoSeconds));
+ int dutyCycleInNanoseconds = (int)(GetPeriodInNanoseconds(_frequency) * dutyCyclePercentage);
+ File.WriteAllText($"{_channelPath}/duty_cycle", Convert.ToString(dutyCycleInNanoseconds));
_dutyCyclePercentage = dutyCyclePercentage;
}