mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
Fix clippy lints
This commit is contained in:
@@ -4,6 +4,7 @@ pub const WIDTH: u32 = 400;
|
||||
pub const HEIGHT: u32 = 300;
|
||||
pub const DEFAULT_BACKGROUND_COLOR: Color = Color::White;
|
||||
|
||||
|
||||
pub(crate) const LUT_VCOM0: [u8; 44] = [
|
||||
0x00, 0x17, 0x00, 0x00, 0x00, 0x02,
|
||||
0x00, 0x17, 0x17, 0x00, 0x00, 0x02,
|
||||
@@ -14,6 +15,7 @@ pub(crate) const LUT_VCOM0: [u8; 44] = [
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[cfg(feature = "epd4in2_fast_update")]
|
||||
pub(crate) const LUT_VCOM0_QUICK: [u8; 44] = [
|
||||
0x00, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||
@@ -36,6 +38,7 @@ pub(crate) const LUT_WW: [u8; 42] =[
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[cfg(feature = "epd4in2_fast_update")]
|
||||
pub(crate) const LUT_WW_QUICK: [u8; 42] =[
|
||||
0xA0, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||
@@ -58,6 +61,7 @@ pub(crate) const LUT_BW: [u8; 42] =[
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[cfg(feature = "epd4in2_fast_update")]
|
||||
pub(crate) const LUT_BW_QUICK: [u8; 42] =[
|
||||
0xA0, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||
@@ -80,6 +84,7 @@ pub(crate) const LUT_BB: [u8; 42] =[
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[cfg(feature = "epd4in2_fast_update")]
|
||||
pub(crate) const LUT_BB_QUICK: [u8; 42] =[
|
||||
0x50, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||
@@ -102,6 +107,7 @@ pub(crate) const LUT_WB: [u8; 42] =[
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[cfg(feature = "epd4in2_fast_update")]
|
||||
pub(crate) const LUT_WB_QUICK: [u8; 42] =[
|
||||
0x50, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||
|
||||
+7
-7
@@ -323,18 +323,18 @@ where
|
||||
self.send_data(spi, &[h as u8])
|
||||
}
|
||||
|
||||
/// Fill the look-up table for the EPD
|
||||
//TODO: make public?
|
||||
fn set_lut(&mut self, spi: &mut SPI) -> Result<(), SPI::Error> {
|
||||
/// Fill the look-up table for the EPD for a full refresh (slower)
|
||||
pub fn set_lut(&mut self, spi: &mut SPI) -> Result<(), SPI::Error> {
|
||||
self.set_lut_helper(spi, &LUT_VCOM0, &LUT_WW, &LUT_BW, &LUT_WB, &LUT_BB)
|
||||
}
|
||||
|
||||
/// Fill the look-up table for a quick display (partial refresh)
|
||||
/// Fill the look-up table for a quick refresh (partial refresh)
|
||||
///
|
||||
/// Is automatically done by [EPD4in2::display_frame_quick()](EPD4in2::display_frame_quick())
|
||||
/// //TODO: make public?
|
||||
/// WARNING: Might lead to ghosting-effects
|
||||
#[allow(dead_code)]
|
||||
#[deprecated(note = "Might lead to ghosting-effects/problems with your display. Use set_lut instead!")]
|
||||
#[cfg(feature = "epd4in2_fast_update")]
|
||||
fn set_lut_quick(&mut self, spi: &mut SPI) -> Result<(), SPI::Error> {
|
||||
pub fn set_lut_quick(&mut self, spi: &mut SPI) -> Result<(), SPI::Error> {
|
||||
self.set_lut_helper(
|
||||
spi,
|
||||
&LUT_VCOM0_QUICK,
|
||||
|
||||
Reference in New Issue
Block a user