Struct esp_idf_svc::hal::sys::esp_lcd_panel_t
source · #[repr(C)]pub struct esp_lcd_panel_t {
pub reset: Option<unsafe extern "C" fn(_: *mut esp_lcd_panel_t) -> i32>,
pub init: Option<unsafe extern "C" fn(_: *mut esp_lcd_panel_t) -> i32>,
pub del: Option<unsafe extern "C" fn(_: *mut esp_lcd_panel_t) -> i32>,
pub draw_bitmap: Option<unsafe extern "C" fn(_: *mut esp_lcd_panel_t, _: i32, _: i32, _: i32, _: i32, _: *const c_void) -> i32>,
pub mirror: Option<unsafe extern "C" fn(_: *mut esp_lcd_panel_t, _: bool, _: bool) -> i32>,
pub swap_xy: Option<unsafe extern "C" fn(_: *mut esp_lcd_panel_t, _: bool) -> i32>,
pub set_gap: Option<unsafe extern "C" fn(_: *mut esp_lcd_panel_t, _: i32, _: i32) -> i32>,
pub invert_color: Option<unsafe extern "C" fn(_: *mut esp_lcd_panel_t, _: bool) -> i32>,
pub disp_on_off: Option<unsafe extern "C" fn(_: *mut esp_lcd_panel_t, _: bool) -> i32>,
pub disp_sleep: Option<unsafe extern "C" fn(_: *mut esp_lcd_panel_t, _: bool) -> i32>,
pub user_data: *mut c_void,
}
Expand description
@brief LCD panel interface
Fields§
§reset: Option<unsafe extern "C" fn(_: *mut esp_lcd_panel_t) -> i32>
@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(_: *mut esp_lcd_panel_t) -> i32>
@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(_: *mut esp_lcd_panel_t) -> i32>
@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(_: *mut esp_lcd_panel_t, _: i32, _: i32, _: i32, _: i32, _: *const c_void) -> i32>
@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(_: *mut esp_lcd_panel_t, _: bool, _: bool) -> i32>
@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(_: *mut esp_lcd_panel_t, _: bool) -> i32>
@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(_: *mut esp_lcd_panel_t, _: i32, _: i32) -> i32>
@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(_: *mut esp_lcd_panel_t, _: bool) -> i32>
@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(_: *mut esp_lcd_panel_t, _: bool) -> i32>
@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(_: *mut esp_lcd_panel_t, _: bool) -> i32>
@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
impl Clone for esp_lcd_panel_t
source§fn clone(&self) -> esp_lcd_panel_t
fn clone(&self) -> esp_lcd_panel_t
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for esp_lcd_panel_t
impl Debug for esp_lcd_panel_t
source§impl Default for esp_lcd_panel_t
impl Default for esp_lcd_panel_t
source§fn default() -> esp_lcd_panel_t
fn default() -> esp_lcd_panel_t
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 Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)