BrrrBayBay.LogicPWMLib.LogicPwmDataGenerator.applyChannelSettings C# (CSharp) Method

applyChannelSettings() public method

Applies the PWM channel settings for a single channel. Calling this method in any other mode than asynchronous mode, will raise an exception.
In asynchronous mode this method will update all channels
public applyChannelSettings ( ) : void
return void
        public void applyChannelSettings()
        {
            if (!Disposed)
            {
                switch (generatorMode)
                {
                    case PwmGeneratorModes.Synchronous:
                        applySynchronousChannelSettings();
                        break;
                    case PwmGeneratorModes.Asynchronous:
                        for (int i = 0; i < 8; i++)
                        {
                            applyChannelSettings(i);
                        }
                        break;
                }
            }
        }

Same methods

LogicPwmDataGenerator::applyChannelSettings ( int channel ) : void

Usage Example

Example #1
0
 /// <summary>
 /// Applies the channel settings for a single channel in asynchronous mode
 /// </summary>
 /// <param name="channel">The channel number</param>
 public void applyChannelSettings(int channel)
 {
     pwmGenerator.applyChannelSettings(channel);
 }