/** * <summary> * Changes the brightness of the display. * <para> * The parameter is a value between 0 and * 100. Remember to call the <c>saveToFlash()</c> method of the module if the * modification must be kept. * </para> * <para> * </para> * </summary> * <param name="newval"> * an integer corresponding to the brightness of the display * </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_brightness(int newval) { if (_func == null) { throw new YoctoApiProxyException("No Display connected"); } if (newval == _Brightness_INVALID) { return(YAPI.SUCCESS); } return(_func.set_brightness(newval)); }