diff --git a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroLayout/Samples/BarChart_Sample/MeadowApp.cs b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroLayout/Samples/BarChart_Sample/MeadowApp.cs index caae00c78d..dae24dfae5 100644 --- a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroLayout/Samples/BarChart_Sample/MeadowApp.cs +++ b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroLayout/Samples/BarChart_Sample/MeadowApp.cs @@ -78,6 +78,6 @@ private void ExecutePlatformDisplayRunner() sd.Run(); } MeadowOS.TerminateRun(); - System.Environment.Exit(0); + Environment.Exit(0); } } \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/Displays.AsciiConsole/Samples/AsciiConsole_Sample/AsciiConsole_Sample.csproj b/Source/Meadow.Foundation.Peripherals/Displays.AsciiConsole/Samples/AsciiConsole_Sample/AsciiConsole_Sample.csproj index 6b21c92307..41e09b50ec 100644 --- a/Source/Meadow.Foundation.Peripherals/Displays.AsciiConsole/Samples/AsciiConsole_Sample/AsciiConsole_Sample.csproj +++ b/Source/Meadow.Foundation.Peripherals/Displays.AsciiConsole/Samples/AsciiConsole_Sample/AsciiConsole_Sample.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 enable enable App diff --git a/Source/Meadow.Foundation.Peripherals/Displays.Silk/Driver/SilkDisplay.cs b/Source/Meadow.Foundation.Peripherals/Displays.Silk/Driver/Silk.cs similarity index 100% rename from Source/Meadow.Foundation.Peripherals/Displays.Silk/Driver/SilkDisplay.cs rename to Source/Meadow.Foundation.Peripherals/Displays.Silk/Driver/Silk.cs diff --git a/Source/Meadow.Foundation.Peripherals/ICs.CAN.Mcp2515/Driver/ICs.CAN.Mcp2515.csproj b/Source/Meadow.Foundation.Peripherals/ICs.CAN.Mcp2515/Driver/ICs.CAN.Mcp2515.csproj index 889244c900..5abcc5fe32 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.CAN.Mcp2515/Driver/ICs.CAN.Mcp2515.csproj +++ b/Source/Meadow.Foundation.Peripherals/ICs.CAN.Mcp2515/Driver/ICs.CAN.Mcp2515.csproj @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/Source/Meadow.Foundation.Peripherals/ICs.CAN.Mcp2515/Driver/Mcp2515.Enums.cs b/Source/Meadow.Foundation.Peripherals/ICs.CAN.Mcp2515/Driver/Mcp2515.Enums.cs index 9bd82b53fc..f58e7281e1 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.CAN.Mcp2515/Driver/Mcp2515.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.CAN.Mcp2515/Driver/Mcp2515.Enums.cs @@ -4,14 +4,33 @@ namespace Meadow.Foundation.ICs.CAN; public partial class Mcp2515 { + /// + /// Represents the available CAN oscillator frequencies. + /// public enum CanOscillator { + /// + /// 8 MHz oscillator frequency. + /// Osc_8MHz = 8_000_000, + + /// + /// 10 MHz oscillator frequency. + /// Osc_10MHz = 10_000_000, + + /// + /// 16 MHz oscillator frequency. + /// Osc_16MHz = 16_000_000, + + /// + /// 20 MHz oscillator frequency. + /// Osc_20MHz = 20_000_000, } + private enum Register : byte { RXF0SIDH = 0x00, @@ -237,4 +256,4 @@ private enum TxRtsSettings : byte private const int CAN_ERR_FLAG = 0x20000000; private const byte RXBnCTRL_RTR = 0x08; -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/ICs.IOExpanders.PCanBasic.csproj b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/ICs.CAN.PCanBasic.csproj similarity index 97% rename from Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/ICs.IOExpanders.PCanBasic.csproj rename to Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/ICs.CAN.PCanBasic.csproj index e285f669f4..419d0288a0 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/ICs.IOExpanders.PCanBasic.csproj +++ b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/ICs.CAN.PCanBasic.csproj @@ -1,4 +1,4 @@ - + net8.0 diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanBus.cs b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanBasic.cs similarity index 97% rename from Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanBus.cs rename to Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanBasic.cs index 32c9093014..0887e9851d 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanBus.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanBasic.cs @@ -1,12 +1,12 @@ using Meadow.Hardware; using Peak.Can.Basic.BackwardCompatibility; -namespace ICs.IOExpanders.PCanBasic; +namespace Meadow.Foundation.ICs.CAN; /// /// Represents a PCAN Basic /// -public class PCanBus : ICanBus +public class PCanBasic : ICanBus { /// public event EventHandler? FrameReceived; @@ -18,7 +18,7 @@ public class PCanBus : ICanBus private PCanConfiguration configuration; - internal PCanBus(PCanConfiguration configuration) + internal PCanBasic(PCanConfiguration configuration) { var result = PCANBasic.Initialize( configuration.BusHandle, diff --git a/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanConfiguration.cs b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanConfiguration.cs new file mode 100644 index 0000000000..1deed5e006 --- /dev/null +++ b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanConfiguration.cs @@ -0,0 +1,28 @@ +using Meadow.Hardware; +using Peak.Can.Basic.BackwardCompatibility; + +namespace Meadow.Foundation.ICs.CAN; + +/// +/// Represents the configuration settings for a PCAN device, including the bus handle and bitrate. +/// +public class PCanConfiguration +{ + /// + /// Gets or sets the handle for the CAN bus. + /// Default value is . + /// + /// + /// This handle corresponds to the specific PCAN device to be used, such as a USB or other supported interface. + /// + public ushort BusHandle { get; set; } = PCANBasic.PCAN_USBBUS1; + + /// + /// Gets or sets the bitrate for the CAN communication. + /// Default value is . + /// + /// + /// The bitrate determines the speed of communication on the CAN bus. Common values include 125kbps, 250kbps, and 500kbps. + /// + public CanBitrate Bitrate { get; set; } = CanBitrate.Can_250kbps; +} diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanExtensions.cs b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanExtensions.cs similarity index 96% rename from Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanExtensions.cs rename to Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanExtensions.cs index e74803967f..a20f7d6655 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanExtensions.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanExtensions.cs @@ -1,7 +1,7 @@ using Meadow.Hardware; using Peak.Can.Basic.BackwardCompatibility; -namespace ICs.IOExpanders.PCanBasic; +namespace Meadow.Foundation.ICs.CAN; internal static class PCanExtensions { @@ -26,4 +26,4 @@ internal static TPCANBaudrate ToPCANBaudrate(this CanBitrate bitrate) _ => throw new NotSupportedException() }; } -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanFdBus.cs b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanFdBus.cs new file mode 100644 index 0000000000..ca6aace37d --- /dev/null +++ b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanFdBus.cs @@ -0,0 +1,116 @@ +using Meadow.Hardware; + +namespace Meadow.Foundation.ICs.CAN; + +/// +/// Represents a PCAN FD (Flexible Data Rate) CAN bus implementation. +/// +/// +/// This class provides functionality to interact with a PCAN FD CAN bus, including sending and receiving frames, managing filters, and handling bus errors. +/// +public class PCanFdBus : ICanBus +{ + /// + /// Occurs when a CAN frame is received on the bus. + /// + /// + /// This event provides access to the received object. + /// + public event EventHandler? FrameReceived; + + /// + /// Occurs when a bus error is detected. + /// + /// + /// This event provides access to detailed error information through a object. + /// + public event EventHandler? BusError; + + /// + /// Initializes a new instance of the class using the specified configuration. + /// + /// The configuration settings for the PCAN FD bus. + /// This constructor is not yet implemented. + internal PCanFdBus(PCanConfiguration configuration) + { + throw new NotImplementedException(); + } + + /// + /// Gets or sets the bitrate for the CAN bus. + /// + /// This property is not yet implemented. + public CanBitrate BitRate + { + get => throw new NotImplementedException(); + set => throw new NotImplementedException(); + } + + /// + /// Gets the collection of acceptance filters for the CAN bus. + /// + /// + /// Acceptance filters allow specific CAN frames to be received while ignoring others. + /// + /// This property is not yet implemented. + public CanAcceptanceFilterCollection AcceptanceFilters => throw new NotImplementedException(); + + /// + /// Clears all receive buffers on the CAN bus. + /// + /// This method is not yet implemented. + public void ClearReceiveBuffers() + { + throw new NotImplementedException(); + } + + /// + /// Checks if a CAN frame is available in the receive buffer. + /// + /// true if a frame is available; otherwise, false. + /// This method is not yet implemented. + public bool IsFrameAvailable() + { + throw new NotImplementedException(); + } + + /// + /// Reads a CAN frame from the receive buffer. + /// + /// The received , or null if no frame is available. + /// This method is not yet implemented. + public ICanFrame? ReadFrame() + { + throw new NotImplementedException(); + } + + /// + /// Sets a filter for incoming CAN frames. + /// + /// The filter to apply. + /// This method is not yet implemented. + public void SetFilter(int filter) + { + throw new NotImplementedException(); + } + + /// + /// Sets a mask for filtering incoming CAN frames. + /// + /// The mask to apply. + /// This method is not yet implemented. + public void SetMask(int filter) + { + throw new NotImplementedException(); + } + + /// + /// Writes a CAN frame to the bus. + /// + /// The to write to the bus. + /// This method is not yet implemented. + public void WriteFrame(ICanFrame frame) + { + throw new NotImplementedException(); + } +} diff --git a/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanUsb.cs b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanUsb.cs new file mode 100644 index 0000000000..db64261224 --- /dev/null +++ b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/PCanUsb.cs @@ -0,0 +1,61 @@ +using Meadow.Hardware; +using Peak.Can.Basic.BackwardCompatibility; + +namespace Meadow.Foundation.ICs.CAN; + +/// +/// Represents a PCAN USB CAN controller implementation. +/// +/// +/// This class provides functionality to create CAN buses for PCAN USB devices. +/// Note that this implementation is only supported on Windows and requires the PCANBasic DLL. +/// +public class PCanUsb : ICanController +{ + /// + /// Initializes a new instance of the class. + /// + /// + /// This constructor checks for PCAN USB compatibility and assumes the presence of the PCANBasic DLL. + /// + public PCanUsb() + { + // TODO: only supported on Windows + // TODO: check for PCANBasic DLL + } + + /// + /// Creates a CAN bus with the specified bitrate and bus number. + /// + /// The bitrate to configure for the CAN bus. + /// + /// The bus number to use for the CAN interface. Defaults to 0, corresponding to . + /// + /// + /// An instance of configured for the specified bitrate and bus number. + /// + /// + /// If the specified bitrate is , the returned bus will support Flexible Data Rate (CAN FD). + /// Otherwise, a standard CAN bus will be created. + /// + /// + /// Thrown if the method is invoked without implementing the required functionality. + /// + public ICanBus CreateCanBus(CanBitrate bitrate, int busNumber = 0) + { + var config = new PCanConfiguration + { + Bitrate = bitrate, + BusHandle = (ushort)(PCANBasic.PCAN_USBBUS1 + busNumber) + }; + + if (bitrate == CanBitrate.Can_FD) + { + return new PCanFdBus(config); + } + else + { + return new PCanBasic(config); + } + } +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/Readme.md b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/Readme.md similarity index 100% rename from Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/Readme.md rename to Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Driver/Readme.md diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Samples/PCanBasic_Sample/PCanBasic_Sample.csproj b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Samples/PCanBasic_Sample/PCanBasic_Sample.csproj similarity index 77% rename from Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Samples/PCanBasic_Sample/PCanBasic_Sample.csproj rename to Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Samples/PCanBasic_Sample/PCanBasic_Sample.csproj index ae878308db..4e6888435f 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Samples/PCanBasic_Sample/PCanBasic_Sample.csproj +++ b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Samples/PCanBasic_Sample/PCanBasic_Sample.csproj @@ -8,7 +8,7 @@ - + diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Samples/PCanBasic_Sample/Program.cs b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Samples/PCanBasic_Sample/Program.cs similarity index 95% rename from Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Samples/PCanBasic_Sample/Program.cs rename to Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Samples/PCanBasic_Sample/Program.cs index 42c16a1611..d6295bc00e 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Samples/PCanBasic_Sample/Program.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.CAN.PCanBasic/Samples/PCanBasic_Sample/Program.cs @@ -1,7 +1,7 @@ -using ICs.IOExpanders.PCanBasic; +using Meadow.Foundation.ICs.CAN; using Meadow.Hardware; -namespace PCanBasic_ReadSample; +namespace PCanBus_ReadSample; internal class Program { diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Ads1263/Driver/ICs.IOExpanders.Ads1263.csproj b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Ads1263/Driver/ICs.IOExpanders.Ads1263.csproj index 0195e31db7..cb5322c10d 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Ads1263/Driver/ICs.IOExpanders.Ads1263.csproj +++ b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Ads1263/Driver/ICs.IOExpanders.Ads1263.csproj @@ -1,4 +1,4 @@ - + 1.14.0 Readme.md @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanConfiguration.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanConfiguration.cs deleted file mode 100644 index 1053ab5dae..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanConfiguration.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Meadow.Hardware; -using Peak.Can.Basic.BackwardCompatibility; - -namespace ICs.IOExpanders.PCanBasic; - -public class PCanConfiguration -{ - public ushort BusHandle { get; set; } = PCANBasic.PCAN_USBBUS1; - public CanBitrate Bitrate { get; set; } = CanBitrate.Can_250kbps; -} diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanFdBus.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanFdBus.cs deleted file mode 100644 index 307f1d15a7..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanFdBus.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Meadow.Hardware; - -namespace ICs.IOExpanders.PCanBasic; - -public class PCanFdBus : ICanBus -{ - /// - public event EventHandler? FrameReceived; - /// - public event EventHandler? BusError; - - internal PCanFdBus(PCanConfiguration configuration) - { - throw new NotImplementedException(); - } - - public CanBitrate BitRate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } - - public CanAcceptanceFilterCollection AcceptanceFilters => throw new NotImplementedException(); - - public void ClearReceiveBuffers() - { - throw new NotImplementedException(); - } - - public bool IsFrameAvailable() - { - throw new NotImplementedException(); - } - - public ICanFrame? ReadFrame() - { - throw new NotImplementedException(); - } - - public void SetFilter(int filter) - { - throw new NotImplementedException(); - } - - public void SetMask(int filter) - { - throw new NotImplementedException(); - } - - public void WriteFrame(ICanFrame frame) - { - throw new NotImplementedException(); - } -} diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanUsb.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanUsb.cs deleted file mode 100644 index c7d0c93f1d..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.PCanBasic/Driver/PCanUsb.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Meadow.Hardware; -using Peak.Can.Basic.BackwardCompatibility; - -namespace ICs.IOExpanders.PCanBasic; - -public class PCanUsb : ICanController -{ - public PCanUsb() - { - // TODO: only supported on Windows - // TODO: check for PCANBasic DLL - } - - /// - public ICanBus CreateCanBus(CanBitrate bitrate, int busNumber = 0) - { - var config = new PCanConfiguration - { - Bitrate = bitrate, - BusHandle = (ushort)(PCANBasic.PCAN_USBBUS1 + busNumber) - }; - - if (bitrate == CanBitrate.Can_FD) - { - return new PCanFdBus(config); - } - else - { - return new PCanBus(config); - } - } -} diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Pca9685/Driver/Pca9685.DigitalOutputPort.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Pca9685/Driver/Pca9685.DigitalOutputPort.cs index 0be1911c56..b25dd18d6c 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Pca9685/Driver/Pca9685.DigitalOutputPort.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Pca9685/Driver/Pca9685.DigitalOutputPort.cs @@ -1,14 +1,28 @@ using Meadow.Hardware; +using System; using System.Linq; namespace Meadow.Foundation.ICs.IOExpanders; public partial class Pca9685 { + /// + /// Represents a digital output port for the PCA9685 I/O expander. + /// public class DigitalOutputPort : IDigitalOutputPort { + /// + /// Gets the initial state of the digital output port. + /// public bool InitialState { get; } + /// + /// Gets or sets the current state of the digital output port. + /// + /// + /// Setting the state to true turns the output on, and setting it to false turns it off. + /// Updates the PWM signal on the PCA9685 accordingly. + /// public bool State { get => state; @@ -20,23 +34,35 @@ public bool State if (state) { - controller.SetPwm(portNumber, 4096, 0); + controller.SetPwm(portNumber, 4096, 0); // Set output high } else { - controller.SetPwm(portNumber, 0, 4096); + controller.SetPwm(portNumber, 0, 4096); // Set output low } } } - bool state; + private bool state; + /// + /// Gets the digital channel information for the port. + /// public IDigitalChannelInfo Channel { get; } + /// + /// Gets the pin associated with the digital output port. + /// public IPin Pin { get; } private readonly Pca9685 controller; private readonly byte portNumber; + /// + /// Initializes a new instance of the class. + /// + /// The PCA9685 controller instance that manages the port. + /// The pin associated with the digital output port. + /// The initial state of the digital output port. internal DigitalOutputPort(Pca9685 controller, IPin pin, bool initialState) { InitialState = initialState; @@ -49,8 +75,14 @@ internal DigitalOutputPort(Pca9685 controller, IPin pin, bool initialState) portNumber = (byte)pin.Key; } + /// + /// Disposes of the digital output port. + /// + /// + /// This method is currently a no-op, but it is provided to implement . + /// public void Dispose() { } } -} \ No newline at end of file +} diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup1.jpg b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup1.jpg deleted file mode 100644 index 566d31246d..0000000000 Binary files a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup1.jpg and /dev/null differ diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup10.jpg b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup10.jpg deleted file mode 100644 index 0a5f705b6f..0000000000 Binary files a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup10.jpg and /dev/null differ diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup2.jpg b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup2.jpg deleted file mode 100644 index 129533a4bc..0000000000 Binary files a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup2.jpg and /dev/null differ diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup3.jpg b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup3.jpg deleted file mode 100644 index ce92d14130..0000000000 Binary files a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup3.jpg and /dev/null differ diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup4.jpg b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup4.jpg deleted file mode 100644 index e8201af83f..0000000000 Binary files a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup4.jpg and /dev/null differ diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup5.jpg b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup5.jpg deleted file mode 100644 index 572e9cbc19..0000000000 Binary files a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup5.jpg and /dev/null differ diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup6.jpg b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup6.jpg deleted file mode 100644 index e53c9b9cfa..0000000000 Binary files a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup6.jpg and /dev/null differ diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup7.jpg b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup7.jpg deleted file mode 100644 index 62b5a86b57..0000000000 Binary files a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup7.jpg and /dev/null differ diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup8.jpg b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup8.jpg deleted file mode 100644 index 00947ace4d..0000000000 Binary files a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup8.jpg and /dev/null differ diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup9.jpg b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup9.jpg deleted file mode 100644 index cda6a67bed..0000000000 Binary files a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/BreadboardSetup9.jpg and /dev/null differ diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart.sln b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart.sln deleted file mode 100644 index 3173fb7107..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart.sln +++ /dev/null @@ -1,65 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.9.34723.18 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InterruptDrivenUart", "InterruptDrivenUart\InterruptDrivenUart.csproj", "{65AE7AD0-E9E1-44BB-A2AC-61F1D9A40737}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICs.IOExpanders.Sc16is7x2", "..\..\Driver\ICs.IOExpanders.Sc16is7x2.csproj", "{C33FA668-EC3D-4F6F-8ACF-0606A7F64AEB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Meadow.Foundation.Core", "..\..\..\..\Meadow.Foundation.Core\Meadow.Foundation.Core.csproj", "{76845A42-388B-4279-B763-584D743B621E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Meadow.Contracts", "..\..\..\..\..\..\Meadow.Contracts\Source\Meadow.Contracts\Meadow.Contracts.csproj", "{3C7EABE0-07E1-4697-88E1-3F0A626E6D20}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Meadow.Logging", "..\..\..\..\..\..\Meadow.Logging\Source\Meadow.Logging\lib\Meadow.Logging.csproj", "{6A68E331-C200-48EB-BC8A-10FA08703453}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Meadow.Units", "..\..\..\..\..\..\Meadow.Units\Source\Meadow.Units\Meadow.Units.csproj", "{8CD28F85-231A-4B4A-92FF-255E0DF750D2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {65AE7AD0-E9E1-44BB-A2AC-61F1D9A40737}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {65AE7AD0-E9E1-44BB-A2AC-61F1D9A40737}.Debug|Any CPU.Build.0 = Debug|Any CPU - {65AE7AD0-E9E1-44BB-A2AC-61F1D9A40737}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {65AE7AD0-E9E1-44BB-A2AC-61F1D9A40737}.Release|Any CPU.ActiveCfg = Release|Any CPU - {65AE7AD0-E9E1-44BB-A2AC-61F1D9A40737}.Release|Any CPU.Build.0 = Release|Any CPU - {65AE7AD0-E9E1-44BB-A2AC-61F1D9A40737}.Release|Any CPU.Deploy.0 = Release|Any CPU - {C33FA668-EC3D-4F6F-8ACF-0606A7F64AEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C33FA668-EC3D-4F6F-8ACF-0606A7F64AEB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C33FA668-EC3D-4F6F-8ACF-0606A7F64AEB}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {C33FA668-EC3D-4F6F-8ACF-0606A7F64AEB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C33FA668-EC3D-4F6F-8ACF-0606A7F64AEB}.Release|Any CPU.Build.0 = Release|Any CPU - {C33FA668-EC3D-4F6F-8ACF-0606A7F64AEB}.Release|Any CPU.Deploy.0 = Release|Any CPU - {76845A42-388B-4279-B763-584D743B621E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {76845A42-388B-4279-B763-584D743B621E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {76845A42-388B-4279-B763-584D743B621E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {76845A42-388B-4279-B763-584D743B621E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {76845A42-388B-4279-B763-584D743B621E}.Release|Any CPU.Build.0 = Release|Any CPU - {76845A42-388B-4279-B763-584D743B621E}.Release|Any CPU.Deploy.0 = Release|Any CPU - {3C7EABE0-07E1-4697-88E1-3F0A626E6D20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3C7EABE0-07E1-4697-88E1-3F0A626E6D20}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3C7EABE0-07E1-4697-88E1-3F0A626E6D20}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {3C7EABE0-07E1-4697-88E1-3F0A626E6D20}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3C7EABE0-07E1-4697-88E1-3F0A626E6D20}.Release|Any CPU.Build.0 = Release|Any CPU - {3C7EABE0-07E1-4697-88E1-3F0A626E6D20}.Release|Any CPU.Deploy.0 = Release|Any CPU - {6A68E331-C200-48EB-BC8A-10FA08703453}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6A68E331-C200-48EB-BC8A-10FA08703453}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6A68E331-C200-48EB-BC8A-10FA08703453}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6A68E331-C200-48EB-BC8A-10FA08703453}.Release|Any CPU.Build.0 = Release|Any CPU - {8CD28F85-231A-4B4A-92FF-255E0DF750D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8CD28F85-231A-4B4A-92FF-255E0DF750D2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8CD28F85-231A-4B4A-92FF-255E0DF750D2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {8CD28F85-231A-4B4A-92FF-255E0DF750D2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8CD28F85-231A-4B4A-92FF-255E0DF750D2}.Release|Any CPU.Build.0 = Release|Any CPU - {8CD28F85-231A-4B4A-92FF-255E0DF750D2}.Release|Any CPU.Deploy.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {6B9B6361-5867-45DF-9E6A-72834F5788E3} - EndGlobalSection -EndGlobal diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/.vscode/launch.json b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/.vscode/launch.json deleted file mode 100644 index 7418146b7f..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/.vscode/launch.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Deploy", - "type": "meadow", - "request": "launch", - "preLaunchTask": "meadow: Build" - } - ] -} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/InterruptDrivenUart.csproj b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/InterruptDrivenUart.csproj deleted file mode 100644 index b896b1c7a6..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/InterruptDrivenUart.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - netstandard2.1 - true - Library - App - - - - - - - - Always - - - Always - - - Always - - - - - - \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/MeadowApp.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/MeadowApp.cs deleted file mode 100644 index 73a4b83148..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/MeadowApp.cs +++ /dev/null @@ -1,174 +0,0 @@ -using Meadow; -using Meadow.Devices; -using Meadow.Foundation.ICs.IOExpanders; -using Meadow.Hardware; -using System; -using System.Text; -using System.Threading.Tasks; - -#nullable enable - -namespace ICs.IOExpanders.Sc16is752_Sample -{ - public class MeadowApp : App - { - private Sc16is752? _expander = null; - private ISerialPort? _sc16is7x2Port = null; - private IDigitalInterruptPort? _sharedIrqPort = null; - - // LONG MESSAGE TESTS (using extra IRQ driven buffer): - // The following speed tests have been performed with Meadow v2.d and OS v1.10.0: - // Test data sent from a second Meadow running the SerialTestGenerator app. - // NB! These tests are using VERY LONG messages. (300 bytes) You may achieve much higher speeds with - // short messages only. (<=64 bytes, the size of the SC16IS7x2 FIFO buffer) - // Continous reading driven by IRQ works, but NOT the FIRST time the callback is invoked. - // Probably because of this: https://github.com/WildernessLabs/Meadow_Issues/issues/74 - private const int Rate = 9600; // Continous IRQ read works, but I2C bus speed must be <= 1MHz (FastPlus). - //private const int Rate = 19200; // Continous IRQ read works, but I2C bus speed must be 400KHz (Fast) or 1MHz (FastPlus). - //private const int Rate = 38400; // Continous IRQ read DOES NOT WORK(!), regardless of I2C bus speed. - //private const int Rate = 57600; // Continous IRQ read DOES NOT WORK(!), regardless of I2C bus speed. - - private const I2cBusSpeed I2cSpeed = I2cBusSpeed.Standard; - - // Some GPIO tests, too. GPIO0-3 are output pins. GPIO4-7 are input pins. - // Connect pin 0 to 4, 1 to 5, 2 to 6, 3 to 7. - private Sc16is7x2.DigitalOutputPort?[] _expOutputs = new Sc16is7x2.DigitalOutputPort[4]; - - public override async Task Initialize() - { - // NOTE: This sample connects PortA on the expander back to COM1 on the F7Feather - Resolver.Log.Info("Initialize..."); - - var address = Sc16is7x2.Addresses.Address_0x48; // Set A0 ans A1 to 3.3V to get this address. - try - { - _sharedIrqPort = Device.CreateDigitalInterruptPort(Device.Pins.D00, InterruptMode.EdgeFalling, ResistorMode.Disabled); - - var i2c = Device.CreateI2cBus(I2cSpeed); - var frequency = new Meadow.Units.Frequency(1.8432, Meadow.Units.Frequency.UnitType.Megahertz); - _expander = new Sc16is752(i2c, frequency, address, _sharedIrqPort); - _sc16is7x2Port = _expander.PortA.CreateSerialPort(Rate, readBufferSize: 8192); - - var outPins = new IPin[] { _expander.Pins.GP0, _expander.Pins.GP1, _expander.Pins.GP2, _expander.Pins.GP3 }; - var inPins = new IPin[] { _expander.Pins.GP4, _expander.Pins.GP5, _expander.Pins.GP6, _expander.Pins.GP7 }; - for(int i = 0; i < 4; i++) - { - _expOutputs[i] = _expander.CreateDigitalOutputPort(outPins[i], false, OutputType.PushPull) as Sc16is7x2.DigitalOutputPort; - var inPort = _expander.CreateDigitalInputPort(inPins[i]) as Sc16is7x2.DigitalInputPort; - inPort!.StateChanged += (s, e) => - { - Resolver.Log.Info($"---> StateChanged {inPort.Pin.Name}: {e.OldState} -> {e.NewState}"); - }; - } - - // We (this main program) can also handle the IRQ's, but should we should be last in the queue. - _sharedIrqPort.Changed += (s, e) => - { - string oldValue = e.Old != null ? e.Old.Value.State.ToString() : "None"; - //Resolver.Log.Info($"---> IRQ: {oldValue} -> {e.New.State}"); - //if (e.New.State == false) Resolver.Log.Info($"---> IRQ. Main app can also subscribe."); - }; - } - catch (Exception ex) - { - Resolver.Log.Error($"Failed to initialize 0x{(byte)address:X2}: {ex.Message}"); - await Task.Delay(1000); - } - } - - string _irqReceiveText = string.Empty; - string _sc16is7x2Name = "SC16IS752"; - - public async override Task Run() - { - if (_expander == null || _sc16is7x2Port == null) - return; - - // Test IRQ callbacks for serial port. This will called AFTER the driver has read the data. - _sc16is7x2Port.DataReceived += (s, e) => - { - var bytes = _sc16is7x2Port.ReadAll(); - _irqReceiveText += Encoding.ASCII.GetString(bytes); - // Disabling this. It may be too slow inside an interrupt handler... - //Resolver.Log.Info($" ---> {_sc16is7x2Name} port read: irqReceiveText={NiceMsg(_irqReceiveText)} [{_sc16is7x2Name} IRQ callback is working!]"); - }; - _sc16is7x2Port.BufferOverrun += (s, e) => - { - Resolver.Log.Error($" ---> {_sc16is7x2Name} buffer overrun!"); - }; - - Resolver.Log.Info($"Opening port {_sc16is7x2Name}..."); - _sc16is7x2Port.Open(); - - for (int i = 0; i < 100; i++) - { - // Test receiving message - await Receive(_sc16is7x2Name, _sc16is7x2Port); - } - - Resolver.Log.Info($"ALL DONE."); - while (true) - { - await Task.Delay(1000); - } - } - - /// - /// The RX/TX FIFO's on SC16IS7x2 are 64 bytes each. So, we can read max 64 bytes at once. - /// KW: I'm trying to implement support for reading more than 64 bytes, but this requires IRQ callback to work. - /// - /// - /// - /// - /// - /// - private async Task Receive( - //string senderName, ISerialPort senderPort, - string receiverName, ISerialPort receiverPort) - { - try - { - _irqReceiveText = string.Empty; // Clear the IRQ receive buffer. - - // Wait for possible IRQ callback's to receive data. - Resolver.Log.Info($"Waiting for IRQ initiated external messages (and changing some GPIO's)..."); - - for (int i = 0; i < 4; i++) - { - bool newState = !_expOutputs[i]!.State; // NB! The two !'s have quite different meaning. - Resolver.Log.Info($"*** Setting output {_expOutputs[i]!.Pin.Name} to {newState} ***"); - _expOutputs[i]!.State = newState; - await Task.Delay(4000); - } - - if (_irqReceiveText.Length > 0) - { - Resolver.Log.Info($"Received {_irqReceiveText.Length} bytes on {receiverName} using IRQ callback: {NiceMsg(_irqReceiveText)}"); - } - - // Read any left over bytes. (Text received without IRQ callback) - var leftOvers = receiverPort.ReadAll(); - if (leftOvers.Length == 0) - { - Resolver.Log.Info("No left over bytes! :-)"); - } - else - { - string leftOverText = Encoding.ASCII.GetString(leftOvers); - Resolver.Log.Info($"Read {leftOvers.Length} left over bytes on {receiverName} WITHOUT IRQ callback: {NiceMsg(leftOverText)}"); - } - - Resolver.Log.Info($"Done."); - } - catch (Exception ex) - { - Resolver.Log.Error($"Test error: {ex.Message}"); - } - } - - private string NiceMsg(string message) - { - return $"\"{message.Replace("\n", "\\n")}\""; - } - } -} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/app.config.yaml b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/app.config.yaml deleted file mode 100644 index 26f9a96116..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/app.config.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# Uncomment additional options as needed. -# To learn more about these config options, including custom application configuration settings, check out the Application Settings Configuration documentation. -# http://developer.wildernesslabs.co/Meadow/Meadow.OS/Configuration/Application_Settings_Configuration/ - -# App lifecycle configuration. -Lifecycle: - - # Control whether Meadow will restart when an unhandled app exception occurs. Combine with Lifecycle > AppFailureRestartDelaySeconds to control restart timing. - RestartOnAppFailure: false - - # When app set to restart automatically on app failure, -# AppFailureRestartDelaySeconds: 15 - -# Logging configuration. -Logging: - - # Adjust the level of logging detail. - LogLevel: - - # Trace, Debug, Information, Warning, or Error - Default: Information - -# Meadow.Cloud configuration. -MeadowCloud: - - # Enable Logging, Events, Command + Control -# Enabled: false - - # Enable Over-the-air Updates -# EnableUpdates: false - - # Enable Health Metrics -# EnableHealthMetrics: false - - # How often to send metrics to Meadow.Cloud -# HealthMetricsIntervalMinutes: 60 \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/meadow.config.yaml b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/meadow.config.yaml deleted file mode 100644 index a5c6f825e7..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/meadow.config.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# Acceptable values for true: true, 1, yes -# Acceptable values for false: false, 0, no - -# Main Device Config -Device: - - # Name of the device on the network. - Name: MeadowDevice - - # Uncomment if SD card hardware present on this hardware - # (e.g., Core-Compute module with SD add-on)? Optional; default value is `false`. -# SdStorageSupported: true - -# Control how the ESP coprocessor will start and operate. -Coprocessor: - - # Should the ESP32 automatically attempt to connect to an access point at startup? - # If set to true, wifi.yaml credentials must be stored in the device. -# AutomaticallyStartNetwork: true - - # Should the ESP32 automatically reconnect to the configured access point? -# AutomaticallyReconnect: true - - # Maximum number of retry attempts for connections etc. before an error code is returned. -# MaximumRetryCount: 7 - -# Network configuration. -Network: - - # Network Interface (Default value is WiFi with DHCP) -# Interfaces: -# - Name: Ethernet -# UseDHCP: false -# IPAddress: 192.168.1.60 -# NetMask: 255.255.255.0 -# Gateway: 192.168.1.254 -# - Name: WiFi -# UseDHCP: true -# IPAddress: -# NetMask: -# Gateway: - - # Default Interface -# DefaultInterface: Wifi - - # Automatically attempt to get the time at startup? -# GetNetworkTimeAtStartup: true - - # Time synchronization period in seconds. -# NtpRefreshPeriod: 600 - - # Name of the NTP servers. -# NtpServers: -# - 0.pool.ntp.org -# - 1.pool.ntp.org -# - 2.pool.ntp.org -# - 3.pool.ntp.org - - # IP addresses of the DNS servers. -# DnsServers: -# - 1.1.1.1 -# - 8.8.8.8 \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/wifi.config.yaml b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/wifi.config.yaml deleted file mode 100644 index 13adcf19cf..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/InterruptDrivenUart/wifi.config.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# Uncomment to set the default Wi-Fi credentials. (This file will be processed into secure storage on the ESP32 and then deleted from the device.) -# To learn more about these config options, including custom application configuration settings, check out the Application Settings Configuration documentation. -# http://developer.wildernesslabs.co/Meadow/Meadow.OS/Configuration/WiFi_Configuration/ - -# WiFi network credentials -Credentials: - - # WiFi SSID -# Ssid: YourSSID - - # WiFi Password -# Password: SSIDPassword \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/ReadMe.txt b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/ReadMe.txt deleted file mode 100644 index 2039b61a9f..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/ReadMe.txt +++ /dev/null @@ -1,59 +0,0 @@ -This project tests reading data from the SC16IS7x2 UART using the interrupt signal from SC16IS7x2. -The UART channel A is tested by using a second Meadow running the "SerialTestGenerator" test project. -The GPIO's are also tested by configuring GP0-3 as output and GP4-7 as input. - -Requirements: - - TWO Meadow devices (during driver development it's nice to separate sender and receiver) - - An SC16IS7x2 breakout - - A push button - - A 1K ohm resistor - -Hookup: - - The "first" Meadow running the "InterruptDrivenUart" project. - The SC16IS7x2 is connected like this (breakout board pin -> Meadow pin): - VCC -> 3.3V - GND -> GND - SCL -> CLK (D8) with a 4.7K ohm pull-up to 3.3V. (Picture may show 1K) - SDA -> DAT (D7) with a 4.7K ohm pull-up to 3.3V. (Picture may show 1K) - A0 -> 3.3V - A1 -> 3.3V - IRQ -> D0 with a 1K ohm pull-up to 3.3V - GP0 -> GP4 (Configured as output -> input) - GP1 -> GP5 (Configured as output -> input) - GP2 -> GP6 (Configured as output -> input) - GP3 -> GP7 (Configured as output -> input) - - - The "second" Meadow running the "SerialTestGenerator" project to generate messages: - A push button should be connected between 3.3V and the D0 GIPO. - The Meadow COM1 TX (D12) should be connected to the SC16IS7x2 PortA RX pin. - The Meadow COM1 RX (D13) should be connected to the SC16IS7x2 PortA TX pin. - -While testing, it is the output from the "first" Meadow ("InterruptDrivenUart") that is most interesting. -You can connect the 3.3V and GND of the two Meadows together, so that the SerialTestGenerator app -on the "second" Meadow is always running. -A long button press will generate a message of 24 bytes. ("Meadow calling! Wakeup!\n") -A short button press will generate a message of 300 bytes. - -The "first" Meadow will set up SC16IS7x2 to listen for UART messages using IRQ, then execute this loop: - - Wait for 15 seconds. - - Write the texts received by the DataReceived event handler. - - Check for any left over data in the FIFO buffers. Both the hardware and software buffers. - If the IRQ handler has left any data in the buffers, that would indicate a problem with the IRQ signal. - -NB! The first time you send a message to the SC16IS7x2 after a reboot, you will probably get a buffer overrun error - if the message is long (300 bytes). This happens because the HW FIFO is only 64 bytes, and the Meadow uses a very - long time to route the first interrupt call to the SC16IS7x2 driver. - I think this is the reason: https://github.com/WildernessLabs/Meadow_Issues/issues/74 - However, any following messages are handled fine. - Also, if the first message is short, it will work fine because it will fit inside the 64 byte HW FIFO. - -NB2! I you keep pressing the button quite often during the test, you might get a message like this in the output: - "ReadChannelRegister: IOState A CC (Corrected value!)" - This can happen when the GPIO's are changing while the UART is kept busy. For some reason when reading IOState - the result may be 0 even though it clearly shouldn't be. I have put in a correction mechanism in the - Sc16is7x2.ReadChannelRegister method to correct this special case. (If address is IOState and result is 0, - we're reading it again. If the new result is different from 0 we use that instead and print a warning) - -I hope this will be useful to someone. -Have fun! -Kaare Wehn diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/Test.fzz b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/Test.fzz deleted file mode 100644 index d262477794..0000000000 Binary files a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDrivenUart/Test.fzz and /dev/null differ diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator.sln b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator.sln deleted file mode 100644 index b20383c34b..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator.sln +++ /dev/null @@ -1,27 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.9.34723.18 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SerialTestGenerator", "SerialTestGenerator\SerialTestGenerator.csproj", "{F870446D-BA8B-43A5-ADAB-FE42439335E0}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F870446D-BA8B-43A5-ADAB-FE42439335E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F870446D-BA8B-43A5-ADAB-FE42439335E0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F870446D-BA8B-43A5-ADAB-FE42439335E0}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {F870446D-BA8B-43A5-ADAB-FE42439335E0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F870446D-BA8B-43A5-ADAB-FE42439335E0}.Release|Any CPU.Build.0 = Release|Any CPU - {F870446D-BA8B-43A5-ADAB-FE42439335E0}.Release|Any CPU.Deploy.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {C8DC4492-1C91-4562-844D-6916B6C206CD} - EndGlobalSection -EndGlobal diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/.vscode/launch.json b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/.vscode/launch.json deleted file mode 100644 index 7418146b7f..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/.vscode/launch.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Deploy", - "type": "meadow", - "request": "launch", - "preLaunchTask": "meadow: Build" - } - ] -} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/MeadowApp.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/MeadowApp.cs deleted file mode 100644 index 7ed8b81731..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/MeadowApp.cs +++ /dev/null @@ -1,103 +0,0 @@ -using Meadow; -using Meadow.Devices; -using Meadow.Foundation.Leds; -using Meadow.Foundation.Sensors.Buttons; -using Meadow.Hardware; -using Meadow.Peripherals.Leds; -using System; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace Sc16is7x2_SerialTestGen -{ - public class MeadowApp : App - { - RgbPwmLed onboardLed; - - PushButton _pushButton; - ISerialPort? _com1Port = null; - const int Rate = 9600; // OK - //const int Rate = 19200; // OK - //const int Rate = 38400; // Too high for the Meadow/SC16IS752 - //const int Rate = 57600; // Too high for the Meadow/SC16IS752 - - public override Task Initialize() - { - Resolver.Log.Info("Initialize..."); - - _com1Port = Device.PlatformOS.GetSerialPortName("COM1")?.CreateSerialPort(Rate); - _com1Port.Open(); - - // Initialize by sending Device and Pins - _pushButton = new PushButton(Device.Pins.D00, ResistorMode.InternalPullDown); - _pushButton.LongClicked += (s, e) => - { - Resolver.Log.Info("LongClicked"); - string sendText = "Meadow calling! Wakeup!\n"; - var sendBytes = Encoding.ASCII.GetBytes(sendText); - Resolver.Log.Info($"Writing {sendBytes.Length} bytes on port COM1: {NiceMsg(sendText)}"); - _com1Port.Write(sendBytes); - }; - _pushButton.Clicked += (s, e) => - { - Resolver.Log.Info("Clicked"); - // Send long message. (300 characters) Much larger than the FIFO buffer in SC16IS7x2. - string sendText = - "Meadow calling! aaa bbbbbbbbb ccccccccc ddddddddd eeeeeeeee fffffffff ggggggggg hhhhhhhhh iiiiiiiii " + - "000000000 111111111 222222222 333333333 444444444 555555555 666666666 777777777 888888888 999999999 " + - "qqqqqqqqq rrrrrrrrr sssssssss ttttttttt uuuuuuuuu vvvvvvvvv wwwwwwwww xxxxxxxxx yyyyyyyyy zzzzzzzzz\n"; - var sendBytes = Encoding.ASCII.GetBytes(sendText); - Resolver.Log.Info($"Writing {sendBytes.Length} bytes on port COM1: {NiceMsg(sendText)}"); - _com1Port.Write(sendBytes); - }; - - onboardLed = new RgbPwmLed( - redPwmPin: Device.Pins.OnboardLedRed, - greenPwmPin: Device.Pins.OnboardLedGreen, - bluePwmPin: Device.Pins.OnboardLedBlue, - CommonType.CommonAnode); - - return base.Initialize(); - } - - public override Task Run() - { - Resolver.Log.Info("Run..."); - - return CycleColors(TimeSpan.FromMilliseconds(1000)); - } - - private string NiceMsg(string message) - { - return $"\"{message.Replace("\n", "\\n")}\""; - } - - async Task CycleColors(TimeSpan duration) - { - Resolver.Log.Info("Cycle colors..."); - - while (true) - { - await ShowColorPulse(Color.Blue, duration); - await ShowColorPulse(Color.Cyan, duration); - await ShowColorPulse(Color.Green, duration); - await ShowColorPulse(Color.GreenYellow, duration); - await ShowColorPulse(Color.Yellow, duration); - await ShowColorPulse(Color.Orange, duration); - await ShowColorPulse(Color.OrangeRed, duration); - await ShowColorPulse(Color.Red, duration); - await ShowColorPulse(Color.MediumVioletRed, duration); - await ShowColorPulse(Color.Purple, duration); - await ShowColorPulse(Color.Magenta, duration); - await ShowColorPulse(Color.Pink, duration); - } - } - - async Task ShowColorPulse(Color color, TimeSpan duration) - { - await onboardLed.StartPulse(color, duration / 2); - await Task.Delay(duration); - } - } -} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/SerialTestGenerator.csproj b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/SerialTestGenerator.csproj deleted file mode 100644 index 310b42d473..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/SerialTestGenerator.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - netstandard2.1 - true - Library - App - - - - - - - - Always - - - Always - - - Always - - - \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/app.config.yaml b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/app.config.yaml deleted file mode 100644 index 26f9a96116..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/app.config.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# Uncomment additional options as needed. -# To learn more about these config options, including custom application configuration settings, check out the Application Settings Configuration documentation. -# http://developer.wildernesslabs.co/Meadow/Meadow.OS/Configuration/Application_Settings_Configuration/ - -# App lifecycle configuration. -Lifecycle: - - # Control whether Meadow will restart when an unhandled app exception occurs. Combine with Lifecycle > AppFailureRestartDelaySeconds to control restart timing. - RestartOnAppFailure: false - - # When app set to restart automatically on app failure, -# AppFailureRestartDelaySeconds: 15 - -# Logging configuration. -Logging: - - # Adjust the level of logging detail. - LogLevel: - - # Trace, Debug, Information, Warning, or Error - Default: Information - -# Meadow.Cloud configuration. -MeadowCloud: - - # Enable Logging, Events, Command + Control -# Enabled: false - - # Enable Over-the-air Updates -# EnableUpdates: false - - # Enable Health Metrics -# EnableHealthMetrics: false - - # How often to send metrics to Meadow.Cloud -# HealthMetricsIntervalMinutes: 60 \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/meadow.config.yaml b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/meadow.config.yaml deleted file mode 100644 index a5c6f825e7..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/meadow.config.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# Acceptable values for true: true, 1, yes -# Acceptable values for false: false, 0, no - -# Main Device Config -Device: - - # Name of the device on the network. - Name: MeadowDevice - - # Uncomment if SD card hardware present on this hardware - # (e.g., Core-Compute module with SD add-on)? Optional; default value is `false`. -# SdStorageSupported: true - -# Control how the ESP coprocessor will start and operate. -Coprocessor: - - # Should the ESP32 automatically attempt to connect to an access point at startup? - # If set to true, wifi.yaml credentials must be stored in the device. -# AutomaticallyStartNetwork: true - - # Should the ESP32 automatically reconnect to the configured access point? -# AutomaticallyReconnect: true - - # Maximum number of retry attempts for connections etc. before an error code is returned. -# MaximumRetryCount: 7 - -# Network configuration. -Network: - - # Network Interface (Default value is WiFi with DHCP) -# Interfaces: -# - Name: Ethernet -# UseDHCP: false -# IPAddress: 192.168.1.60 -# NetMask: 255.255.255.0 -# Gateway: 192.168.1.254 -# - Name: WiFi -# UseDHCP: true -# IPAddress: -# NetMask: -# Gateway: - - # Default Interface -# DefaultInterface: Wifi - - # Automatically attempt to get the time at startup? -# GetNetworkTimeAtStartup: true - - # Time synchronization period in seconds. -# NtpRefreshPeriod: 600 - - # Name of the NTP servers. -# NtpServers: -# - 0.pool.ntp.org -# - 1.pool.ntp.org -# - 2.pool.ntp.org -# - 3.pool.ntp.org - - # IP addresses of the DNS servers. -# DnsServers: -# - 1.1.1.1 -# - 8.8.8.8 \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/wifi.config.yaml b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/wifi.config.yaml deleted file mode 100644 index 13adcf19cf..0000000000 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Sc16is7x2/Samples/InterruptDriverUart_TestGen/SerialTestGenerator/wifi.config.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# Uncomment to set the default Wi-Fi credentials. (This file will be processed into secure storage on the ESP32 and then deleted from the device.) -# To learn more about these config options, including custom application configuration settings, check out the Application Settings Configuration documentation. -# http://developer.wildernesslabs.co/Meadow/Meadow.OS/Configuration/WiFi_Configuration/ - -# WiFi network credentials -Credentials: - - # WiFi SSID -# Ssid: YourSSID - - # WiFi Password -# Password: SSIDPassword \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Controllers/BLD510B.cs b/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Controllers/BLD510B.cs index 00f6b8b1b9..540ebc3193 100644 --- a/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Controllers/BLD510B.cs +++ b/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Controllers/BLD510B.cs @@ -5,8 +5,14 @@ namespace Meadow.Foundation.MotorControllers.StepperOnline; +/// +/// Represents the BLD510B motor controller, a Modbus-controlled device. +/// public class BLD510B : ModbusPolledDevice { + /// + /// Event triggered when the error conditions change. + /// public event EventHandler ErrorConditionsChanged; private ErrorConditions _lastError; @@ -22,6 +28,12 @@ public class BLD510B : ModbusPolledDevice /// public const int DefaultBaudRate = 9600; + /// + /// Initializes a new instance of the class. + /// + /// The Modbus RTU client to communicate with the device. + /// The Modbus address of the device. + /// The refresh period for polling the device. public BLD510B(ModbusRtuClient client, byte modbusAddress = 0x01, TimeSpan? refreshPeriod = null) : base(client, modbusAddress, refreshPeriod) { @@ -33,6 +45,10 @@ public BLD510B(ModbusRtuClient client, byte modbusAddress = 0x01, TimeSpan? refr ); } + /// + /// Gets the status of the start/stop terminal. + /// + /// A task that represents the asynchronous operation. The result contains a boolean indicating the terminal status. public async Task GetStartStopTerminal() { var r = await ReadHoldingRegisters(0x8000, 1); @@ -40,6 +56,10 @@ public async Task GetStartStopTerminal() return ((r[0] >> 8) & 1) != 0; } + /// + /// Sets the status of the start/stop terminal. + /// + /// True to enable start; otherwise, false. public async Task SetStartStopTerminal(bool startEnabled) { var current = (int)(await ReadHoldingRegisters(0x8000, 1))[0]; @@ -54,12 +74,21 @@ public async Task SetStartStopTerminal(bool startEnabled) await WriteHoldingRegister(0x8000, (ushort)current); } + /// + /// Gets the rotation direction from the direction terminal. + /// + /// A task that represents the asynchronous operation. The result contains the rotation direction. + public async Task GetDirectionTerminal() { var r = await ReadHoldingRegisters(0x8000, 1); return ((r[0] >> 9) & 1) == 0 ? RotationDirection.Clockwise : RotationDirection.CounterClockwise; } + /// + /// Sets the rotation direction for the direction terminal. + /// + /// The desired rotation direction. public async Task SetDirectionTerminal(RotationDirection direction) { int current = ReadHoldingRegisters(0x8000, 1).Result[0]; @@ -275,4 +304,4 @@ private object StateCheckerFunction(ushort[] data) return data[0]; } -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/ErrorConditions.cs b/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/ErrorConditions.cs index 1fa080e36b..afebf390ae 100644 --- a/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/ErrorConditions.cs +++ b/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/ErrorConditions.cs @@ -2,14 +2,46 @@ namespace Meadow.Foundation.MotorControllers.StepperOnline; + +/// +/// Represents various error conditions for a motor or electronic system. +/// [Flags] public enum ErrorConditions { + /// + /// No error conditions. + /// None = 0x00, + + /// + /// Indicates a locked rotor condition. + /// LockedRotor = 0x01, + + /// + /// Indicates an overcurrent condition. + /// OverCurrent = 0x02, + + /// + /// Indicates an abnormal Hall sensor value. + /// HallValueAbnormal = 0x04, + + /// + /// Indicates that the bus voltage is too low. + /// BusVoltageLow = 0x08, + + /// + /// Indicates that the bus voltage is too high. + /// BusVoltageHigh = 0x10, + + /// + /// Indicates that the current has exceeded the peak limit. + /// CurrentPeak = 0x20 } + diff --git a/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Motors.StepperOnline.csproj b/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Motors.StepperOnline.csproj index 49a8eb4228..569afa83e6 100644 --- a/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Motors.StepperOnline.csproj +++ b/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Motors.StepperOnline.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 diff --git a/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Motors/F55B150_24GL_30S.cs b/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Motors/F55B150_24GL_30S.cs index 5c7914e9da..e422d2a14f 100644 --- a/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Motors/F55B150_24GL_30S.cs +++ b/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Motors/F55B150_24GL_30S.cs @@ -15,6 +15,9 @@ public class F55B150_24GL_30S : IMotor { private BLD510B controller; + /// + /// The default motor rotation direction + /// public const RotationDirection DefaultRotationDirection = RotationDirection.Clockwise; public static AngularVelocity DefaultSpeed = new AngularVelocity(100, AngularVelocity.UnitType.RevolutionsPerMinute); @@ -22,10 +25,7 @@ public class F55B150_24GL_30S : IMotor public RotationDirection Direction { get; private set; } /// - public bool IsMoving - { - get => controller.GetActualSpeed().Result > 0; - } + public bool IsMoving => controller.GetActualSpeed().Result > 0; public F55B150_24GL_30S(BLD510B controller) { diff --git a/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Readme.md b/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Readme.md index daa6404815..187a24bc30 100644 --- a/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Readme.md +++ b/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/Readme.md @@ -1,8 +1,8 @@ -# Meadow.Foundation.Sensors.Atmospheric.Bme68x +# Meadow.Foundation.Motors.StepperOnline -**Bosch BME68x SPI / I2C humidity, barometric pressure, ambient temperature and gas (VOC) sensor** +**Drivers for motors and moto controllers from Stepper Online** -The **Bme68x** library is included in the **Meadow.Foundation.Sensors.Atmospheric.Bme68x** nuget package and is designed for the [Wilderness Labs](www.wildernesslabs.co) Meadow .NET IoT platform. +The **Motors.StepperOnline** library is included in the **Meadow.Foundation.Motors.StepperOnline** nuget package and is designed for the [Wilderness Labs](www.wildernesslabs.co) Meadow .NET IoT platform. This driver is part of the [Meadow.Foundation](https://developer.wildernesslabs.co/Meadow/Meadow.Foundation/) peripherals library, an open-source repository of drivers and libraries that streamline and simplify adding hardware to your C# .NET Meadow IoT applications. @@ -14,105 +14,7 @@ To view all Wilderness Labs open-source projects, including samples, visit [gith You can install the library from within Visual studio using the the NuGet Package Manager or from the command line using the .NET CLI: -`dotnet add package Meadow.Foundation.Sensors.Atmospheric.Bme68x` -## Usage - -```csharp -Bme680? sensor; - -public override Task Initialize() -{ - Resolver.Log.Info("Initializing..."); - - //CreateSpiSensor(); - CreateI2CSensor(); - - //uncomment to enable on sensor heater for gas readings - //EnableGasHeater(); - - var consumer = Bme680.CreateObserver( - handler: result => - { - Resolver.Log.Info($"Observer: Temp changed by threshold; new temp: {result.New.Temperature?.Celsius:N2}C, old: {result.Old?.Temperature?.Celsius:N2}C"); - }, - filter: result => - { - if (result.Old?.Temperature is { } oldTemp && - result.Old?.Humidity is { } oldHumidity && - result.New.Temperature is { } newTemp && - result.New.Humidity is { } newHumidity) - { - return ((newTemp - oldTemp).Abs().Celsius > 0.5 && - (newHumidity - oldHumidity).Percent > 0.05); - } - return false; - } - ); - - sensor?.Subscribe(consumer); - - if (sensor != null) - { - sensor.Updated += (sender, result) => - { - Resolver.Log.Info($" Temperature: {result.New.Temperature?.Celsius:N2}C"); - Resolver.Log.Info($" Relative Humidity: {result.New.Humidity:N2}%"); - Resolver.Log.Info($" Pressure: {result.New.Pressure?.Millibar:N2}mbar ({result.New.Pressure?.Pascal:N2}Pa)"); - if (sensor.GasConversionIsEnabled) - { - Resolver.Log.Info($" Gas Resistance: {result.New.GasResistance:N0}Ohms"); - } - }; - } - - sensor?.StartUpdating(TimeSpan.FromSeconds(2)); - - ReadConditions().Wait(); - - return base.Initialize(); -} - -void EnableGasHeater() -{ - if (sensor != null) - { - sensor.GasConversionIsEnabled = true; - sensor.HeaterIsEnabled = true; - sensor.ConfigureHeatingProfile(Bme688.HeaterProfileType.Profile1, new Meadow.Units.Temperature(300), TimeSpan.FromMilliseconds(100), new Meadow.Units.Temperature(22)); - sensor.HeaterProfile = Bme688.HeaterProfileType.Profile1; - } -} - -void CreateSpiSensor() -{ - Resolver.Log.Info("Create BME680 sensor with SPI..."); - - var spiBus = Device.CreateSpiBus(); - sensor = new Bme680(spiBus, Device.CreateDigitalOutputPort(Device.Pins.D14)); -} - -void CreateI2CSensor() -{ - Resolver.Log.Info("Create BME680 sensor with I2C..."); - - var i2c = Device.CreateI2cBus(); - sensor = new Bme680(i2c, (byte)Bme688.Addresses.Address_0x76); -} - -async Task ReadConditions() -{ - if (sensor == null) { return; } - - var (Temperature, Humidity, Pressure, Resistance) = await sensor.Read(); - - Resolver.Log.Info("Initial Readings:"); - Resolver.Log.Info($" Temperature: {Temperature?.Celsius:N2}C"); - Resolver.Log.Info($" Pressure: {Pressure?.Hectopascal:N2}hPa"); - Resolver.Log.Info($" Relative Humidity: {Humidity?.Percent:N2}%"); - Resolver.Log.Info($" Gas Resistance: {Resistance?.Ohms:N0}Ohms"); -} - -``` +`dotnet add package Meadow.Foundation.Motors.StepperOnline` ## How to Contribute - **Found a bug?** [Report an issue](https://github.com/WildernessLabs/Meadow_Issues/issues) diff --git a/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/SpeedControl.cs b/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/SpeedControl.cs index 916b632a9e..cd9d5f5e16 100644 --- a/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/SpeedControl.cs +++ b/Source/Meadow.Foundation.Peripherals/Motors.StepperOnline/Driver/SpeedControl.cs @@ -1,7 +1,16 @@ namespace Meadow.Foundation.MotorControllers.StepperOnline; +/// +/// Speed control type +/// public enum SpeedControl { + /// + /// Analog potentiometer + /// AnalogPot = 0, + /// + /// RS485 + /// RS485 = 1 -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ahtx0/Driver/Sensors.Atmospheric.Ahtx0.csproj b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ahtx0/Driver/Sensors.Atmospheric.Ahtx0.csproj index 512a7c54c8..162a3d7001 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ahtx0/Driver/Sensors.Atmospheric.Ahtx0.csproj +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ahtx0/Driver/Sensors.Atmospheric.Ahtx0.csproj @@ -1,4 +1,4 @@ - + 1.11.0 true diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/KellerTransducer.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/Drivers/KellerTransducer.cs similarity index 100% rename from Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/KellerTransducer.cs rename to Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/Drivers/KellerTransducer.cs diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/Drivers/SimulatedKellerTransducer.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/Drivers/SimulatedKellerTransducer.cs new file mode 100644 index 0000000000..7c41d7da4b --- /dev/null +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/Drivers/SimulatedKellerTransducer.cs @@ -0,0 +1,53 @@ +using Meadow.Units; +using System.Threading.Tasks; + +namespace Meadow.Foundation.Sensors.Environmental; + +/// +/// Simulated implementation of the IKellerTransducer interface. +/// This class provides mock functionality for testing or development purposes without hardware. +/// +public class SimulatedKellerTransducer : IKellerTransducer +{ + /// + /// Reads the Modbus address of the transducer. + /// + /// A task that represents the asynchronous operation. + /// The task result contains the Modbus address as a byte. + public Task ReadModbusAddress() + { + return Task.FromResult((byte)255); + } + + /// + /// Reads the pressure from the specified channel. + /// + /// The pressure channel to read from. + /// A task that represents the asynchronous operation. + /// The task result contains the pressure as a object. + public Task ReadPressure(PressureChannel channel) + { + return Task.FromResult(new Pressure(123, Pressure.UnitType.Millibar)); + } + + /// + /// Reads the serial number of the transducer. + /// + /// A task that represents the asynchronous operation. + /// The task result contains the serial number as an integer. + public Task ReadSerialNumber() + { + return Task.FromResult(12345678); + } + + /// + /// Reads the temperature from the specified channel. + /// + /// The temperature channel to read from. + /// A task that represents the asynchronous operation. + /// The task result contains the temperature as a object. + public Task ReadTemperature(TemperatureChannel channel) + { + return Task.FromResult(new Units.Temperature(42.1, Units.Temperature.UnitType.Fahrenheit)); + } +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/PressureChannel.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/PressureChannel.cs index a3196bc4f0..161fd304e5 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/PressureChannel.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/PressureChannel.cs @@ -1,7 +1,16 @@ namespace Meadow.Foundation.Sensors.Environmental; +/// +/// The Pressure Channel +/// public enum PressureChannel { + /// + /// Channel 1 + /// P1 = 1 << 1, + /// + /// Channel 2 + /// P2 = 1 << 2 -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/SimulatedKellerTransducer.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/SimulatedKellerTransducer.cs deleted file mode 100644 index 79b9b0c193..0000000000 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Keller.XLine/Driver/SimulatedKellerTransducer.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Meadow.Units; -using System.Threading.Tasks; - -namespace Meadow.Foundation.Sensors.Environmental; - -public class SimulatedKellerTransducer : IKellerTransducer -{ - public Task ReadModbusAddress() - { - return Task.FromResult((byte)255); - } - - public Task ReadPressure(PressureChannel channel) - { - return Task.FromResult(new Pressure(123, Pressure.UnitType.Millibar)); - } - - public Task ReadSerialNumber() - { - return Task.FromResult(12345678); - } - - public Task ReadTemperature(TemperatureChannel channel) - { - return Task.FromResult(new Units.Temperature(42.1, Units.Temperature.UnitType.Fahrenheit)); - } -} diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Y4000/Driver/Y4000.Structs.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Y4000/Driver/Y4000.Structs.cs index 7a759a78a3..fff46d10d0 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Y4000/Driver/Y4000.Structs.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Y4000/Driver/Y4000.Structs.cs @@ -109,14 +109,14 @@ public Measurements(float[] data) /// A string that represents the current Y4000 measurement data. public override string ToString() { - StringBuilder sb = new StringBuilder(); + StringBuilder sb = new(); sb.AppendLine($"DissolvedOxygen: {Concentrations.DissolvedOxygen} mg/L"); sb.AppendLine($"Turbidity: {Turbidity} NTU"); sb.AppendLine($"ElectricalConductivity: {ElectricalConductivity.MilliSiemensPerCentimeter} mS/cm"); sb.AppendLine($"PH: {PH}"); sb.AppendLine($"OxidationReductionPotential: {OxidationReductionPotential.Millivolts} mV"); - sb.AppendLine($"Chlorophyll: {Concentrations.Chlorophyl.Value.MicrogramsPerLiter} ug/L"); - sb.AppendLine($"BlueGreenAlgae: {Concentrations.BlueGreenAlgae.Value.PartsPerMillion} ppm"); + sb.AppendLine($"Chlorophyll: {Concentrations.Chlorophyl!.Value.MicrogramsPerLiter} ug/L"); + sb.AppendLine($"BlueGreenAlgae: {Concentrations!.BlueGreenAlgae!.Value.PartsPerMillion} ppm"); sb.AppendLine($"Temperature: {Temperature.Celsius} C"); return sb.ToString(); diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Y4000/Driver/Y4000.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Y4000/Driver/Y4000.cs index a47d764b22..6c0ee50339 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Y4000/Driver/Y4000.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Y4000/Driver/Y4000.cs @@ -11,6 +11,9 @@ namespace Meadow.Foundation.Sensors.Environmental; +/// +/// Y4000 hardware interface +/// public interface IY4000 : IWaterQualityConcentrationsSensor, IElectricalConductivitySensor, @@ -19,6 +22,10 @@ public interface IY4000 : ITemperatureSensor, IRedoxPotentialSensor { + /// + /// Get the Y4000 serial number + /// + /// Task GetSerialNumber(); } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Volume.ResistiveTankLevelSender/Driver/Readme.md b/Source/Meadow.Foundation.Peripherals/Sensors.Volume.ResistiveTankLevelSender/Driver/Readme.md index ad1fb924a3..cff1335491 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Volume.ResistiveTankLevelSender/Driver/Readme.md +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Volume.ResistiveTankLevelSender/Driver/Readme.md @@ -1,8 +1,8 @@ -# Meadow.Foundation.Sensors.Temperature.Tmp102 +# Meadow.Foundation.Sensors.Volume.ResistiveTankLevelSender **A generic resistive tank level sending unit** -The **ResistiveTankLevelSender** library is included in the **Meadow.Foundation.Sensors.Temperature.Tmp102** nuget package and is designed for the [Wilderness Labs](www.wildernesslabs.co) Meadow .NET IoT platform. +The **ResistiveTankLevelSender** library is included in the **Meadow.Foundation.Sensors.Volume.ResistiveTankLevelSender** nuget package and is designed for the [Wilderness Labs](www.wildernesslabs.co) Meadow .NET IoT platform. This driver is part of the [Meadow.Foundation](https://developer.wildernesslabs.co/Meadow/Meadow.Foundation/) peripherals library, an open-source repository of drivers and libraries that streamline and simplify adding hardware to your C# .NET Meadow IoT applications. @@ -14,7 +14,7 @@ To view all Wilderness Labs open-source projects, including samples, visit [gith You can install the library from within Visual studio using the the NuGet Package Manager or from the command line using the .NET CLI: -`dotnet add package Meadow.Foundation.Sensors.Temperature.Tmp102` +`dotnet add package Meadow.Foundation.Sensors.Volume.ResistiveTankLevelSender` ## Usage ```csharp diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Volume.ResistiveTankLevelSender/Driver/Sensors.Volume.ResistiveTankLevelSender.csproj b/Source/Meadow.Foundation.Peripherals/Sensors.Volume.ResistiveTankLevelSender/Driver/Sensors.Volume.ResistiveTankLevelSender.csproj index deaee00b1c..999d6ab1ec 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Volume.ResistiveTankLevelSender/Driver/Sensors.Volume.ResistiveTankLevelSender.csproj +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Volume.ResistiveTankLevelSender/Driver/Sensors.Volume.ResistiveTankLevelSender.csproj @@ -9,7 +9,7 @@ ResistiveTankLevelSender Wilderness Labs, Inc http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/ - Meadow.Foundation.Sensors.Temperature.Tmp102 + Meadow.Foundation.Sensors.Volume.ResistiveTankLevelSender https://github.com/WildernessLabs/Meadow.Foundation Fuel level sender, gas tank sender, water level sender true diff --git a/Source/Meadow.Foundation.sln b/Source/Meadow.Foundation.sln index 71ef82f41d..abc01f7639 100644 --- a/Source/Meadow.Foundation.sln +++ b/Source/Meadow.Foundation.sln @@ -1563,8 +1563,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Meadow.Desktop", "..\..\Mea EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Meadow.Mac", "..\..\Meadow.Core\Source\implementations\mac\Meadow.Mac\Meadow.Mac.csproj", "{FD7E56EE-6BBE-44BB-BB8B-8DB0647CDD0D}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICs.IOExpanders.PCanBasic", "Meadow.Foundation.Peripherals\ICs.IOExpanders.PCanBasic\Driver\ICs.IOExpanders.PCanBasic.csproj", "{C7C2B091-E66B-4A83-84E4-9E6024981D41}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICs.CAN.Mcp2515", "Meadow.Foundation.Peripherals\ICs.CAN.Mcp2515\Driver\ICs.CAN.Mcp2515.csproj", "{18785D65-35BB-4DCD-89EF-0D1DFA3F1463}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CAN", "CAN", "{5C9C0932-CA09-4599-8546-8373F79B37B7}" @@ -1595,12 +1593,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sensors.Color.Tcs3472x", "M EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tcs3472x_Sample", "Meadow.Foundation.Peripherals\Sensors.Color.Tcs3472x\Samples\Tcs3472x_Sample\Tcs3472x_Sample.csproj", "{08BECE38-EBCB-4A38-9F9B-0914F3C7592E}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PCan", "PCan", "{48CA0124-A227-4F35-BEFB-FF07F1CE6D20}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PCanBasic", "PCanBasic", "{48CA0124-A227-4F35-BEFB-FF07F1CE6D20}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{3D40446F-F902-4C89-93B9-2BE094BDE136}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PCanBasic_Sample", "Meadow.Foundation.Peripherals\ICs.IOExpanders.PCanBasic\Samples\PCanBasic_Sample\PCanBasic_Sample.csproj", "{506044BB-BEC1-42D1-AF84-CD28D4E2911A}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{97463BD7-A424-4720-B737-CB1D9A9C6AEF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RTCs.Pcf8523", "Meadow.Foundation.Peripherals\RTCs.Pcf8523\Driver\RTCs.Pcf8523.csproj", "{947BDDE4-3F2D-4521-AC9E-CF6DF9D6935D}" @@ -1633,7 +1629,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StepperOnline", "StepperOnl EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Motors.StepperOnline", "Meadow.Foundation.Peripherals\Motors.StepperOnline\Driver\Motors.StepperOnline.csproj", "{D8D26232-ECA0-4042-88F4-7ECF1BC3E62F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Keller XLine", "Keller XLine", "{2240AB38-3CC6-4800-8556-D3BB5C44B720}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Keller.XLine", "Keller.XLine", "{2240AB38-3CC6-4800-8556-D3BB5C44B720}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sensors.Environmental.Keller.XLine", "Meadow.Foundation.Peripherals\Sensors.Environmental.Keller.XLine\Driver\Sensors.Environmental.Keller.XLine.csproj", "{729B86E1-49EE-4668-A599-8D7C28842F9E}" EndProject @@ -1643,6 +1639,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Flow", "Flow", "{C5AA856B-4 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sensors.Flow.HallEffect", "Meadow.Foundation.Peripherals\Sensors.Flow.HallEffect\Driver\Sensors.Flow.HallEffect.csproj", "{EE40720A-33B0-4151-80AE-F73F9C1A45D8}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICs.CAN.PCanBasic", "Meadow.Foundation.Peripherals\ICs.CAN.PCanBasic\Driver\ICs.CAN.PCanBasic.csproj", "{477CEDDB-1C1E-401D-B878-8C310E3F652E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCanBasic_Sample", "Meadow.Foundation.Peripherals\ICs.CAN.PCanBasic\Samples\PCanBasic_Sample\PCanBasic_Sample.csproj", "{C18E250D-37BA-407B-90A5-8846DDBE77AA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -3865,10 +3865,6 @@ Global {FD7E56EE-6BBE-44BB-BB8B-8DB0647CDD0D}.Debug|Any CPU.Build.0 = Debug|Any CPU {FD7E56EE-6BBE-44BB-BB8B-8DB0647CDD0D}.Release|Any CPU.ActiveCfg = Release|Any CPU {FD7E56EE-6BBE-44BB-BB8B-8DB0647CDD0D}.Release|Any CPU.Build.0 = Release|Any CPU - {C7C2B091-E66B-4A83-84E4-9E6024981D41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C7C2B091-E66B-4A83-84E4-9E6024981D41}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C7C2B091-E66B-4A83-84E4-9E6024981D41}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C7C2B091-E66B-4A83-84E4-9E6024981D41}.Release|Any CPU.Build.0 = Release|Any CPU {18785D65-35BB-4DCD-89EF-0D1DFA3F1463}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {18785D65-35BB-4DCD-89EF-0D1DFA3F1463}.Debug|Any CPU.Build.0 = Debug|Any CPU {18785D65-35BB-4DCD-89EF-0D1DFA3F1463}.Debug|Any CPU.Deploy.0 = Debug|Any CPU @@ -3911,10 +3907,6 @@ Global {08BECE38-EBCB-4A38-9F9B-0914F3C7592E}.Release|Any CPU.ActiveCfg = Release|Any CPU {08BECE38-EBCB-4A38-9F9B-0914F3C7592E}.Release|Any CPU.Build.0 = Release|Any CPU {08BECE38-EBCB-4A38-9F9B-0914F3C7592E}.Release|Any CPU.Deploy.0 = Release|Any CPU - {506044BB-BEC1-42D1-AF84-CD28D4E2911A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {506044BB-BEC1-42D1-AF84-CD28D4E2911A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {506044BB-BEC1-42D1-AF84-CD28D4E2911A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {506044BB-BEC1-42D1-AF84-CD28D4E2911A}.Release|Any CPU.Build.0 = Release|Any CPU {947BDDE4-3F2D-4521-AC9E-CF6DF9D6935D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {947BDDE4-3F2D-4521-AC9E-CF6DF9D6935D}.Debug|Any CPU.Build.0 = Debug|Any CPU {947BDDE4-3F2D-4521-AC9E-CF6DF9D6935D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU @@ -3973,6 +3965,14 @@ Global {EE40720A-33B0-4151-80AE-F73F9C1A45D8}.Release|Any CPU.ActiveCfg = Release|Any CPU {EE40720A-33B0-4151-80AE-F73F9C1A45D8}.Release|Any CPU.Build.0 = Release|Any CPU {EE40720A-33B0-4151-80AE-F73F9C1A45D8}.Release|Any CPU.Deploy.0 = Release|Any CPU + {477CEDDB-1C1E-401D-B878-8C310E3F652E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {477CEDDB-1C1E-401D-B878-8C310E3F652E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {477CEDDB-1C1E-401D-B878-8C310E3F652E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {477CEDDB-1C1E-401D-B878-8C310E3F652E}.Release|Any CPU.Build.0 = Release|Any CPU + {C18E250D-37BA-407B-90A5-8846DDBE77AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C18E250D-37BA-407B-90A5-8846DDBE77AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C18E250D-37BA-407B-90A5-8846DDBE77AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C18E250D-37BA-407B-90A5-8846DDBE77AA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -4751,7 +4751,6 @@ Global {2BB9FA79-851A-48EE-A2E1-91AE3F2B61EF} = {E0384B86-37FC-403C-B1F7-AA5D1B869EB1} {84CEDB6D-C9B1-4317-8A4E-84785ACCA6D1} = {2BB9FA79-851A-48EE-A2E1-91AE3F2B61EF} {F531D6BC-D3F2-4AFF-A84B-59351E2FA462} = {2BB9FA79-851A-48EE-A2E1-91AE3F2B61EF} - {C7C2B091-E66B-4A83-84E4-9E6024981D41} = {48CA0124-A227-4F35-BEFB-FF07F1CE6D20} {18785D65-35BB-4DCD-89EF-0D1DFA3F1463} = {066DBCFD-A21D-4FD2-87A5-B88363158149} {5C9C0932-CA09-4599-8546-8373F79B37B7} = {A1917BD0-881F-4775-88D9-38D42D448CF5} {066DBCFD-A21D-4FD2-87A5-B88363158149} = {5C9C0932-CA09-4599-8546-8373F79B37B7} @@ -4769,7 +4768,6 @@ Global {08BECE38-EBCB-4A38-9F9B-0914F3C7592E} = {C883EE04-FAC0-4734-9983-5BBF8E817ECF} {48CA0124-A227-4F35-BEFB-FF07F1CE6D20} = {5C9C0932-CA09-4599-8546-8373F79B37B7} {3D40446F-F902-4C89-93B9-2BE094BDE136} = {48CA0124-A227-4F35-BEFB-FF07F1CE6D20} - {506044BB-BEC1-42D1-AF84-CD28D4E2911A} = {3D40446F-F902-4C89-93B9-2BE094BDE136} {97463BD7-A424-4720-B737-CB1D9A9C6AEF} = {066DBCFD-A21D-4FD2-87A5-B88363158149} {947BDDE4-3F2D-4521-AC9E-CF6DF9D6935D} = {DA1B8F44-071F-492F-A1CA-66D656B9142E} {DA1B8F44-071F-492F-A1CA-66D656B9142E} = {15C7A398-35B0-4035-AE4B-FE84026D0D9E} @@ -4791,6 +4789,8 @@ Global {EA8D8CA1-BB32-49D6-88CF-9EB50ABDC44B} = {7311794D-7D2F-47E8-A5B0-C216CBD64A13} {C5AA856B-4199-43B1-AECE-8871E91A0EF1} = {9F4EEBFB-F2B6-4B28-ABAD-D219F4AB15F3} {EE40720A-33B0-4151-80AE-F73F9C1A45D8} = {C5AA856B-4199-43B1-AECE-8871E91A0EF1} + {477CEDDB-1C1E-401D-B878-8C310E3F652E} = {48CA0124-A227-4F35-BEFB-FF07F1CE6D20} + {C18E250D-37BA-407B-90A5-8846DDBE77AA} = {3D40446F-F902-4C89-93B9-2BE094BDE136} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {AF7CA16F-8C38-4546-87A2-5DAAF58A1520}