示例#1
0
 /**
  * <summary>
  *   Changes the state of the PWM at device power on.
  * <para>
  *   Remember to call the matching module <c>saveToFlash()</c>
  *   method, otherwise this call will have no effect.
  * </para>
  * <para>
  * </para>
  * </summary>
  * <param name="newval">
  *   either <c>YPwmOutput.ENABLEDATPOWERON_FALSE</c> or <c>YPwmOutput.ENABLEDATPOWERON_TRUE</c>,
  *   according to the state of the PWM at device power on
  * </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_enabledAtPowerOn(int newval)
 {
     if (_func == null)
     {
         throw new YoctoApiProxyException("No PwmOutput connected");
     }
     if (newval == _EnabledAtPowerOn_INVALID)
     {
         return(YAPI.SUCCESS);
     }
     // our enums start at 0 instead of the 'usual' -1 for invalid
     return(_func.set_enabledAtPowerOn(newval - 1));
 }