/// <summary> /// Opens the PWM pin. /// </summary> /// <param name="chip">The PWM chip number.</param> /// <param name="pin">The PWM pin (channel) number to control.</param> public PwmPin(int chip, int pin) { var ret = NativePwm.Open(chip, pin, out _handle); if (ret != Internals.Errors.ErrorCode.None) { throw ExceptionFactory.CreateException(ret); } }
/// <summary> /// Disposes the PWM. /// </summary> protected virtual void Dispose(bool disposing) { if (_disposed) { return; } NativePwm.Close(_handle); _disposed = true; }