Exemplo n.º 1
0
 /**
  * <summary>
  *   Changes the PWM period in milliseconds.
  * <para>
  *   Caution: in order to avoid  random truncation of
  *   the current pulse, the change will not be applied
  *   before the end of the current period. This can significantly affect reaction
  *   time at low frequencies. If you call the matching module <c>saveToFlash()</c>
  *   method, the frequency will be kept after a device power cycle.
  * </para>
  * <para>
  * </para>
  * </summary>
  * <param name="newval">
  *   a floating point number corresponding to the PWM period in milliseconds
  * </param>
  * <para>
  * </para>
  * <returns>
  *   <c>0</c> if the call succeeds.
  * </returns>
  * <para>
  *   On failure, throws an exception or returns a negative error code.
  * </para>
  */
 public int set_period(double newval)
 {
     if (_func == null)
     {
         throw new YoctoApiProxyException("No PwmOutput connected");
     }
     if (newval == _Period_INVALID)
     {
         return(YAPI.SUCCESS);
     }
     return(_func.set_period(newval));
 }