Remove dependency on heapless
This commit is contained in:
parent
f9ef4badb8
commit
f3032c7d17
2 changed files with 3 additions and 4 deletions
|
@ -14,11 +14,10 @@ build = "build.rs"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
lvgl-sys = { version = "0.5.2", path = "../lvgl-sys" }
|
lvgl-sys = { version = "0.5.2", path = "../lvgl-sys" }
|
||||||
cty = "0.2.1"
|
cty = "0.2.1"
|
||||||
embedded-graphics = { version = "0.6.2", optional = true }
|
|
||||||
cstr_core = "0.2.3"
|
cstr_core = "0.2.3"
|
||||||
bitflags = "1.2.1"
|
bitflags = "1.2.1"
|
||||||
parking_lot = "0.11.1"
|
parking_lot = "0.11.1"
|
||||||
heapless = "0.7.1"
|
embedded-graphics = { version = "0.6.2", optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|
|
@ -64,14 +64,14 @@ impl DefaultDisplay {
|
||||||
|
|
||||||
pub struct DrawBuffer<const N: usize> {
|
pub struct DrawBuffer<const N: usize> {
|
||||||
initialized: RunOnce,
|
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> {
|
impl<const N: usize> DrawBuffer<N> {
|
||||||
pub const fn new() -> Self {
|
pub const fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
initialized: RunOnce::new(),
|
initialized: RunOnce::new(),
|
||||||
refresh_buffer: const_mutex(RefCell::new(heapless::Vec::new())),
|
refresh_buffer: const_mutex(RefCell::new([MaybeUninit::uninit(); N])),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue