LCD driver APIs. More...
Data Structures | |
| struct | lcdc_control |
| struct | lcdc_xsync_config |
| struct | lcdc_config |
| struct | lcdc_layer_config |
Macros | |
| #define | LCDC_TEST_MODE_DISABLE (0U) |
| #define | LCDC_TEST_MODE_BACKGROUND (1U) |
| #define | LCDC_TEST_MODE_COLOR_BAR_COL (2U) |
| #define | LCDC_TEST_MODE_COLOR_BAR_ROW (3U) |
Typedefs | |
| typedef enum lcdc_line_pattern | lcdc_line_pattern_t |
| typedef enum lcdc_display_mode | lcdc_display_mode_t |
| typedef enum lcdc_layer_max_bytes_per_transfer | lcdc_layer_max_bytes_per_transfer_t |
| typedef struct lcdc_control | lcdc_control_t |
| typedef struct lcdc_xsync_config | lcdc_xsync_config_t |
| typedef struct lcdc_config | lcdc_config_t |
| typedef struct lcdc_layer_config | lcdc_layer_config_t |
Enumerations | |
| enum | { status_lcdc_no_active_layer_yet = ((uint32_t)( status_group_lcdc )*1000U + (uint32_t)( 1 )) , status_lcdc_layer_not_supported = ((uint32_t)( status_group_lcdc )*1000U + (uint32_t)( 2 )) } |
| enum | lcdc_line_pattern { lcdc_line_pattern_rgb = 0 , lcdc_line_pattern_rbg , lcdc_line_pattern_gbr , lcdc_line_pattern_grb , lcdc_line_pattern_brg , lcdc_line_pattern_bgr } |
| enum | lcdc_display_mode { lcdc_display_mode_normal = 0 , lcdc_display_mode_test_mode_1 , lcdc_display_mode_test_mode_2 , lcdc_display_mode_test_mode_3 } |
| enum | lcdc_layer_max_bytes_per_transfer { lcdc_layer_max_bytes_64 = 0 , lcdc_layer_max_bytes_128 , lcdc_layer_max_bytes_256 , lcdc_layer_max_bytes_512 , lcdc_layer_max_bytes_1024 } |
Functions | |
| static void | lcdc_software_reset (LCDC_Type *ptr) |
| Layer config. More... | |
| static void | lcdc_enable_interrupt (LCDC_Type *ptr, uint32_t interrupt_mask) |
| Enable interrupt according to the given mask. More... | |
| static void | lcdc_disable_interrupt (LCDC_Type *ptr, uint32_t interrupt_mask) |
| Disable interrupt according to the given mask. More... | |
| static void | lcdc_clear_status (LCDC_Type *ptr, uint32_t mask) |
| Clear specific status according to the given mask. More... | |
| static bool | lcdc_layer_control_shadow_loaded (LCDC_Type *ptr, uint8_t layer_index) |
| Make layer control shadow registers take effect. More... | |
| static uint32_t | lcdc_get_dma_status (LCDC_Type *ptr) |
| Get DMA status. More... | |
| static bool | lcdc_check_dma_status (LCDC_Type *ptr, uint32_t mask) |
| Check DMA status against the given mask. More... | |
| static void | lcdc_clear_dma_status (LCDC_Type *ptr, uint32_t mask) |
| Clear DMA status according to the given mask. More... | |
| static uint32_t | lcdc_get_status (LCDC_Type *ptr) |
| Get status. More... | |
| static bool | lcdc_check_status (LCDC_Type *ptr, uint32_t mask) |
| Check status against the given mask. More... | |
| static void | lcdc_layer_set_next_buffer (LCDC_Type *ptr, uint32_t layer_index, uint32_t buffer) |
| Set next buffer for certain layer. More... | |
| static void | lcdc_layer_update_background (LCDC_Type *ptr, uint8_t layer_index, display_color_32b_t background) |
| Update specific layer background. More... | |
| static void | lcdc_layer_update_position (LCDC_Type *ptr, uint8_t layer_index, uint16_t x, uint32_t y) |
| Update specific layer position. More... | |
| static void | lcdc_layer_update_dimension (LCDC_Type *ptr, uint8_t layer_index, uint8_t width, uint8_t height) |
| Update specific layer dimension. More... | |
| static void | lcdc_layer_set_region (LCDC_Type *ptr, uint8_t layer_index, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) |
| Update specific layer region. More... | |
| static void | lcdc_layer_update (LCDC_Type *ptr, uint8_t layer_index) |
| Update specific layer configuration. More... | |
| static void | lcdc_layer_enable (LCDC_Type *ptr, uint32_t layer_index) |
| Enable specific layer. More... | |
| static void | lcdc_layer_disable (LCDC_Type *ptr, uint32_t layer_index) |
| Disable specific layer. More... | |
| static void | lcdc_set_testmode (LCDC_Type *ptr, uint8_t test_mode) |
| Set test mode. More... | |
| static void | lcdc_set_background (LCDC_Type *ptr, display_color_32b_t color) |
| Set background. More... | |
| static void | lcdc_enable_background_in_alpha_blender (LCDC_Type *ptr) |
| enable background on alpha blender More... | |
| static void | lcdc_disable_background_in_alpha_blender (LCDC_Type *ptr) |
| disable background on alpha blender More... | |
| void | lcdc_get_default_layer_config (LCDC_Type *ptr, lcdc_layer_config_t *layer, display_pixel_format_t pixel_format, uint8_t layer_index) |
| Get default layer configuration value. More... | |
| void | lcdc_get_default_config (LCDC_Type *ptr, lcdc_config_t *config) |
| Get default configuration value. More... | |
| void | lcdc_init (LCDC_Type *ptr, lcdc_config_t *config) |
| Initialize LCD controller. More... | |
| hpm_stat_t | lcdc_config_layer (LCDC_Type *ptr, uint8_t layer_index, lcdc_layer_config_t *layer_config, bool enable_layer) |
| Configure specific layer. More... | |
| void | lcdc_turn_on_display (LCDC_Type *ptr) |
| Turn on display. More... | |
| void | lcdc_turn_off_display (LCDC_Type *ptr) |
| Turn off display. More... | |
LCD driver APIs.
| #define LCDC_TEST_MODE_BACKGROUND (1U) |
#include <drivers/inc/hpm_lcdc_drv.h>
| #define LCDC_TEST_MODE_COLOR_BAR_COL (2U) |
#include <drivers/inc/hpm_lcdc_drv.h>
| #define LCDC_TEST_MODE_COLOR_BAR_ROW (3U) |
#include <drivers/inc/hpm_lcdc_drv.h>
| #define LCDC_TEST_MODE_DISABLE (0U) |
#include <drivers/inc/hpm_lcdc_drv.h>
| typedef struct lcdc_config lcdc_config_t |
#include <drivers/inc/hpm_lcdc_drv.h>
| typedef struct lcdc_control lcdc_control_t |
#include <drivers/inc/hpm_lcdc_drv.h>
| typedef enum lcdc_display_mode lcdc_display_mode_t |
#include <drivers/inc/hpm_lcdc_drv.h>
| typedef struct lcdc_layer_config lcdc_layer_config_t |
#include <drivers/inc/hpm_lcdc_drv.h>
#include <drivers/inc/hpm_lcdc_drv.h>
| typedef enum lcdc_line_pattern lcdc_line_pattern_t |
#include <drivers/inc/hpm_lcdc_drv.h>
| typedef struct lcdc_xsync_config lcdc_xsync_config_t |
#include <drivers/inc/hpm_lcdc_drv.h>
| anonymous enum |
#include <drivers/inc/hpm_lcdc_drv.h>
| Enumerator | |
|---|---|
| status_lcdc_no_active_layer_yet | |
| status_lcdc_layer_not_supported | |
| enum lcdc_display_mode |
#include <drivers/inc/hpm_lcdc_drv.h>
| Enumerator | |
|---|---|
| lcdc_display_mode_normal | |
| lcdc_display_mode_test_mode_1 | |
| lcdc_display_mode_test_mode_2 | |
| lcdc_display_mode_test_mode_3 | |
#include <drivers/inc/hpm_lcdc_drv.h>
| Enumerator | |
|---|---|
| lcdc_layer_max_bytes_64 | |
| lcdc_layer_max_bytes_128 | |
| lcdc_layer_max_bytes_256 | |
| lcdc_layer_max_bytes_512 | |
| lcdc_layer_max_bytes_1024 | |
| enum lcdc_line_pattern |
#include <drivers/inc/hpm_lcdc_drv.h>
| Enumerator | |
|---|---|
| lcdc_line_pattern_rgb | |
| lcdc_line_pattern_rbg | |
| lcdc_line_pattern_gbr | |
| lcdc_line_pattern_grb | |
| lcdc_line_pattern_brg | |
| lcdc_line_pattern_bgr | |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Check DMA status against the given mask.
| [in] | ptr | LCD base address |
| [in] | mask | Mask of expected DMA status |
| true | if all bits set to 1 in mask are set |
| false | if any bit set to 1 in mask is not set |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Check status against the given mask.
| [in] | ptr | LCD base address |
| [in] | mask | Mask of expected status |
| true | if all bits set to 1 in mask are set |
| false | if any bit set to 1 in mask is not set |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Clear DMA status according to the given mask.
| [in] | ptr | LCD base address |
| [in] | mask | Mask of expected DMA status |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Clear specific status according to the given mask.
| [in] | ptr | LCD base address |
| [in] | mask | Status mask of status to be cleared |
| hpm_stat_t lcdc_config_layer | ( | LCDC_Type * | ptr, |
| uint8_t | layer_index, | ||
| lcdc_layer_config_t * | layer_config, | ||
| bool | enable_layer | ||
| ) |
#include <drivers/inc/hpm_lcdc_drv.h>
Configure specific layer.
| [in] | ptr | LCD base address |
| [in] | layer_index | target layer to be configured |
| [in] | layer_config | Pointer of layer configuration struct buffer |
| [in] | enable_layer | Set true if the layer needs to be enabled right after being configured |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
disable background on alpha blender
| [in] | ptr | LCD base address |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Disable interrupt according to the given mask.
| [in] | ptr | LCD base address |
| [in] | interrupt_mask | Mask of interrupts to be disabled |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
enable background on alpha blender
| [in] | ptr | LCD base address |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Enable interrupt according to the given mask.
| [in] | ptr | LCD base address |
| [in] | interrupt_mask | Mask of interrupts to be enabled |
| void lcdc_get_default_config | ( | LCDC_Type * | ptr, |
| lcdc_config_t * | config | ||
| ) |
#include <drivers/inc/hpm_lcdc_drv.h>
Get default configuration value.
| [in] | ptr | LCD base address |
| [out] | config | Pointer of configuration struct buffer |
| void lcdc_get_default_layer_config | ( | LCDC_Type * | ptr, |
| lcdc_layer_config_t * | layer, | ||
| display_pixel_format_t | pixel_format, | ||
| uint8_t | layer_index | ||
| ) |
#include <drivers/inc/hpm_lcdc_drv.h>
Get default layer configuration value.
| [in] | ptr | LCD base address |
| [out] | layer | Pointer of layer configuration struct buffer |
| [in] | pixel_format | Pixel format to be used for this layer |
| [in] | layer_index | target layer to be configured |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Get DMA status.
| [in] | ptr | LCD base address |
| DMA | status |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Get status.
| [in] | ptr | LCD base address |
| current | status |
| void lcdc_init | ( | LCDC_Type * | ptr, |
| lcdc_config_t * | config | ||
| ) |
#include <drivers/inc/hpm_lcdc_drv.h>
Initialize LCD controller.
| [in] | ptr | LCD base address |
| [in] | config | Pointer of configuration struct buffer |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Make layer control shadow registers take effect.
| [in] | ptr | LCD base address |
| [in] | layer_index | Index of layer to be controlled |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Disable specific layer.
| [in] | ptr | LCD base address |
| [in] | layer_index | target layer to be configured |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Enable specific layer.
| [in] | ptr | LCD base address |
| [in] | layer_index | target layer to be configured |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Set next buffer for certain layer.
| [in] | ptr | LCD base address |
| [in] | layer_index | target layer to be configured |
| [in] | buffer | display buffer to be set |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Update specific layer region.
| [in] | ptr | LCD base address |
| [in] | layer_index | target layer to be configured |
| [in] | x1 | X coord of the top left pixel |
| [in] | y1 | Y coord of the top left pixel |
| [in] | x2 | X coord of the bottom right pixel |
| [in] | y2 | Y coord of the bottom right pixel |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Update specific layer configuration.
| [in] | ptr | LCD base address |
| [in] | layer_index | target layer to be configured |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Update specific layer background.
| [in] | ptr | LCD base address |
| [in] | layer_index | target layer to be configured |
| [in] | background | color to be set as background |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Update specific layer dimension.
| [in] | ptr | LCD base address |
| [in] | layer_index | target layer to be configured |
| [in] | width | Width in pixel |
| [in] | height | Height in pixel |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Update specific layer position.
| [in] | ptr | LCD base address |
| [in] | layer_index | target layer to be configured |
| [in] | x | Position X coord |
| [in] | y | Position Y coord |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Set background.
| [in] | ptr | LCD base address |
| [in] | color | background color |
|
inlinestatic |
#include <drivers/inc/hpm_lcdc_drv.h>
Set test mode.
| [in] | ptr | LCD base address |
| [in] | test_mode | target test mode to be enabled |
|
inlinestatic |
| void lcdc_turn_off_display | ( | LCDC_Type * | ptr | ) |
| void lcdc_turn_on_display | ( | LCDC_Type * | ptr | ) |