Ejemplo n.º 1
0
 /**
  * <summary>
  *   Changes the polarity of all the bits of the port: For each bit set to 0, the matching I/O works the regular,
  *   intuitive way; for each bit set to 1, the I/O works in reverse mode.
  * <para>
  *   Remember to call the <c>saveToFlash()</c> method  to make sure the setting will be kept after a reboot.
  * </para>
  * <para>
  * </para>
  * </summary>
  * <param name="newval">
  *   an integer corresponding to the polarity of all the bits of the port: For each bit set to 0, the
  *   matching I/O works the regular,
  *   intuitive way; for each bit set to 1, the I/O works in reverse mode
  * </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_portPolarity(int newval)
 {
     if (_func == null)
     {
         throw new YoctoApiProxyException("No DigitalIO connected");
     }
     if (newval == _PortPolarity_INVALID)
     {
         return(YAPI.SUCCESS);
     }
     return(_func.set_portPolarity(newval));
 }