Merge branch 'master' of github.com:Caemor/eink-waveshare-rs into better_readme
commit
1495309352
|
|
@ -3,6 +3,12 @@ name = "eink_waveshare_rs"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Christoph Groß <christoph.gross@student.uni-tuebingen.de>"]
|
authors = ["Christoph Groß <christoph.gross@student.uni-tuebingen.de>"]
|
||||||
|
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = []
|
||||||
|
# Activates the fast LUT for EPD4in2
|
||||||
|
epd4in2_fast_update = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ pub(crate) const LUT_VCOM0: [u8; 44] = [
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
#[cfg(feature = "epd4in2_fast_update")]
|
||||||
pub(crate) const LUT_VCOM0_QUICK: [u8; 44] = [
|
pub(crate) const LUT_VCOM0_QUICK: [u8; 44] = [
|
||||||
0x00, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
0x00, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
|
@ -33,7 +33,7 @@ pub(crate) const LUT_WW: [u8; 42] =[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
#[cfg(feature = "epd4in2_fast_update")]
|
||||||
pub(crate) const LUT_WW_QUICK: [u8; 42] =[
|
pub(crate) const LUT_WW_QUICK: [u8; 42] =[
|
||||||
0xA0, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
0xA0, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
|
@ -55,7 +55,7 @@ pub(crate) const LUT_BW: [u8; 42] =[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
#[cfg(feature = "epd4in2_fast_update")]
|
||||||
pub(crate) const LUT_BW_QUICK: [u8; 42] =[
|
pub(crate) const LUT_BW_QUICK: [u8; 42] =[
|
||||||
0xA0, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
0xA0, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
|
@ -77,7 +77,7 @@ pub(crate) const LUT_BB: [u8; 42] =[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
#[cfg(feature = "epd4in2_fast_update")]
|
||||||
pub(crate) const LUT_BB_QUICK: [u8; 42] =[
|
pub(crate) const LUT_BB_QUICK: [u8; 42] =[
|
||||||
0x50, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
0x50, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
|
@ -99,7 +99,7 @@ pub(crate) const LUT_WB: [u8; 42] =[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
#[cfg(feature = "epd4in2_fast_update")]
|
||||||
pub(crate) const LUT_WB_QUICK: [u8; 42] =[
|
pub(crate) const LUT_WB_QUICK: [u8; 42] =[
|
||||||
0x50, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
0x50, 0x0E, 0x00, 0x00, 0x00, 0x01,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,7 @@
|
||||||
//!
|
//!
|
||||||
//!
|
//!
|
||||||
//!
|
//!
|
||||||
//! BE CAREFUL! The Partial Drawing can "destroy" your display.
|
//! BE CAREFUL! The screen can get ghosting/burn-ins through the Partial Fast Update Drawing.
|
||||||
//! It needs more testing first.
|
|
||||||
|
|
||||||
use hal::{
|
use hal::{
|
||||||
blocking::{delay::*, spi::Write},
|
blocking::{delay::*, spi::Write},
|
||||||
|
|
@ -222,7 +221,6 @@ where
|
||||||
|
|
||||||
self.send_command(Command::VCOM_AND_DATA_INTERVAL_SETTING)?;
|
self.send_command(Command::VCOM_AND_DATA_INTERVAL_SETTING)?;
|
||||||
//TODO: this was a send_command instead of a send_data. check if it's alright and doing what it should do (setting the default values)
|
//TODO: this was a send_command instead of a send_data. check if it's alright and doing what it should do (setting the default values)
|
||||||
//oldTODO is this really a command here or shouldn't that be data?
|
|
||||||
//self.send_command_u8(0x97)?; //VBDF 17|D7 VBDW 97 VBDB 57 VBDF F7 VBDW 77 VBDB 37 VBDR B7
|
//self.send_command_u8(0x97)?; //VBDF 17|D7 VBDW 97 VBDB 57 VBDF F7 VBDW 77 VBDB 37 VBDR B7
|
||||||
self.send_data(0x97)?;
|
self.send_data(0x97)?;
|
||||||
|
|
||||||
|
|
@ -375,6 +373,7 @@ where
|
||||||
///
|
///
|
||||||
/// Is automatically done by [EPD4in2::display_frame_quick()](EPD4in2::display_frame_quick())
|
/// Is automatically done by [EPD4in2::display_frame_quick()](EPD4in2::display_frame_quick())
|
||||||
/// //TODO: make public?
|
/// //TODO: make public?
|
||||||
|
#[cfg(feature = "epd4in2_fast_update")]
|
||||||
fn set_lut_quick(&mut self) -> Result<(), E> {
|
fn set_lut_quick(&mut self) -> Result<(), E> {
|
||||||
self.set_lut_helper(
|
self.set_lut_helper(
|
||||||
&LUT_VCOM0_QUICK,
|
&LUT_VCOM0_QUICK,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue