示例#1
0
 /**
  * Constructor.
  * <Ids_>
  *
  * @param clk
  *            See {@link #clk}.
  * @param pulseWidth
  *            See {@link #pulseWidth}.
  * @param pinSpec
  *            See {@link #pinSpec}.
  */
 public SequencerChannelConfigFmSpeed(SequencerClock clk, int pulseWidth, DigitalOutputSpec[] pinSpec)
 {
     if (pulseWidth < 2 || pulseWidth > (1 << 16))
     {
         throw new ArgumentException("Pulse width must be between [2..65536]");
     }
     this.pinSpec    = pinSpec;
     this.clk        = clk;
     this.pulseWidth = pulseWidth;
 }
 /**
  * Constructor.
  * <Ids_>
  *
  * @param clk
  *            See {@link #clk}.
  * @param period
  *            See {@link #period}.
  * @param initialPulseWidth
  *            See {@link #initialPulseWidth}.
  * @param pinSpec
  *            See {@link #pinSpec}.
  */
 public SequencerChannelConfigPwmPosition(SequencerClock clk, int period, int initialPulseWidth,
                                          DigitalOutputSpec[] pinSpec)
 {
     if (period < 2 || period > (1 << 16))
     {
         throw new ArgumentException("Period width must be between [2..65536]");
     }
     if (initialPulseWidth != 0 && (initialPulseWidth < 2 || initialPulseWidth > (1 << 16)))
     {
         throw new ArgumentException(
                   "Initial pulse width must be 0 or between [2..65536]");
     }
     this.pinSpec           = pinSpec;
     this.clk               = clk;
     this.period            = period;
     this.initialPulseWidth = initialPulseWidth;
 }