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);
        }
예제 #3
0
 public int SetMode(ref TMode status) => dllexp_SetMode(ref status);
예제 #4
0
 public static extern int dllexp_SetMode(ref TMode status);
예제 #5
0
 public int GetCurrentMode(ref TMode status) => dllexp_GetCurrentMode(ref status);
예제 #6
0
 public static extern int dllexp_GetCurrentMode(ref TMode status);