Skip to main content

oxivgl_sys/
lib.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2#![no_std]
3#![allow(non_snake_case)]
4#![allow(non_camel_case_types)]
5#![allow(non_upper_case_globals)]
6#![allow(clippy::too_many_arguments)]
7#![allow(clippy::redundant_static_lifetimes)]
8#![allow(unsafe_op_in_unsafe_fn)] // bindgen bitfield accessors use transmute without unsafe blocks
9
10include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
11
12#[cfg(feature = "use-string-functions")]
13mod string_impl;
14
15#[cfg(test)]
16mod tests {
17    use super::*;
18
19    #[test]
20    fn basic_sanity_check() {
21        unsafe {
22            lv_init();
23
24            let horizontal_resolution = lv_disp_get_hor_res(core::ptr::null_mut());
25            assert_eq!(horizontal_resolution, 0);
26
27            let vertical_resolution = lv_disp_get_ver_res(core::ptr::null_mut());
28            assert_eq!(vertical_resolution, 0);
29        }
30    }
31}