/// <summary> /// Starts the specified behavior on the connection. /// </summary> /// <param name="connection">The connection.</param> /// <param name="behavior">The behavior.</param> public static void Start(this GpioConnection connection, PinsBehavior behavior) { foreach (var configuration in behavior.Configurations) { if (!connection.Contains(configuration)) connection.Add(configuration); } behavior.Start(connection); }
/// <summary> /// Starts the specified behavior on the connection. /// </summary> /// <param name="connection">The connection.</param> /// <param name="behavior">The behavior.</param> public static void Start(this GpioConnection connection, PinsBehavior behavior) { foreach (var configuration in behavior.Configurations) { if (!connection.Contains(configuration)) { connection.Add(configuration); } } behavior.Start(connection); }
/// <summary> /// Stops the specified behavior. /// </summary> /// <param name="connection">The connection.</param> /// <param name="behavior">The behavior.</param> public static void Stop(this GpioConnection connection, PinsBehavior behavior) { behavior.Stop(); }
/// <summary> /// Stops the specified behavior. /// </summary> /// <param name="connection">The connection.</param> /// <param name="behavior">The behavior.</param> public static void Stop(this GpioConnection connection, PinsBehavior behavior) { behavior.Stop(); }