Move mod graphics to top and delete extern crate

This commit is contained in:
Grant Miller 2021-05-10 18:07:30 -05:00
parent c93637abfd
commit 47d4a07469

View file

@ -1,8 +1,5 @@
#![no_std] #![no_std]
#[cfg(feature = "graphics")]
extern crate embedded_graphics;
use embedded_hal::blocking::delay::DelayMs; use embedded_hal::blocking::delay::DelayMs;
use embedded_hal::digital::v2::OutputPin; use embedded_hal::digital::v2::OutputPin;
@ -10,6 +7,9 @@ use core::iter::once;
use display_interface::DataFormat::{U16BEIter, U8Iter}; use display_interface::DataFormat::{U16BEIter, U8Iter};
use display_interface::WriteOnlyDataCommand; use display_interface::WriteOnlyDataCommand;
#[cfg(feature = "graphics")]
mod graphics;
pub use embedded_hal::spi::MODE_0 as SPI_MODE; pub use embedded_hal::spi::MODE_0 as SPI_MODE;
pub use display_interface::DisplayError; pub use display_interface::DisplayError;
@ -307,9 +307,6 @@ impl Scroller {
} }
} }
#[cfg(feature = "graphics")]
mod graphics;
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
enum Command { enum Command {
SoftwareReset = 0x01, SoftwareReset = 0x01,