pub struct Display { /* private fields */ }Implementations§
Source§impl Display
impl Display
Sourcepub unsafe fn new(
device: &'static dyn DirectCharacterDevice,
buffer_size: usize,
double_buffered: bool,
) -> Result<Self>
pub unsafe fn new( device: &'static dyn DirectCharacterDevice, buffer_size: usize, double_buffered: bool, ) -> Result<Self>
Create a display and attach its drawing buffers.
§Safety
LVGL must be initialized. Hold the graphics lock during creation and while dropping the display. Drop it before LVGL deinitializes.
Sourcepub fn get_brightness(&self) -> Result<u8>
pub fn get_brightness(&self) -> Result<u8>
Read the screen’s backlight brightness, from
BRIGHTNESS_OFF to
BRIGHTNESS_FULL.
Returns Error::Unsupported when the screen has no brightness
control. This only talks to the screen device, not to LVGL, so it does
not need the LVGL lock.
Sourcepub fn set_brightness(&self, level: u8) -> Result<()>
pub fn set_brightness(&self, level: u8) -> Result<()>
Set the screen’s backlight brightness; see Display::get_brightness.
pub fn get_lvgl_display(&self) -> *mut lv_display_t
Sourcepub unsafe fn get_object(&self) -> *mut lv_obj_t
pub unsafe fn get_object(&self) -> *mut lv_obj_t
Sourcepub unsafe fn get_resolution(&self) -> Point
pub unsafe fn get_resolution(&self) -> Point
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Display
impl !RefUnwindSafe for Display
impl Unpin for Display
impl UnsafeUnpin for Display
impl !UnwindSafe for Display
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