# lv_uefi_private.h (/api/drivers/uefi/lv_uefi_private_h)



<RelatedHeaders name="lv_uefi.h" isPrivate="true" />

<ApiSummary functions="5" variables="4" />

Functions [#functions]

<ApiMember kind="function" name="lv_uefi_protocol_test" file="drivers/uefi/lv_uefi_private.h" line="58" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/drivers/uefi/lv_uefi_private.h#L58">
  lv_uefi_protocol_test [#lv_uefi_protocol_test]

  Test if a protocol is installed at a handle.

  ```c title=" " lineNumbers=1
  bool lv_uefi_protocol_test(EFI_HANDLE handle, EFI_GUID *protocol)
  ```

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

  | Name       | Type         | Description                                          |
  | ---------- | ------------ | ---------------------------------------------------- |
  | `handle`   | `EFI_HANDLE` | The handle on which the protocol might be installed. |
  | `protocol` | `EFI_GUID *` | The guid of the protocol.                            |

  **Returns:** <ApiLink name="bool" /> — TRUE if the protocol is installed, FALSE if not.
</ApiMember>

<ApiMember kind="function" name="lv_uefi_protocol_open" file="drivers/uefi/lv_uefi_private.h" line="66" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/drivers/uefi/lv_uefi_private.h#L66">
  lv_uefi_protocol_open [#lv_uefi_protocol_open]

  Open a protocol.

  ```c title=" " lineNumbers=1
  void * lv_uefi_protocol_open(EFI_HANDLE handle, EFI_GUID *protocol)
  ```

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

  | Name       | Type         | Description                                    |
  | ---------- | ------------ | ---------------------------------------------- |
  | `handle`   | `EFI_HANDLE` | The handle on which the protocol is installed. |
  | `protocol` | `EFI_GUID *` | The guid of the protocol.                      |

  **Returns:** `void *` — A pointer to the interface, NULL if the protocol couldn't be opened.
</ApiMember>

<ApiMember kind="function" name="lv_uefi_protocol_close" file="drivers/uefi/lv_uefi_private.h" line="73" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/drivers/uefi/lv_uefi_private.h#L73">
  lv_uefi_protocol_close [#lv_uefi_protocol_close]

  Close a protocol.

  ```c title=" " lineNumbers=1
  void lv_uefi_protocol_close(EFI_HANDLE handle, EFI_GUID *protocol)
  ```

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

  | Name       | Type         | Description                                    |
  | ---------- | ------------ | ---------------------------------------------- |
  | `handle`   | `EFI_HANDLE` | The handle on which the protocol is installed. |
  | `protocol` | `EFI_GUID *` | The guid of the protocol.                      |
</ApiMember>

<ApiMember kind="function" name="lv_uefi_ucs2_to_ascii" file="drivers/uefi/lv_uefi_private.h" line="84" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/drivers/uefi/lv_uefi_private.h#L84">
  lv_uefi_ucs2_to_ascii [#lv_uefi_ucs2_to_ascii]

  Convert an UCS-2 string to an ASCII string. The string must contain only characters >= 0x20 and \<= 0X7E.

  ```c title=" " lineNumbers=1
  size_t lv_uefi_ucs2_to_ascii(const CHAR16 *ucs2, char *ascii, size_t ascii_len)
  ```

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

  | Name        | Type                      | Description                                 |
  | ----------- | ------------------------- | ------------------------------------------- |
  | `ucs2`      | `const CHAR16 *`          | The UCS-2 string.                           |
  | `ascii`     | `char *`                  | The buffer to store the ASCII string.       |
  | `ascii_len` | <ApiLink name="size_t" /> | The size of the buffer in ASCII characters. |

  **Returns:** <ApiLink name="size_t" /> — The number of characters written to the buffer or 0 if there was an error.
</ApiMember>

<ApiMember kind="function" name="lv_uefi_ascii_to_ucs2" file="drivers/uefi/lv_uefi_private.h" line="95" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/drivers/uefi/lv_uefi_private.h#L95">
  lv_uefi_ascii_to_ucs2 [#lv_uefi_ascii_to_ucs2]

  Convert an ASCII string to an UCS-2 string. The string must contain only characters >= 0x20 and \<= 0X7E.

  ```c title=" " lineNumbers=1
  size_t lv_uefi_ascii_to_ucs2(const char *ascii, CHAR16 *ucs2, size_t ucs2_len)
  ```

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

  | Name       | Type                      | Description                                 |
  | ---------- | ------------------------- | ------------------------------------------- |
  | `ascii`    | `const char *`            | The ASCII string.                           |
  | `ucs2`     | `CHAR16 *`                | The buffer to store the UCS-2 string.       |
  | `ucs2_len` | <ApiLink name="size_t" /> | The size of the buffer in UCS-2 characters. |

  **Returns:** <ApiLink name="size_t" /> — The number of bytes written to the buffer or 0 if there was an error.
</ApiMember>

Variables [#variables]

<ApiMember kind="variable" name="gLvEfiImageHandle" file="drivers/uefi/lv_uefi_private.h" line="38" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/drivers/uefi/lv_uefi_private.h#L38">
  gLvEfiImageHandle [#glvefiimagehandle]

  ```c title=" " lineNumbers=1
  EFI_HANDLE gLvEfiImageHandle
  ```

  Internal cache for the image handle (source: application entry point)
</ApiMember>

<ApiMember kind="variable" name="gLvEfiST" file="drivers/uefi/lv_uefi_private.h" line="42" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/drivers/uefi/lv_uefi_private.h#L42">
  gLvEfiST [#glvefist]

  ```c title=" " lineNumbers=1
  EFI_SYSTEM_TABLE * gLvEfiST
  ```

  Internal cache for the system table (source: application entry point)
</ApiMember>

<ApiMember kind="variable" name="gLvEfiBS" file="drivers/uefi/lv_uefi_private.h" line="46" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/drivers/uefi/lv_uefi_private.h#L46">
  gLvEfiBS [#glvefibs]

  ```c title=" " lineNumbers=1
  EFI_BOOT_SERVICES * gLvEfiBS
  ```

  Internal cache for the boot services table (source: gLvEfiST)
</ApiMember>

<ApiMember kind="variable" name="gLvEfiRT" file="drivers/uefi/lv_uefi_private.h" line="50" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/drivers/uefi/lv_uefi_private.h#L50">
  gLvEfiRT [#glvefirt]

  ```c title=" " lineNumbers=1
  EFI_RUNTIME_SERVICES * gLvEfiRT
  ```

  Internal cache for the boot runtime service table (source: gLvEfiST)
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lvgl.h&#x22;, &#x22;lv_uefi.h&#x22;]" transitiveIncludes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_conf_kconfig.h&#x22;]" />
