Remove usage of deprecated method

This commit is contained in:
Rafael Caricio 2021-03-07 18:03:45 +01:00
parent 9b9ea48920
commit ab8b8ae05f
Signed by: rafaelcaricio
GPG key ID: 3C86DBCE8E93C947

View file

@ -43,7 +43,7 @@ where
C: PixelColor + From<Color>, C: PixelColor + From<Color>,
{ {
pub fn init() -> LvResult<Self> { pub fn init() -> LvResult<Self> {
if !LVGL_IN_USE.compare_and_swap(false, true, Ordering::SeqCst) { if !LVGL_IN_USE.compare_exchange(false, true, Ordering::SeqCst, Ordering::Relaxed) {
unsafe { unsafe {
lvgl_sys::lv_init(); lvgl_sys::lv_init();
} }