mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
Further improvements around acronym lowercases,...
This commit is contained in:
@@ -64,7 +64,7 @@ pub(crate) enum Command {
|
||||
DisplayRefresh = 0x12,
|
||||
|
||||
/// Image Process Command
|
||||
ImageProcessCommand = 0x13,
|
||||
ImageProcess = 0x13,
|
||||
|
||||
/// This command builds the VCOM Look-Up Table (LUTC).
|
||||
LutForVcom = 0x20,
|
||||
@@ -91,7 +91,7 @@ pub(crate) enum Command {
|
||||
PllControl = 0x30,
|
||||
|
||||
/// This command reads the temperature sensed by the temperature sensor.
|
||||
TemperatureSensorCommand = 0x40,
|
||||
TemperatureSensor = 0x40,
|
||||
/// This command selects the Internal or External temperature sensor.
|
||||
TemperatureCalibration = 0x41,
|
||||
/// This command could write data to the external temperature sensor.
|
||||
@@ -115,7 +115,7 @@ pub(crate) enum Command {
|
||||
//SpiFlashControl = 0x65,
|
||||
|
||||
/// The LUT_REV / Chip Revision is read from OTP address = 25001 and 25000.
|
||||
//REVISION = 0x70,
|
||||
//Revision = 0x70,
|
||||
/// This command reads the IC status.
|
||||
GetStatus = 0x71,
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ use embedded_hal::{
|
||||
|
||||
use crate::color::OctColor;
|
||||
use crate::interface::DisplayInterface;
|
||||
use crate::traits::{InternalWiAdditions, RefreshLUT, WaveshareDisplay};
|
||||
use crate::traits::{InternalWiAdditions, RefreshLut, WaveshareDisplay};
|
||||
|
||||
pub(crate) mod command;
|
||||
use self::command::Command;
|
||||
@@ -31,9 +31,9 @@ pub const HEIGHT: u32 = 448;
|
||||
pub const DEFAULT_BACKGROUND_COLOR: OctColor = OctColor::White;
|
||||
const IS_BUSY_LOW: bool = true;
|
||||
|
||||
/// EPD5in65f driver
|
||||
/// Epd5in65f driver
|
||||
///
|
||||
pub struct EPD5in65f<SPI, CS, BUSY, DC, RST> {
|
||||
pub struct Epd5in65f<SPI, CS, BUSY, DC, RST> {
|
||||
/// Connection Interface
|
||||
interface: DisplayInterface<SPI, CS, BUSY, DC, RST>,
|
||||
/// Background Color
|
||||
@@ -41,7 +41,7 @@ pub struct EPD5in65f<SPI, CS, BUSY, DC, RST> {
|
||||
}
|
||||
|
||||
impl<SPI, CS, BUSY, DC, RST> InternalWiAdditions<SPI, CS, BUSY, DC, RST>
|
||||
for EPD5in65f<SPI, CS, BUSY, DC, RST>
|
||||
for Epd5in65f<SPI, CS, BUSY, DC, RST>
|
||||
where
|
||||
SPI: Write<u8>,
|
||||
CS: OutputPin,
|
||||
@@ -62,7 +62,7 @@ where
|
||||
self.cmd_with_data(spi, Command::PowerOffSequenceSetting, &[0x00])?;
|
||||
self.cmd_with_data(spi, Command::BoosterSoftStart, &[0xC7, 0xC7, 0x1D])?;
|
||||
self.cmd_with_data(spi, Command::PllControl, &[0x3C])?;
|
||||
self.cmd_with_data(spi, Command::TemperatureSensorCommand, &[0x00])?;
|
||||
self.cmd_with_data(spi, Command::TemperatureSensor, &[0x00])?;
|
||||
self.cmd_with_data(spi, Command::VcomAndDataIntervalSetting, &[0x37])?;
|
||||
self.cmd_with_data(spi, Command::TconSetting, &[0x22])?;
|
||||
self.send_resolution(spi)?;
|
||||
@@ -77,7 +77,7 @@ where
|
||||
}
|
||||
|
||||
impl<SPI, CS, BUSY, DC, RST> WaveshareDisplay<SPI, CS, BUSY, DC, RST>
|
||||
for EPD5in65f<SPI, CS, BUSY, DC, RST>
|
||||
for Epd5in65f<SPI, CS, BUSY, DC, RST>
|
||||
where
|
||||
SPI: Write<u8>,
|
||||
CS: OutputPin,
|
||||
@@ -97,7 +97,7 @@ where
|
||||
let interface = DisplayInterface::new(cs, busy, dc, rst);
|
||||
let color = DEFAULT_BACKGROUND_COLOR;
|
||||
|
||||
let mut epd = EPD5in65f { interface, color };
|
||||
let mut epd = Epd5in65f { interface, color };
|
||||
|
||||
epd.init(spi, delay)?;
|
||||
|
||||
@@ -182,7 +182,7 @@ where
|
||||
fn set_lut(
|
||||
&mut self,
|
||||
_spi: &mut SPI,
|
||||
_refresh_rate: Option<RefreshLUT>,
|
||||
_refresh_rate: Option<RefreshLut>,
|
||||
) -> Result<(), SPI::Error> {
|
||||
unimplemented!();
|
||||
}
|
||||
@@ -192,7 +192,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<SPI, CS, BUSY, DC, RST> EPD5in65f<SPI, CS, BUSY, DC, RST>
|
||||
impl<SPI, CS, BUSY, DC, RST> Epd5in65f<SPI, CS, BUSY, DC, RST>
|
||||
where
|
||||
SPI: Write<u8>,
|
||||
CS: OutputPin,
|
||||
|
||||
Reference in New Issue
Block a user