public Epaper(int screenWidth, int screenHeight, IHardwareSpecification specification = null) { if (screenWidth <= 0 || screenHeight <= 0) { throw new ArgumentException("Width and/or height cannot be less or equal zero"); } ScreenWidth = screenWidth; ScreenHeight = screenHeight; _connections = new Connections(specification ?? new DefaultSpecification()); _ePaperConnection = new EPaperConnection(_connections); }
/******* System.Device.Gpio Alternative *********/ /* * public readonly GpioController Gpio; * private readonly SpiConnectionSettings _spiSettings; * public int ResetPin { get; private set; } * public int DcPin { get; private set; } * public int CsPin { get; private set; } * public int BusyPin { get; private set; } * public SpiDevice SpiDevice { get; private set; } */ public Connections(IHardwareSpecification specification) { _specification = specification; /******* System.Device.Gpio Alternative *********/ /* * Gpio = new GpioController(PinNumberingScheme.Logical); * _spiSettings = new SpiConnectionSettings(0, 0) * { * ClockFrequency = _specification.Channel0Frequency, * Mode = SpiMode.Mode0, * DataBitLength = 8 * }; */ }
public Connections(IHardwareSpecification specification) { _specification = specification; }
public Epaper213v2(int screenWidth, int screenHeight, IHardwareSpecification specification = null) : base(screenWidth, screenHeight, specification) { }