Struct esp_idf_sys::esp_lcd_panel_t

source ·
#[repr(C)]
pub struct esp_lcd_panel_t { pub reset: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t) -> esp_err_t>, pub init: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t) -> esp_err_t>, pub del: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t) -> esp_err_t>, pub draw_bitmap: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, x_start: c_int, y_start: c_int, x_end: c_int, y_end: c_int, color_data: *const c_void) -> esp_err_t>, pub mirror: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, x_axis: bool, y_axis: bool) -> esp_err_t>, pub swap_xy: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, swap_axes: bool) -> esp_err_t>, pub set_gap: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, x_gap: c_int, y_gap: c_int) -> esp_err_t>, pub invert_color: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, invert_color_data: bool) -> esp_err_t>, pub disp_on_off: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, on_off: bool) -> esp_err_t>, pub disp_sleep: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, sleep: bool) -> esp_err_t>, pub user_data: *mut c_void, }
Expand description

@brief LCD panel interface

Fields§

§reset: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t) -> esp_err_t>

@brief Reset LCD panel

@param[in] panel LCD panel handle, which is created by other factory API like esp_lcd_new_panel_st7789() @return - ESP_OK on success

§init: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t) -> esp_err_t>

@brief Initialize LCD panel

@param[in] panel LCD panel handle, which is created by other factory API like esp_lcd_new_panel_st7789() @return - ESP_OK on success

§del: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t) -> esp_err_t>

@brief Destory LCD panel

@param[in] panel LCD panel handle, which is created by other factory API like esp_lcd_new_panel_st7789() @return - ESP_OK on success

§draw_bitmap: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, x_start: c_int, y_start: c_int, x_end: c_int, y_end: c_int, color_data: *const c_void) -> esp_err_t>

@brief Draw bitmap on LCD panel

@param[in] panel LCD panel handle, which is created by other factory API like esp_lcd_new_panel_st7789() @param[in] x_start Start index on x-axis (x_start included) @param[in] y_start Start index on y-axis (y_start included) @param[in] x_end End index on x-axis (x_end not included) @param[in] y_end End index on y-axis (y_end not included) @param[in] color_data RGB color data that will be dumped to the specific window range @return - ESP_OK on success

§mirror: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, x_axis: bool, y_axis: bool) -> esp_err_t>

@brief Mirror the LCD panel on specific axis

@note Combine this function with swap_xy, one can realize screen rotatation

@param[in] panel LCD panel handle, which is created by other factory API like esp_lcd_new_panel_st7789() @param[in] x_axis Whether the panel will be mirrored about the x_axis @param[in] y_axis Whether the panel will be mirrored about the y_axis @return - ESP_OK on success - ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel

§swap_xy: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, swap_axes: bool) -> esp_err_t>

@brief Swap/Exchange x and y axis

@note Combine this function with mirror, one can realize screen rotatation

@param[in] panel LCD panel handle, which is created by other factory API like esp_lcd_new_panel_st7789() @param[in] swap_axes Whether to swap the x and y axis @return - ESP_OK on success - ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel

§set_gap: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, x_gap: c_int, y_gap: c_int) -> esp_err_t>

@brief Set extra gap in x and y axis

@note The gap is only used for calculating the real coordinates.

@param[in] panel LCD panel handle, which is created by other factory API like esp_lcd_new_panel_st7789() @param[in] x_gap Extra gap on x axis, in pixels @param[in] y_gap Extra gap on y axis, in pixels @return - ESP_OK on success

§invert_color: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, invert_color_data: bool) -> esp_err_t>

@brief Invert the color (bit 1 -> 0 for color data line, and vice versa)

@param[in] panel LCD panel handle, which is created by other factory API like esp_lcd_new_panel_st7789() @param[in] invert_color_data Whether to invert the color data @return - ESP_OK on success

§disp_on_off: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, on_off: bool) -> esp_err_t>

@brief Turn on or off the display

@param[in] panel LCD panel handle, which is created by other factory API like esp_lcd_new_panel_st7789() @param[in] on_off True to turns on display, False to turns off display @return - ESP_OK on success - ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel

§disp_sleep: Option<unsafe extern "C" fn(panel: *mut esp_lcd_panel_t, sleep: bool) -> esp_err_t>

@brief Enter or exit sleep mode

@param[in] panel LCD panel handle, which is created by other factory API like esp_lcd_new_panel_st7789() @param[in] sleep True to enter sleep mode, False to wake up @return - ESP_OK on success - ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel

§user_data: *mut c_void

< User data, used to store externally customized data

Trait Implementations§

source§

impl Clone for esp_lcd_panel_t

source§

fn clone(&self) -> esp_lcd_panel_t

Returns a copy of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for esp_lcd_panel_t

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for esp_lcd_panel_t

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Copy for esp_lcd_panel_t

Auto Trait Implementations§

§

impl Freeze for esp_lcd_panel_t

§

impl RefUnwindSafe for esp_lcd_panel_t

§

impl !Send for esp_lcd_panel_t

§

impl !Sync for esp_lcd_panel_t

§

impl Unpin for esp_lcd_panel_t

§

impl UnwindSafe for esp_lcd_panel_t

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Copy,

§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.