38 #include "hal_platform.h" 40 #ifdef HAL_G2D_MODULE_ENABLED 301 uint32_t *min_width, uint32_t *max_width, uint32_t *min_height, uint32_t *max_height);
337 uint8_t alpha0, uint8_t red0, uint8_t green0, uint8_t blue0, uint8_t alpha1, uint8_t red1, uint8_t green1, uint8_t blue1);
364 uint8_t *buffer, uint32_t size, uint32_t width, uint32_t height, hal_g2d_color_format_t color_format);
378 uint8_t *buffer, uint32_t size, uint32_t width, uint32_t height, hal_g2d_color_format_t color_format);
452 uint32_t width, uint32_t height, hal_g2d_color_format_t color_format);
469 uint32_t width, uint32_t height, hal_g2d_color_format_t color_format);
629 int32_t *min_x, int32_t *max_x, int32_t *min_y, int32_t *max_y,
630 uint32_t *min_width, uint32_t *max_width, uint32_t *min_height, uint32_t *max_height);
hal_g2d_status_t hal_g2d_overlay_set_alpha(hal_g2d_handle_t *handle, uint32_t alpha_value)
This function sets the destination alpha.
Mirror and then rotate 90 degrees.
Definition: hal_g2d.h:205
The G2D function is not supported.
Definition: hal_g2d.h:144
PARGB6666.
Definition: hal_g2d.h:169
Layer 0.
Definition: hal_g2d.h:185
hal_g2d_status_t hal_g2d_overlay_set_layer_alpha(hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint32_t alpha_value)
This function sets the alpha to a layer.
8-bit per font pixel.
Definition: hal_g2d.h:215
Layer 1.
Definition: hal_g2d.h:186
hal_g2d_status_t hal_g2d_overlay_set_background_color(hal_g2d_handle_t *handle, uint32_t bg_color)
This function sets the background color.
Rotate 180 degrees.
Definition: hal_g2d.h:202
ARGB8565.
Definition: hal_g2d.h:165
hal_g2d_status_t hal_g2d_get_handle(hal_g2d_handle_t **handle_ptr, hal_g2d_codec_type_t codec_type, hal_g2d_get_handle_mode_t handle_mode)
This function gets a G2D handle to access and control the G2D engine.
bool(* hal_g2d_callback_t)(void *)
Defines the prototype of the G2D callback function.
Definition: hal_g2d.h:257
Rotate 90 degrees.
Definition: hal_g2d.h:201
Bitblt function.
Definition: hal_g2d.h:176
hal_g2d_status_t
This enum defines the return status of the G2D API.
Definition: hal_g2d.h:140
hal_g2d_status_t hal_g2d_overlay_set_layer_buffer(hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint8_t *buffer, uint32_t size)
hal_g2d_status_t hal_g2d_overlay_set_layer_window(hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, int32_t x, int32_t y, uint32_t width, uint32_t height)
This function sets the rectangle to a layer.
Random dithering.
Definition: hal_g2d.h:221
4-bit per font pixel.
Definition: hal_g2d.h:214
hal_g2d_supported_function_t
This enum defines the G2D supported functions.
Definition: hal_g2d.h:175
Unsupported color format.
Definition: hal_g2d.h:142
hal_g2d_dithering_mode_t
This enum defines the G2D dithering mode.
Definition: hal_g2d.h:219
hal_g2d_status_t hal_g2d_rectfill_set_color(hal_g2d_handle_t *handle, uint32_t color)
hal_g2d_status_t hal_g2d_overlay_set_layer_font_color(hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint32_t color)
This function sets the font color for a layer.
hal_g2d_status_t hal_g2d_overlay_set_layer_function(hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, hal_g2d_overlay_layer_function_t function)
This function sets an overlay layer function to a specific layer.
hal_g2d_status_t hal_g2d_overlay_set_layer_font_format(hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, hal_g2d_font_format_t format)
This function sets the font format for a layer.
No rotation.
Definition: hal_g2d.h:200
Disable dithering.
Definition: hal_g2d.h:220
Fixed-pattern dithering.
Definition: hal_g2d.h:222
hal_g2d_status_t hal_g2d_query_support(hal_g2d_codec_type_t codec_type, hal_g2d_supported_function_t function_type)
This function queries whether a particular function type is supported by the G2D engine.
Blocking mode.
Definition: hal_g2d.h:156
hal_g2d_status_t hal_g2d_overlay_set_layer_source_key(hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint32_t src_key_value)
This function enables the source key for a layer.
The G2D hardware is busy.
Definition: hal_g2d.h:145
1-bit per font pixel.
Definition: hal_g2d.h:212
hal_g2d_status_t hal_g2d_overlay_enable_layer(hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, bool show_layer)
This function enables a layer.
hal_g2d_status_t hal_g2d_overlay_set_layer_rectfill_color(hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint32_t rectfill_color)
This function sets rectangle fill color to a specific layer.
hal_g2d_overlay_layer_t
This enum defines the G2D overlay layer.
Definition: hal_g2d.h:184
BGR888.
Definition: hal_g2d.h:164
Layer 2.
Definition: hal_g2d.h:187
hal_g2d_status_t hal_g2d_rectangle_fill_query_window_range(hal_g2d_handle_t *handle, int32_t *min_x, int32_t *max_x, int32_t *min_y, int32_t *max_y, uint32_t *min_width, uint32_t *max_width, uint32_t *min_height, uint32_t *max_height)
Overlay function.
Definition: hal_g2d.h:179
hal_g2d_status_t hal_set_rgb_buffer(hal_g2d_handle_t *handle, uint8_t *buffer, uint32_t size, uint32_t width, uint32_t height, hal_g2d_color_format_t color_format)
Rectfill function.
Definition: hal_g2d.h:177
hal_g2d_status_t hal_g2d_overlay_set_layer_rgb_buffer(hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint8_t *buffer, uint32_t size, uint32_t width, uint32_t height, hal_g2d_color_format_t color_format)
This function sets the RGB buffer information to this layer.
hal_g2d_status_t hal_g2d_replace_color(hal_g2d_handle_t *handle, uint8_t alpha0, uint8_t red0, uint8_t green0, uint8_t blue0, uint8_t alpha1, uint8_t red1, uint8_t green1, uint8_t blue1)
The color of the pixel that matches to the combination of the old set (alpha0, red0, green0, blue0) is replaced with the combination of the new set (alpha1, red1, green1, blue1).
hal_g2d_codec_type_t
This enum defines the G2D codec type.
Definition: hal_g2d.h:150
hal_g2d_status_t hal_g2d_set_rgb_buffer(hal_g2d_handle_t *handle, uint8_t *buffer, uint32_t size, uint32_t width, uint32_t height, hal_g2d_color_format_t color_format)
This function sets the destination buffer.
hal_g2d_font_format_t
This enum defines the G2D font format.
Definition: hal_g2d.h:211
hal_g2d_status_t hal_g2d_query_rgb_buffer_range(hal_g2d_handle_t *handle, uint32_t *min_width, uint32_t *max_width, uint32_t *min_height, uint32_t *max_height)
This function queries the range of the destination buffer.
hal_g2d_status_t hal_g2d_overlay_set_layer_rotation(hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, hal_g2d_rotate_angle_t rotation)
This function sets the rotation for a layer.
hal_g2d_status_t hal_g2d_set_dithering(hal_g2d_handle_t *handle, hal_g2d_dithering_mode_t mode, uint8_t red_bit, uint8_t green_bit, uint8_t blue_bit)
This function sets the dithering of the destination.
Font.
Definition: hal_g2d.h:193
PARGB8888.
Definition: hal_g2d.h:170
hal_g2d_status_t hal_g2d_register_callback(hal_g2d_handle_t *handle, hal_g2d_callback_t callback)
This function registers a user-defined callback function for the G2D completion events.
hal_g2d_status_t hal_g2d_rectfill_start(hal_g2d_handle_t *handle)
Mirror and then rotate 270 degrees.
Definition: hal_g2d.h:207
Buffer.
Definition: hal_g2d.h:195
hal_g2d_rotate_angle_t
This enum defines the G2D rotation angle.
Definition: hal_g2d.h:199
hal_g2d_color_format_t
This enum defines the G2D color format.
Definition: hal_g2d.h:161
Rotate 270 degrees.
Definition: hal_g2d.h:203
hal_g2d_status_t hal_g2d_overlay_set_window(hal_g2d_handle_t *handle, int32_t x, int32_t y)
This function sets the coordinates in the destination window.
ARGB8888.
Definition: hal_g2d.h:167
struct hal_g2d_hanele_struct_t hal_g2d_handle_t
This structure presents the G2D handle.
Definition: hal_g2d.h:238
RGB565.
Definition: hal_g2d.h:162
hal_g2d_status_t hal_g2d_release_handle(hal_g2d_handle_t *handle)
This function releases the G2D handle and frees its associated resources occupied by this G2D handle...
Successful.
Definition: hal_g2d.h:146
Font function.
Definition: hal_g2d.h:178
hal_g2d_status_t hal_g2d_init(void)
This function initializes the G2D module.
Invalid parameter, such as failed on the range check.
Definition: hal_g2d.h:143
hal_g2d_status_t hal_g2d_set_clipping_window(hal_g2d_handle_t *handle, int32_t x, int32_t y, int32_t width, int32_t height)
The function sets the clipping window for the destination buffer.
Hardware error.
Definition: hal_g2d.h:141
PARGB8565.
Definition: hal_g2d.h:168
Mirror and then rotate 180 degrees.
Definition: hal_g2d.h:206
Rectangle fill.
Definition: hal_g2d.h:194
UYVY.
Definition: hal_g2d.h:171
Dithering function.
Definition: hal_g2d.h:180
Non Blocking mode.
Definition: hal_g2d.h:157
Layer 3.
Definition: hal_g2d.h:188
Hardware codec.
Definition: hal_g2d.h:151
hal_g2d_status_t hal_g2d_set_source_key(hal_g2d_handle_t *handle, uint8_t alpha, uint8_t red, uint8_t green, uint8_t blue)
hal_g2d_status_t hal_g2d_overlay_set_roi_window(hal_g2d_handle_t *handle, int32_t x, int32_t y, uint32_t width, uint32_t height)
This function sets the ROI(region of interest) window.
hal_g2d_status_t hal_g2d_overlay_start(hal_g2d_handle_t *handle)
This function starts the overlay.
RGB888.
Definition: hal_g2d.h:163
hal_g2d_status_t hal_g2d_overlay_set_layer_yuv_buffer(hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint8_t *buffer[3], uint32_t size[3], uint32_t width, uint32_t height, hal_g2d_color_format_t color_format)
hal_g2d_status_t hal_g2d_get_status(hal_g2d_handle_t *handle)
The function gets the status of G2D engine.
2-bit per font pixel.
Definition: hal_g2d.h:213
hal_g2d_status_t hal_g2d_rectfill_set_destination_window(hal_g2d_handle_t *handle, int32_t x, int32_t y, int32_t width, int32_t height)
Mirror.
Definition: hal_g2d.h:204
hal_g2d_get_handle_mode_t
This enum defines the G2D get handle mode.
Definition: hal_g2d.h:155
hal_g2d_overlay_layer_function_t
This enum defines the G2D overlay layer function.
Definition: hal_g2d.h:192
ARGB6666.
Definition: hal_g2d.h:166