Renamed folder `interface` to `traits`
parent
7612aad99a
commit
6efa864014
|
|
@ -33,9 +33,9 @@ use type_a::{command::Command, LUT_FULL_UPDATE, LUT_PARTIAL_UPDATE};
|
||||||
|
|
||||||
use color::Color;
|
use color::Color;
|
||||||
|
|
||||||
use interface::{WaveshareInterface};
|
use traits::{WaveshareInterface};
|
||||||
|
|
||||||
use interface::connection_interface::ConnectionInterface;
|
use traits::connection_interface::ConnectionInterface;
|
||||||
|
|
||||||
/// EPD1in54 driver
|
/// EPD1in54 driver
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,9 @@ use type_a::{command::Command, LUT_FULL_UPDATE, LUT_PARTIAL_UPDATE};
|
||||||
|
|
||||||
use color::Color;
|
use color::Color;
|
||||||
|
|
||||||
use interface::*;
|
use traits::*;
|
||||||
|
|
||||||
use interface::connection_interface::ConnectionInterface;
|
use traits::connection_interface::ConnectionInterface;
|
||||||
|
|
||||||
/// EPD2in9 driver
|
/// EPD2in9 driver
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
//! SPI Commands for the Waveshare 4.2" E-Ink Display
|
//! SPI Commands for the Waveshare 4.2" E-Ink Display
|
||||||
use interface;
|
use traits;
|
||||||
/// EPD4IN2 commands
|
/// EPD4IN2 commands
|
||||||
///
|
///
|
||||||
/// Should rarely (never?) be needed directly.
|
/// Should rarely (never?) be needed directly.
|
||||||
|
|
@ -155,7 +155,7 @@ pub(crate) enum Command {
|
||||||
POWER_SAVING = 0xE3,
|
POWER_SAVING = 0xE3,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl interface::Command for Command {
|
impl traits::Command for Command {
|
||||||
/// Returns the address of the command
|
/// Returns the address of the command
|
||||||
fn address(self) -> u8 {
|
fn address(self) -> u8 {
|
||||||
self as u8
|
self as u8
|
||||||
|
|
@ -165,7 +165,7 @@ impl interface::Command for Command {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use interface::Command as CommandTrait;
|
use traits::Command as CommandTrait;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn command_addr() {
|
fn command_addr() {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ use hal::{
|
||||||
digital::*,
|
digital::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
use interface::{connection_interface::ConnectionInterface, WaveshareInterface, InternalWiAdditions};
|
use traits::{connection_interface::ConnectionInterface, WaveshareInterface, InternalWiAdditions};
|
||||||
|
|
||||||
//The Lookup Tables for the Display
|
//The Lookup Tables for the Display
|
||||||
mod constants;
|
mod constants;
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,8 @@ use hal::spi::{Mode, Phase, Polarity};
|
||||||
#[cfg(feature = "graphics")]
|
#[cfg(feature = "graphics")]
|
||||||
pub mod drawing;
|
pub mod drawing;
|
||||||
|
|
||||||
mod interface;
|
mod traits;
|
||||||
pub use interface::{WaveshareInterface};
|
pub use traits::{WaveshareInterface};
|
||||||
|
|
||||||
pub mod color;
|
pub mod color;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ use hal::{
|
||||||
digital::*,
|
digital::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
use interface::Command;
|
use traits::Command;
|
||||||
|
|
||||||
/// The Connection Interface of all (?) Waveshare EPD-Devices
|
/// The Connection Interface of all (?) Waveshare EPD-Devices
|
||||||
///
|
///
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
//! SPI Commands for the Waveshare 2.9" and 1.54" E-Ink Display
|
//! SPI Commands for the Waveshare 2.9" and 1.54" E-Ink Display
|
||||||
|
|
||||||
use interface;
|
use traits;
|
||||||
|
|
||||||
/// EPD1in54 and EPD2IN9 commands
|
/// EPD1in54 and EPD2IN9 commands
|
||||||
///
|
///
|
||||||
|
|
@ -71,7 +71,7 @@ pub(crate) enum Command {
|
||||||
NOP = 0xFF,
|
NOP = 0xFF,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl interface::Command for Command {
|
impl traits::Command for Command {
|
||||||
/// Returns the address of the command
|
/// Returns the address of the command
|
||||||
fn address(self) -> u8 {
|
fn address(self) -> u8 {
|
||||||
self as u8
|
self as u8
|
||||||
|
|
@ -81,7 +81,7 @@ impl interface::Command for Command {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::Command;
|
use super::Command;
|
||||||
use interface::Command as CommandTrait;
|
use traits::Command as CommandTrait;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn command_addr() {
|
fn command_addr() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue