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 commentsembedded-hal-1.0
parent
5c0744ff01
commit
47af2fc664
|
|
@ -25,6 +25,8 @@ graphics = ["embedded-graphics"]
|
||||||
epd1in54 = []
|
epd1in54 = []
|
||||||
epd2in9 = []
|
epd2in9 = []
|
||||||
epd4in2 = []
|
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]
|
[dependencies.embedded-graphics]
|
||||||
optional = true
|
optional = true
|
||||||
|
|
|
||||||
|
|
@ -325,6 +325,7 @@ where
|
||||||
Ok(())
|
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> {
|
fn set_lut_helper(&mut self, spi: &mut SPI, buffer: &[u8]) -> Result<(), SPI::Error> {
|
||||||
assert!(buffer.len() == 30);
|
assert!(buffer.len() == 30);
|
||||||
self.interface
|
self.interface
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ pub(crate) trait Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Seperates the different LUT for the Display Refresh process
|
/// Seperates the different LUT for the Display Refresh process
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
pub enum RefreshLUT {
|
pub enum RefreshLUT {
|
||||||
/// The "normal" full Lookuptable for the Refresh-Sequence
|
/// The "normal" full Lookuptable for the Refresh-Sequence
|
||||||
FULL,
|
FULL,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
// Original Waveforms from Waveshare
|
#[cfg(not(any(feature = "type_a_alternative_faster_lut")))]
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
|
// Original Waveforms from Waveshare
|
||||||
pub(crate) const LUT_FULL_UPDATE: [u8; 30] =[
|
pub(crate) const LUT_FULL_UPDATE: [u8; 30] =[
|
||||||
0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22,
|
0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22,
|
||||||
0x66, 0x69, 0x69, 0x59, 0x58, 0x99, 0x99, 0x88,
|
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, 0x13, 0x14, 0x44, 0x12,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
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…
Reference in New Issue