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 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
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
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
)