public void SetMode(Mode mode) { var tMode = new TMode { brightness = mode.brightness, mode = (byte)mode.mode, color = (byte)mode.color, speed = 0x05 }; var r = _nativeApi.SetMode(ref tMode); }
public Mode GetCurrentMode() { var tMode = new TMode(); var r = _nativeApi.GetCurrentMode(ref tMode); if (r != 0) { return(null); } var mode = new Mode { brightness = tMode.brightness, mode = (ModeType)tMode.mode, color = (ModeColor)tMode.color, speed = tMode.speed }; return(mode); }
public int SetMode(ref TMode status) => dllexp_SetMode(ref status);
public static extern int dllexp_SetMode(ref TMode status);
public int GetCurrentMode(ref TMode status) => dllexp_GetCurrentMode(ref status);
public static extern int dllexp_GetCurrentMode(ref TMode status);