pub struct Madctl { /* private fields */ }
Expand description
Defines the orientation parameters of the screen.
§Example
let mut mctl = Madctl::default();
mctl.set_row_address_order(RowOrder::TopToBottom)
.set_column_address_order(ColumnOrder::LeftToRight)
.set_row_column_swap(RowColumnSwap::Swapped)
.set_vertical_refresh_order(RowOrder::BottomToTop)
.set_horizontal_refresh_order(ColumnOrder::RightToLeft)
.set_rgb_order(ColorComponentOrder::BlueGreenRed);
assert_eq!(mctl.row_address_order(), RowOrder::TopToBottom);
assert_eq!(mctl.row_column_swap(), RowColumnSwap::Swapped);
// Can invoke `Commands::madctl(mctl)` to send it to the LCD.
Implementations§
Source§impl Madctl
impl Madctl
pub fn row_address_order(&self) -> RowOrder
pub fn set_row_address_order(&mut self, value: RowOrder) -> &mut Self
pub fn column_address_order(&self) -> ColumnOrder
pub fn set_column_address_order(&mut self, value: ColumnOrder) -> &mut Self
pub fn row_column_swap(&self) -> RowColumnSwap
pub fn set_row_column_swap(&mut self, value: RowColumnSwap) -> &mut Self
pub fn vertical_refresh_order(&self) -> RowOrder
pub fn set_vertical_refresh_order(&mut self, value: RowOrder) -> &mut Self
pub fn horizontal_refresh_order(&self) -> ColumnOrder
pub fn set_horizontal_refresh_order(&mut self, value: ColumnOrder) -> &mut Self
pub fn rgb_order(&self) -> ColorComponentOrder
pub fn set_rgb_order(&mut self, value: ColorComponentOrder) -> &mut Self
Trait Implementations§
impl Copy for Madctl
Auto Trait Implementations§
impl Freeze for Madctl
impl RefUnwindSafe for Madctl
impl Send for Madctl
impl Sync for Madctl
impl Unpin for Madctl
impl UnwindSafe for Madctl
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