pub struct LcdData {
pub configuration: u8,
pub rows: u8,
pub columns: u8,
pub row_refresh_flags: u8,
pub line1: [u8; 20],
pub line2: [u8; 20],
pub line3: [u8; 20],
pub line4: [u8; 20],
pub custom_characters: [[u8; 8]; 8],
}Expand description
LCD display data structure
Fields§
§configuration: u8§rows: u8§columns: u8§row_refresh_flags: u8§line1: [u8; 20]§line2: [u8; 20]§line3: [u8; 20]§line4: [u8; 20]§custom_characters: [[u8; 8]; 8]Implementations§
Source§impl LcdData
impl LcdData
pub fn new() -> Self
pub fn is_enabled(&self) -> bool
pub fn get_line(&self, line: usize) -> Option<&[u8; 20]>
pub fn get_line_mut(&mut self, line: usize) -> Option<&mut [u8; 20]>
pub fn set_line_text(&mut self, line: usize, text: &str) -> Result<()>
pub fn get_line_text(&self, line: usize) -> Result<String>
pub fn clear_line(&mut self, line: usize) -> Result<()>
pub fn clear_all(&mut self)
pub fn set_custom_character( &mut self, char_index: usize, pattern: &[u8; 8], ) -> Result<()>
pub fn get_custom_character(&self, char_index: usize) -> Result<[u8; 8]>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LcdData
impl<'de> Deserialize<'de> for LcdData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LcdData
impl RefUnwindSafe for LcdData
impl Send for LcdData
impl Sync for LcdData
impl Unpin for LcdData
impl UnsafeUnpin for LcdData
impl UnwindSafe for LcdData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more