Update default features to empty
This commit is contained in:
parent
de568593ef
commit
bc7c06cc8c
3 changed files with 5 additions and 1 deletions
|
@ -21,6 +21,7 @@ parking_lot = "0.11.1"
|
||||||
heapless = "0.7.1"
|
heapless = "0.7.1"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
default = []
|
||||||
alloc = ["cstr_core/alloc"]
|
alloc = ["cstr_core/alloc"]
|
||||||
lvgl_alloc = ["alloc"]
|
lvgl_alloc = ["alloc"]
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,9 @@ impl<const N: usize> DrawBuffer<N> {
|
||||||
|
|
||||||
fn get_ptr(&self) -> Option<Box<lvgl_sys::lv_disp_buf_t>> {
|
fn get_ptr(&self) -> Option<Box<lvgl_sys::lv_disp_buf_t>> {
|
||||||
if self.initialized.swap_and_check() {
|
if self.initialized.swap_and_check() {
|
||||||
|
// TODO: needs to be 'static somehow
|
||||||
|
// Cannot be in the DrawBuffer struct because the type `lv_disp_buf_t` contains a raw
|
||||||
|
// pointer and raw pointers are not Sync and consequently cannot be in `static` variables.
|
||||||
let mut inner: MaybeUninit<lvgl_sys::lv_disp_buf_t> = MaybeUninit::uninit();
|
let mut inner: MaybeUninit<lvgl_sys::lv_disp_buf_t> = MaybeUninit::uninit();
|
||||||
let primary_buffer_guard = self.refresh_buffer.lock();
|
let primary_buffer_guard = self.refresh_buffer.lock();
|
||||||
let draw_buf = unsafe {
|
let draw_buf = unsafe {
|
||||||
|
|
|
@ -14,7 +14,7 @@ pub enum CoreError {
|
||||||
type Result<T> = result::Result<T, CoreError>;
|
type Result<T> = result::Result<T, CoreError>;
|
||||||
|
|
||||||
/// Register own buffer
|
/// Register own buffer
|
||||||
pub fn disp_drv_register<C: PixelColor + From<Color>, T: DrawTarget<C>>(
|
pub(crate) fn disp_drv_register<C: PixelColor + From<Color>, T: DrawTarget<C>>(
|
||||||
disp_drv: &mut DisplayDriver<T, C>,
|
disp_drv: &mut DisplayDriver<T, C>,
|
||||||
) -> Result<Display> {
|
) -> Result<Display> {
|
||||||
let disp_ptr = unsafe { lvgl_sys::lv_disp_drv_register(&mut disp_drv.disp_drv as *mut _) };
|
let disp_ptr = unsafe { lvgl_sys::lv_disp_drv_register(&mut disp_drv.disp_drv as *mut _) };
|
||||||
|
|
Loading…
Reference in a new issue