/** * <summary> * Changes the electrical interface for each bit of the port. * <para> * 0 makes a bit a regular input/output, 1 makes * it an open-drain (open-collector) input/output. 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 electrical interface for each bit of the port * </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_portOpenDrain(int newval) { if (_func == null) { throw new YoctoApiProxyException("No DigitalIO connected"); } if (newval == _PortOpenDrain_INVALID) { return(YAPI.SUCCESS); } return(_func.set_portOpenDrain(newval)); }