public async Task SleepAsync() { _epd.SendCommand((byte)SpiCommand.VCOM_AND_DATA_INTERVAL_SETTING); _epd.SendData(0x17); //border floating _epd.SendCommand((byte)SpiCommand.VCM_DC_SETTING); //VCOM to 0V _epd.SendCommand((byte)SpiCommand.PANEL_SETTING); await Task.Delay(100); _epd.SendCommand((byte)SpiCommand.POWER_SETTING); //VG&VS to 0V fast _epd.SendData(0x00); _epd.SendData(0x00); _epd.SendData(0x00); _epd.SendData(0x00); _epd.SendData(0x00); await Task.Delay(100); _epd.SendCommand((byte)SpiCommand.POWER_OFF); //power off while (_epd.Busy) { await Task.Delay(100); } _epd.SendCommand((byte)SpiCommand.DEEP_SLEEP); //deep sleep _epd.SendData(0xA5); }
public async Task DisplayFrameAsync() { _epd.SendCommand((byte)SpiCommand.DISPLAY_UPDATE_CONTROL_2); _epd.SendData(0xC4); _epd.SendCommand((byte)SpiCommand.MASTER_ACTIVATION); _epd.SendCommand((byte)SpiCommand.TERMINATE_FRAME_READ_WRITE); while (_epd.Busy) { await Task.Delay(100); } }