Add rustfmt::skip to constants and graphics::rotation
parent
b505440c09
commit
2796d875f5
|
|
@ -4,6 +4,7 @@ pub const WIDTH: u32 = 400;
|
|||
pub const HEIGHT: u32 = 300;
|
||||
pub const DEFAULT_BACKGROUND_COLOR: Color = Color::White;
|
||||
|
||||
#[rustfmt::skip]
|
||||
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,
|
||||
];
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub(crate) const LUT_VCOM0_QUICK: [u8; 44] = [
|
||||
0x00, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
|
@ -24,7 +26,7 @@ pub(crate) const LUT_VCOM0_QUICK: [u8; 44] = [
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub(crate) const LUT_WW: [u8; 42] =[
|
||||
0x40, 0x17, 0x00, 0x00, 0x00, 0x02,
|
||||
0x90, 0x17, 0x17, 0x00, 0x00, 0x02,
|
||||
|
|
@ -35,7 +37,7 @@ pub(crate) const LUT_WW: [u8; 42] =[
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub(crate) const LUT_WW_QUICK: [u8; 42] =[
|
||||
0xA0, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
|
@ -46,7 +48,7 @@ pub(crate) const LUT_WW_QUICK: [u8; 42] =[
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub(crate) const LUT_BW: [u8; 42] =[
|
||||
0x40, 0x17, 0x00, 0x00, 0x00, 0x02,
|
||||
0x90, 0x17, 0x17, 0x00, 0x00, 0x02,
|
||||
|
|
@ -57,7 +59,7 @@ pub(crate) const LUT_BW: [u8; 42] =[
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub(crate) const LUT_BW_QUICK: [u8; 42] =[
|
||||
0xA0, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
|
@ -68,7 +70,7 @@ pub(crate) const LUT_BW_QUICK: [u8; 42] =[
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub(crate) const LUT_BB: [u8; 42] =[
|
||||
0x80, 0x17, 0x00, 0x00, 0x00, 0x02,
|
||||
0x90, 0x17, 0x17, 0x00, 0x00, 0x02,
|
||||
|
|
@ -79,7 +81,7 @@ pub(crate) const LUT_BB: [u8; 42] =[
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub(crate) const LUT_BB_QUICK: [u8; 42] =[
|
||||
0x50, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
|
@ -90,7 +92,7 @@ pub(crate) const LUT_BB_QUICK: [u8; 42] =[
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub(crate) const LUT_WB: [u8; 42] =[
|
||||
0x80, 0x17, 0x00, 0x00, 0x00, 0x02,
|
||||
0x90, 0x17, 0x17, 0x00, 0x00, 0x02,
|
||||
|
|
@ -101,7 +103,7 @@ pub(crate) const LUT_WB: [u8; 42] =[
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub(crate) const LUT_WB_QUICK: [u8; 42] =[
|
||||
0x50, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
|
|
|||
|
|
@ -103,6 +103,8 @@ fn outside_display(x: u32, y: u32, width: u32, height: u32, rotation: DisplayRot
|
|||
false
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
//returns index position in the u8-slice and the bit-position inside that u8
|
||||
fn rotation(x: u32, y: u32, width: u32, height: u32, rotation: DisplayRotation) -> (u32, u8) {
|
||||
match rotation {
|
||||
DisplayRotation::Rotate0 => (
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Original Waveforms from Waveshare
|
||||
#[rustfmt::skip]
|
||||
pub(crate) const LUT_FULL_UPDATE: [u8; 30] =[
|
||||
0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22,
|
||||
0x66, 0x69, 0x69, 0x59, 0x58, 0x99, 0x99, 0x88,
|
||||
|
|
@ -6,6 +7,7 @@ pub(crate) const LUT_FULL_UPDATE: [u8; 30] =[
|
|||
0x35, 0x51, 0x51, 0x19, 0x01, 0x00
|
||||
];
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub(crate) const LUT_PARTIAL_UPDATE: [u8; 30] =[
|
||||
0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
|
|
|||
Loading…
Reference in New Issue