Skip to content

Commit

Permalink
Merge pull request #224 from caemor/version-fix
Browse files Browse the repository at this point in the history
Update real minimum required version to 1.62
  • Loading branch information
caemor authored Dec 5, 2024
2 parents 07d6810 + c6427c1 commit 2df6608
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ readme = "README.md"
repository = "https://github.com/Caemor/epd-waveshare.git"
version = "0.6.0"
edition = "2021"
rust-version = "1.62"

[dependencies]
embedded-graphics-core = { version = "0.4", optional = true }
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Display ones).

It uses the [embedded graphics](https://crates.io/crates/embedded-graphics) library for the optional graphics support.

A 2018-edition compatible version (Rust 1.31+) is needed.
A 2021-edition compatible version (Rust 1.62+) is needed.

Other similar libraries with support for much more displays are [u8g2](https://github.com/olikraus/u8g2)
and [GxEPD](https://github.com/ZinggJM/GxEPD) for arduino.
Expand Down Expand Up @@ -46,6 +46,7 @@ epd4in2.update_and_display_frame(&mut spi, display.buffer(), &mut delay).expect(
// Going to sleep
epd4in2.sleep(&mut spi, &mut delay)
```

> Check the complete example [here](./examples/epd4in2.rs).
## (Supported) Devices
Expand Down
1 change: 0 additions & 1 deletion src/epd2in13_v2/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ impl DriverOutput {
/// | | `------------- load temp
/// | `--------------- enable clock
/// `----------------- enable analog
pub(crate) struct DisplayUpdateControl2(pub u8);
#[allow(dead_code)]
impl DisplayUpdateControl2 {
Expand Down
8 changes: 4 additions & 4 deletions src/epd2in9d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@ where
RST: OutputPin,
DELAY: DelayNs,
{
/// Wake Up Screen
///
/// After the screen sleeps, it enters deep sleep mode. If you need to refresh the screen while in deep sleep mode, you must first execute awaken().
/// Wake the screen.
// /// Wake Up Screen
// ///
// /// After the screen sleeps, it enters deep sleep mode. If you need to refresh the screen while in deep sleep mode, you must first execute awaken().
// /// Wake the screen.
// fn awaken(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
// // reset the device
// self.interface.reset(delay, 20_000, 2_000);
Expand Down
4 changes: 2 additions & 2 deletions src/epd5in65f/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ pub(crate) enum Command {
/// This command defines alternative resolution and this setting is of higher priority
/// than the RES\[1:0\] in R00H (PSR).
TconResolution = 0x61,
/// This command defines MCU host direct access external memory mode.
// /// This command defines MCU host direct access external memory mode.
//SpiFlashControl = 0x65,

/// The LUT_REV / Chip Revision is read from OTP address = 25001 and 25000.
// /// The LUT_REV / Chip Revision is read from OTP address = 25001 and 25000.
//Revision = 0x70,
/// This command reads the IC status.
GetStatus = 0x71,
Expand Down
6 changes: 3 additions & 3 deletions src/graphics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ pub struct VarDisplay<'a, COLOR: ColorType + PixelColor> {
}

/// For use with embedded_grahics
impl<'a, COLOR: ColorType + PixelColor> DrawTarget for VarDisplay<'a, COLOR> {
impl<COLOR: ColorType + PixelColor> DrawTarget for VarDisplay<'_, COLOR> {
type Color = COLOR;
type Error = core::convert::Infallible;

Expand All @@ -208,7 +208,7 @@ impl<'a, COLOR: ColorType + PixelColor> DrawTarget for VarDisplay<'a, COLOR> {
}

/// For use with embedded_grahics
impl<'a, COLOR: ColorType + PixelColor> OriginDimensions for VarDisplay<'a, COLOR> {
impl<COLOR: ColorType + PixelColor> OriginDimensions for VarDisplay<'_, COLOR> {
fn size(&self) -> Size {
match self.rotation {
DisplayRotation::Rotate0 | DisplayRotation::Rotate180 => {
Expand Down Expand Up @@ -296,7 +296,7 @@ impl<'a, COLOR: ColorType + PixelColor> VarDisplay<'a, COLOR> {
}

/// Some Tricolor specifics
impl<'a> VarDisplay<'a, TriColor> {
impl VarDisplay<'_, TriColor> {
/// get black/white internal buffer to use it (to draw in epd)
pub fn bw_buffer(&self) -> &[u8] {
&self.buffer[..self.buffer_size() / 2]
Expand Down

0 comments on commit 2df6608

Please sign in to comment.