2021-05-29 18:03:36 +00:00
|
|
|
use embedded_graphics::pixelcolor::Rgb565;
|
|
|
|
use embedded_graphics::prelude::*;
|
|
|
|
use embedded_graphics_simulator::{OutputSettingsBuilder, SimulatorDisplay, Window};
|
|
|
|
use lvgl;
|
2021-05-30 22:34:12 +00:00
|
|
|
use lvgl::display::Display;
|
2021-05-29 18:03:36 +00:00
|
|
|
|
|
|
|
type ColorSpace = Rgb565;
|
|
|
|
|
|
|
|
fn main() {
|
2021-05-29 22:51:25 +00:00
|
|
|
let embedded_graphics_display: SimulatorDisplay<ColorSpace> = SimulatorDisplay::new(Size::new(
|
|
|
|
lvgl_sys::LV_HOR_RES_MAX,
|
|
|
|
lvgl_sys::LV_VER_RES_MAX,
|
|
|
|
));
|
2021-05-29 18:03:36 +00:00
|
|
|
|
|
|
|
let output_settings = OutputSettingsBuilder::new().scale(2).build();
|
|
|
|
let mut window = Window::new("App Example", &output_settings);
|
|
|
|
|
|
|
|
// LVGL usage
|
|
|
|
lvgl::init();
|
2021-05-30 22:34:12 +00:00
|
|
|
Display::register(embedded_graphics_display).unwrap();
|
2021-05-29 18:03:36 +00:00
|
|
|
}
|