Make a few small updates to support TeXitoi rusty clock (#27)

- add a feature gated alternative full lut for type_a displays
- remove pub from set_lut_helper function
- fix behaviour of set_lut for epd2in9. it always sets the LUT now!
-  better comments
digi-v2-tests
Chris 4 years ago committed by GitHub
parent 5c0744ff01
commit 47af2fc664
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -25,6 +25,8 @@ graphics = ["embedded-graphics"]
epd1in54 = []
epd2in9 = []
epd4in2 = []
# offers an alternative fast full lut for type_a displays, but the refresh isnt as clean looking
type_a_alternative_faster_lut = []
[dependencies.embedded-graphics]
optional = true

@ -325,6 +325,7 @@ where
Ok(())
}
/// Set your own LUT, this function is also used internally for set_lut
fn set_lut_helper(&mut self, spi: &mut SPI, buffer: &[u8]) -> Result<(), SPI::Error> {
assert!(buffer.len() == 30);
self.interface

@ -12,6 +12,7 @@ pub(crate) trait Command {
}
/// Seperates the different LUT for the Display Refresh process
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum RefreshLUT {
/// The "normal" full Lookuptable for the Refresh-Sequence
FULL,

@ -1,5 +1,6 @@
// Original Waveforms from Waveshare
#[cfg(not(any(feature = "type_a_alternative_faster_lut")))]
#[rustfmt::skip]
// Original Waveforms from Waveshare
pub(crate) const LUT_FULL_UPDATE: [u8; 30] =[
0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22,
0x66, 0x69, 0x69, 0x59, 0x58, 0x99, 0x99, 0x88,
@ -14,3 +15,11 @@ pub(crate) const LUT_PARTIAL_UPDATE: [u8; 30] =[
0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
];
#[cfg(feature = "type_a_alternative_faster_lut")]
#[rustfmt::skip]
// Waveform from TeXiToi/il3820
pub(crate) const LUT_FULL_UPDATE: [u8; 30] =[
0x50, 0xAA, 0x55, 0xAA, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
];

Loading…
Cancel
Save