Further improvements around acronym lowercases,...

This commit is contained in:
Caemor
2021-04-11 21:21:39 +02:00
parent 9d95eeb64b
commit 15e557951f
30 changed files with 200 additions and 200 deletions
+4 -4
View File
@@ -2,7 +2,7 @@
use crate::traits;
/// EPD7in5 commands
/// Epd7in5 commands
///
/// Should rarely (never?) be needed directly.
///
@@ -93,7 +93,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.
@@ -117,7 +117,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,
@@ -128,7 +128,7 @@ pub(crate) enum Command {
/// This command sets `VCOM_DC` value.
VcmDcSetting = 0x82,
/// This is in all the Waveshare controllers for EPD7in5, but it's not documented
/// This is in all the Waveshare controllers for Epd7in5, but it's not documented
/// anywhere in the datasheet `¯\_(ツ)_/¯`
FlashMode = 0xE5,
}
+9 -9
View File
@@ -13,7 +13,7 @@ use embedded_hal::{
use crate::color::Color;
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 = 384;
pub const DEFAULT_BACKGROUND_COLOR: Color = Color::White;
const IS_BUSY_LOW: bool = true;
/// EPD7in5 driver
/// Epd7in5 driver
///
pub struct EPD7in5<SPI, CS, BUSY, DC, RST> {
pub struct Epd7in5<SPI, CS, BUSY, DC, RST> {
/// Connection Interface
interface: DisplayInterface<SPI, CS, BUSY, DC, RST>,
/// Background Color
@@ -41,7 +41,7 @@ pub struct EPD7in5<SPI, CS, BUSY, DC, RST> {
}
impl<SPI, CS, BUSY, DC, RST> InternalWiAdditions<SPI, CS, BUSY, DC, RST>
for EPD7in5<SPI, CS, BUSY, DC, RST>
for Epd7in5<SPI, CS, BUSY, DC, RST>
where
SPI: Write<u8>,
CS: OutputPin,
@@ -91,7 +91,7 @@ where
// Set VCOM_DC to -1.5V
self.cmd_with_data(spi, Command::VcmDcSetting, &[0x1E])?;
// This is in all the Waveshare controllers for EPD7in5
// This is in all the Waveshare controllers for Epd7in5
self.cmd_with_data(spi, Command::FlashMode, &[0x03])?;
self.wait_until_idle();
@@ -100,7 +100,7 @@ where
}
impl<SPI, CS, BUSY, DC, RST> WaveshareDisplay<SPI, CS, BUSY, DC, RST>
for EPD7in5<SPI, CS, BUSY, DC, RST>
for Epd7in5<SPI, CS, BUSY, DC, RST>
where
SPI: Write<u8>,
CS: OutputPin,
@@ -120,7 +120,7 @@ where
let interface = DisplayInterface::new(cs, busy, dc, rst);
let color = DEFAULT_BACKGROUND_COLOR;
let mut epd = EPD7in5 { interface, color };
let mut epd = Epd7in5 { interface, color };
epd.init(spi, delay)?;
@@ -214,7 +214,7 @@ where
fn set_lut(
&mut self,
_spi: &mut SPI,
_refresh_rate: Option<RefreshLUT>,
_refresh_rate: Option<RefreshLut>,
) -> Result<(), SPI::Error> {
unimplemented!();
}
@@ -224,7 +224,7 @@ where
}
}
impl<SPI, CS, BUSY, DC, RST> EPD7in5<SPI, CS, BUSY, DC, RST>
impl<SPI, CS, BUSY, DC, RST> Epd7in5<SPI, CS, BUSY, DC, RST>
where
SPI: Write<u8>,
CS: OutputPin,