public RemotePinImpl(Cpu.Pin pin, AnalogChannel analogChannel, PWMChannel pwmChannel) { _pin = pin; _analogChannel = analogChannel; _pwmChannel = pwmChannel; PreviousValue = -1; }
public int SetPWMOutput(PWMChannel pwmChannel, float dutyCycle) { if (dutyCycle < 0) { dutyCycle = 0; } else if (dutyCycle > 1) { dutyCycle = 1; } int dutyCyc10bit = (int)(1023 * dutyCycle); return(_ll.SetPWMOutput((uint)pwmChannel, dutyCyc10bit)); }
/// <summary> /// Gets the PWM Input. /// </summary> /// <param name="pwmChannel">PWM channel to get.</param> /// <param name="dutyCycleAndPeriod">Double array to hold Duty Cycle [0] and Period [1].</param> public void GetPWMInput(PWMChannel pwmChannel, double[] dutyCycleAndPeriod) { CANifierNative.JNI_GetPWMInput(m_handle, (int)pwmChannel, dutyCycleAndPeriod); }
public int GetPwmInput(PWMChannel pwmChannel, float[] dutyCycleAndPeriod) { return(_ll.GetPwmInput((uint)pwmChannel, dutyCycleAndPeriod)); }
public int EnablePWMOutput(PWMChannel pwmChannel, bool bEnable) { return(_ll.EnablePWMOutput((uint)pwmChannel, bEnable)); }
public ErrorCode GetPwmInput(PWMChannel pwmChannel, float[] dutyCycleAndPeriod) { return((ErrorCode)_ll.GetPwmInput((uint)pwmChannel, dutyCycleAndPeriod)); }
/** * Gets the PWM Input * @param pwmChannel PWM channel to get. * @param pulseWidthAndPeriod Double array to hold Pulse Width (microseconds) [0] and Period (microseconds) [1]. * @return Error Code generated by function. 0 indicates no error. */ public ErrorCode GetPWMInput(PWMChannel pwmChannel, float[] pulseWidthAndPeriod) { return((ErrorCode)_ll.GetPWMInput((uint)pwmChannel, pulseWidthAndPeriod)); }
public ErrorCode GetPwmInput(PWMChannel pwmChannel, float[] pulseWidthAndPeriod) { return(GetPWMInput(pwmChannel, pulseWidthAndPeriod)); }