Пример #1
0
 /**
  * <summary>
  *   Changes the I/O direction of all channels of the port (bitmap): 0 makes a bit an input, 1 makes it an output.
  * <para>
  *   Remember to call the <c>saveToFlash()</c> method  to make sure the setting is kept after a reboot.
  * </para>
  * <para>
  * </para>
  * </summary>
  * <param name="newval">
  *   an integer corresponding to the I/O direction of all channels of the port (bitmap): 0 makes a bit
  *   an input, 1 makes it an output
  * </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_portDirection(int newval)
 {
     if (_func == null)
     {
         throw new YoctoApiProxyException("No DigitalIO connected");
     }
     if (newval == _PortDirection_INVALID)
     {
         return(YAPI.SUCCESS);
     }
     return(_func.set_portDirection(newval));
 }