Remove dependency on heapless

This commit is contained in:
Rafael Caricio 2021-06-06 17:35:48 +02:00
parent f9ef4badb8
commit f3032c7d17
Signed by: rafaelcaricio
GPG key ID: 3C86DBCE8E93C947
2 changed files with 3 additions and 4 deletions

View file

@ -14,11 +14,10 @@ build = "build.rs"
[dependencies]
lvgl-sys = { version = "0.5.2", path = "../lvgl-sys" }
cty = "0.2.1"
embedded-graphics = { version = "0.6.2", optional = true }
cstr_core = "0.2.3"
bitflags = "1.2.1"
parking_lot = "0.11.1"
heapless = "0.7.1"
embedded-graphics = { version = "0.6.2", optional = true }
[features]
default = []

View file

@ -64,14 +64,14 @@ impl DefaultDisplay {
pub struct DrawBuffer<const N: usize> {
initialized: RunOnce,
refresh_buffer: Mutex<RefCell<heapless::Vec<lvgl_sys::lv_color_t, N>>>,
refresh_buffer: Mutex<RefCell<[MaybeUninit<lvgl_sys::lv_color_t>; N]>>,
}
impl<const N: usize> DrawBuffer<N> {
pub const fn new() -> Self {
Self {
initialized: RunOnce::new(),
refresh_buffer: const_mutex(RefCell::new(heapless::Vec::new())),
refresh_buffer: const_mutex(RefCell::new([MaybeUninit::uninit(); N])),
}
}