/// <summary> /// constructor /// </summary> /// <param name="config"></param> private SSD1603(SSD1603Configuration config, BusTypes bus) { Configuration = config; BusType = bus; //for drawing _canvasDevice = CanvasDevice.GetSharedDevice(); Render = new CanvasRenderTarget(_canvasDevice, Screen.WidthInDIP, Screen.HeightInDIP, Screen.DPI, Windows.Graphics.DirectX.DirectXPixelFormat.A8UIntNormalized, CanvasAlphaMode.Straight); }
/// <summary> /// constructor /// </summary> /// <param name="config"></param> private SSD1603(SSD1603Configuration config, BusTypes bus) { Configuration = config; BusType = bus; //for drawing _canvasDevice = CanvasDevice.GetSharedDevice(); Render = new CanvasRenderTarget(_canvasDevice, Screen.WidthInDIP, Screen.HeightInDIP, Screen.DPI, Windows.Graphics.DirectX.DirectXPixelFormat.A8UIntNormalized, CanvasAlphaMode.Straight); }
/// <summary> /// constructor /// </summary> /// <param name="config"></param> private SSD1603(SSD1603Configuration config, BusTypes bus) { this.Configuration = config; this.BusType = bus; //for drawing this._canvasDevice = CanvasDevice.GetSharedDevice(); this.Render = new CanvasRenderTarget(this._canvasDevice, this.Screen.WidthInDIP, this.Screen.HeightInDIP, this.Screen.DPI, Windows.Graphics.DirectX.DirectXPixelFormat.A8UIntNormalized, CanvasAlphaMode.Straight); this.SCREEN_HEIGHT_PAGES = (UInt32)this.Screen.HeightInPixel / 8; }
//SPI constructor public SSD1603(SSD1603Configuration config, SpiDevice device, GpioPin pinCmdData, GpioPin pinReset = null) : this(config, BusTypes.SPI) { this._controller = new SSD1603Controller(device, pinCmdData, pinReset); this.Init().Wait(); }
//I2c constructor public SSD1603(SSD1603Configuration config, I2cDevice device, GpioPin pinReset = null) : this(config, BusTypes.I2C) { this._controller = new SSD1603Controller(device, pinReset); this.Init().GetAwaiter(); }
//SPI constructor public SSD1603(SSD1603Configuration config, SpiDevice device, GpioPin pinCmdData, GpioPin pinReset = null) : this(config, BusTypes.SPI) { _controller = new SSD1603Controller(device, pinCmdData, pinReset); Init().Wait(); }
//I2c constructor public SSD1603(SSD1603Configuration config, I2cDevice device, GpioPin pinReset = null) : this(config, BusTypes.I2C) { _controller = new SSD1603Controller(device, pinReset); Init().Wait(); }