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.
///
@@ -94,7 +94,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.
@@ -118,7 +118,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 {
ReadVcomValue = 0x81,
/// 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,
}
+8 -8
View File
@@ -17,7 +17,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;
@@ -35,9 +35,9 @@ pub const HEIGHT: u32 = 480;
pub const DEFAULT_BACKGROUND_COLOR: Color = Color::White;
const IS_BUSY_LOW: bool = true;
/// EPD7in5 (V2) driver
/// Epd7in5 (V2) 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
@@ -45,7 +45,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,
@@ -82,7 +82,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,
@@ -102,7 +102,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)?;
@@ -188,7 +188,7 @@ where
fn set_lut(
&mut self,
_spi: &mut SPI,
_refresh_rate: Option<RefreshLUT>,
_refresh_rate: Option<RefreshLut>,
) -> Result<(), SPI::Error> {
unimplemented!();
}
@@ -198,7 +198,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,