//######################################################################################## #region Private Methods /// <summary> /// Create a instance of a internal E-Paper Display /// </summary> /// <param name="displayType"></param> /// <returns></returns> internal static IEPaperDisplayInternal CreateEPaperDisplay(EPaperDisplayType displayType) { IEPaperDisplayInternal display; switch (displayType) { case EPaperDisplayType.WaveShare7In5Bc: display = new Epd7In5Bc(); break; case EPaperDisplayType.WaveShare7In5_V2: display = new Epd7In5_V2(); break; case EPaperDisplayType.WaveShare7In5b_V2: display = new Epd7In5b_V2(); break; case EPaperDisplayType.WaveShare5In65f: display = new Epd5in65f(); break; default: display = null; break; } display?.Initialize(EPaperDisplayHardware.Value); return(display); }
public void SleepTest() { using var result = new Epd5in65f(); result.Initialize(m_EPaperDisplayHardwareMock.Object); m_DataBuffer.Clear(); result.Sleep(); var validBuffer = new List <byte> { (byte)Epd5in65fCommands.PowerOff, (byte)Epd5in65fCommands.GetStatus, (byte)Epd5in65fCommands.DeepSleep, 0xA5 }; Assert.IsTrue(m_DataBuffer.SequenceEqual(validBuffer), "Command Data Sequence is wrong"); }
public void DisposeNoHardwareTest() { using var result = new Epd5in65f(); result.Initialize(m_EPaperDisplayHardwareMock.Object); }
public void ConstructorTest() { using var result = new Epd5in65f(); result.Initialize(m_EPaperDisplayHardwareMock.Object); }