#![no_std]
pub mod prelude;
#[derive(Clone, Debug)]
pub enum DisplayError {
InvalidFormatError,
BusWriteError,
DCError,
CSError,
}
pub enum DataFormat<'a> {
U8(&'a [u8]),
U16(&'a [u16]),
}
impl<'a> From<&'a [u8]> for DataFormat<'a> {
fn from(arr_ref: &'a [u8]) -> Self {
Self::U8(arr_ref)
}
}
impl<'a> From<&'a [u16]> for DataFormat<'a> {
fn from(arr_ref: &'a [u16]) -> Self {
Self::U16(arr_ref)
}
}
pub trait WriteOnlyDataCommand {
fn send_commands(&mut self, cmd: DataFormat<'_>) -> Result<(), DisplayError>;
fn send_data(&mut self, buf: DataFormat<'_>) -> Result<(), DisplayError>;
}