Skip to content

Commit

Permalink
implement signal analyzer in platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
ctacke committed Jan 1, 2025
1 parent 373c047 commit eb36c9e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 132 deletions.
132 changes: 0 additions & 132 deletions Source/Meadow.Core/Hardware/SoftDigitalSignalAnalyzer.cs

This file was deleted.

3 changes: 3 additions & 0 deletions Source/implementations/desktop/Meadow.Desktop/Desktop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ public void WatchdogReset()
/// <inheritdoc/>
public ICounter CreateCounter(IPin pin, InterruptMode edge)
=> _implementation.CreateCounter(pin, edge);
/// <inheritdoc/>
public IDigitalSignalAnalyzer CreateDigitalSignalAnalyzer(IPin pin, bool captureDutyCycle)
=> _implementation.CreateDigitalSignalAnalyzer(pin, captureDutyCycle);
}


Expand Down
6 changes: 6 additions & 0 deletions Source/implementations/linux/Meadow.Linux/Linux.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,12 @@ internal static string ExecuteCommandLine(string command, string args)
return process?.StandardOutput.ReadToEnd() ?? string.Empty;
}

/// <inheritdoc/>
public IDigitalSignalAnalyzer CreateDigitalSignalAnalyzer(IPin pin, bool captureDutyCycle)
{
return new SoftDigitalSignalAnalyzer(pin, captureDutyCycle: captureDutyCycle);
}

// ----------------------------------------------
// ----------------------------------------------
// ----- BELOW HERE ARE NOT YET IMPLEMENTED -----
Expand Down
5 changes: 5 additions & 0 deletions Source/implementations/mac/Meadow.Mac/Mac.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ public IDigitalOutputPort CreateDigitalOutputPort(IPin pin, bool initialState =
throw new NotSupportedException("Add an IO Expander to your platform");
}

/// <inheritdoc/>
public IDigitalSignalAnalyzer CreateDigitalSignalAnalyzer(IPin pin, bool captureDutyCycle)
{
throw new NotSupportedException("Add an IO Expander to your platform");
}

/// <inheritdoc/>
public ISerialPort CreateSerialPort(string portName, int baudRate = 9600, int dataBits = 8, Parity parity = Parity.None, StopBits stopBits = StopBits.One, int readBufferSize = 1024)
Expand Down
5 changes: 5 additions & 0 deletions Source/implementations/windows/Meadow.Windows/Windows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ public IDigitalOutputPort CreateDigitalOutputPort(IPin pin, bool initialState =
throw new NotSupportedException("Add an IO Expander to your platform");
}

/// <inheritdoc/>
public IDigitalSignalAnalyzer CreateDigitalSignalAnalyzer(IPin pin, bool captureDutyCycle)
{
throw new NotSupportedException("Add an IO Expander to your platform");
}

public ISerialPort CreateSerialPort(string portName, int baudRate = 9600, int dataBits = 8, Parity parity = Parity.None, StopBits stopBits = StopBits.One, int readBufferSize = 1024)
{
Expand Down

0 comments on commit eb36c9e

Please sign in to comment.