# lv_nxp_elcdif.h (/api/public/drivers/display/lv_nxp_elcdif_h)



Driver for NXP's ELCD

<ApiSummary functions="3" />

Functions [#functions]

<ApiMember kind="function" name="lv_nxp_display_elcdif_create_direct" file="public/drivers/display/lv_nxp_elcdif.h" line="45" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/display/lv_nxp_elcdif.h#L45">
  lv_nxp_display_elcdif_create_direct [#lv_nxp_display_elcdif_create_direct]

  Attach LVGL to ELCDIF using DIRECT rendering mode. ELCDIF should be already initialized.

  ```c title=" " lineNumbers=1
  lv_display_t * lv_nxp_display_elcdif_create_direct(LCDIF_Type *base, const elcdif_rgb_mode_config_t *config, void *frame_buffer1, void *frame_buffer2, size_t buf_size)
  ```

  <span className="sr-only">
    Parameters
  </span>

  | Name            | Type                               | Description                                                                            |
  | --------------- | ---------------------------------- | -------------------------------------------------------------------------------------- |
  | `base`          | `LCDIF_Type *`                     | The NXP eLCD controller base address                                                   |
  | `config`        | `const elcdif_rgb_mode_config_t *` | NXP eLCD config object                                                                 |
  | `frame_buffer1` | `void *`                           | pointer the first frame buffers                                                        |
  | `frame_buffer2` | `void *`                           | pointer the second frame buffer. **May** be `NULL`. When NULL a single buffer is used. |
  | `buf_size`      | `size_t`                           | size of a buffer in bytes (must be at least as large as the screen)                    |

  **Returns:** <ApiLink name="lv_display_t" display="lv_display_t *" /> — a display object initialized and registered on the LVGL runtime
</ApiMember>

<ApiMember kind="function" name="lv_nxp_display_elcdif_create_partial" file="public/drivers/display/lv_nxp_elcdif.h" line="61" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/display/lv_nxp_elcdif.h#L61">
  lv_nxp_display_elcdif_create_partial [#lv_nxp_display_elcdif_create_partial]

  Attach LVGL to ELCDIF using PARTIAL rendering mode. ELCDIF should be already initialized.

  ```c title=" " lineNumbers=1
  lv_display_t * lv_nxp_display_elcdif_create_partial(LCDIF_Type *base, const elcdif_rgb_mode_config_t *config, void *frame_buffer1, void *frame_buffer2, size_t buf_size)
  ```

  <span className="sr-only">
    Parameters
  </span>

  | Name            | Type                               | Description                                                                            |
  | --------------- | ---------------------------------- | -------------------------------------------------------------------------------------- |
  | `base`          | `LCDIF_Type *`                     | The NXP eLCD controller base address                                                   |
  | `config`        | `const elcdif_rgb_mode_config_t *` | NXP eLCD config object                                                                 |
  | `frame_buffer1` | `void *`                           | pointer the first frame buffers                                                        |
  | `frame_buffer2` | `void *`                           | pointer the second frame buffer. **May** be `NULL`. When NULL a single buffer is used. |
  | `buf_size`      | `size_t`                           | size of a buffer in bytes                                                              |

  **Returns:** <ApiLink name="lv_display_t" display="lv_display_t *" /> — a display object initialized and registered on the LVGL runtime
</ApiMember>

<ApiMember kind="function" name="lv_nxp_display_elcdif_event_handler" file="public/drivers/display/lv_nxp_elcdif.h" line="74" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/display/lv_nxp_elcdif.h#L74">
  lv_nxp_display_elcdif_event_handler [#lv_nxp_display_elcdif_event_handler]

  Call this function on the LCD Interrupt Service Routine It tells to LVGL what to do when a framebuffer is transmitted to the LCD panel

  ```c title=" " lineNumbers=1
  void lv_nxp_display_elcdif_event_handler(const lv_display_t *disp)
  ```

  <span className="sr-only">
    Parameters
  </span>

  | Name   | Type                                                           | Description                                              |
  | ------ | -------------------------------------------------------------- | -------------------------------------------------------- |
  | `disp` | <ApiLink name="lv_display_t" display="const lv_display_t *" /> | The display instance that contains the eLCD related data |

  <Callout type="info">
    : the parameter disp is typically the return value after `lv_nxp_display_elcdif_create_direct` has been successfully executed
  </Callout>
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_display.h&#x22;, &#x22;fsl_elcdif.h&#x22;]" includedBy="[&#x22;lvgl.h&#x22;]" transitiveIncludes="[&#x22;lv_area.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_internal.h&#x22;, &#x22;lv_event.h&#x22;, &#x22;lv_log.h&#x22;, &#x22;lv_math.h&#x22;, &#x22;lv_mem.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
