思澈科技软件开发工具包  2.20

EPIC HAL module driver. More...

Modules

 EPIC Output Color Mode
 
 EPIC Input Color Mode
 

Data Structures

struct  EPIC_InitTypeDef
 EPIC Init structure definition. More...
 
struct  EPIC_TransformCfgTypeDef
 
struct  EPIC_YUVCfgTypeDef
 
struct  EPIC_BlendingDataType
 HAL EPIC Blend layer structures definition. More...
 
struct  EPIC_LayerConfigTypeDef
 
struct  EPIC_FillingCfgTypeDef
 
union  EPIC_ColorDef
 
struct  EPIC_GradCfgTypeDef
 
union  EPIC_OpParamTypeDef
 
struct  EPIC_OpHistItemTypeDef
 
struct  EPIC_OpHistTypeDef
 
struct  EPIC_ContModeTypeDef
 
struct  EPIC_TransModeTypeDef
 
struct  __EPIC_HandleTypeDef
 

Macros

#define EPIC_DEBUG
 
#define MAX_EPIC_LAYER   4U
 
#define EPIC_COLOR_RGB565   (0)
 
#define EPIC_COLOR_ARGB8565   (1)
 
#define EPIC_COLOR_RGB888   (2)
 
#define EPIC_COLOR_ARGB8888   (3)
 
#define EPIC_COLOR_L8   (4)
 
#define EPIC_COLOR_A8   (5)
 
#define EPIC_COLOR_A4   (6)
 
#define EPIC_COLOR_A2   (7)
 
#define EPIC_COLOR_MONO   (8)
 
#define EPIC_COLOR_EZIP_FLAG   (0x80)
 
#define EPIC_COLOR_EZIP   (0x81)
 
#define EPIC_COLOR_YUV_FLAG   (0x100)
 
#define EPIC_COLOR_YUV422_PACKED_YUYV   (0x101)
 
#define EPIC_COLOR_YUV422_PACKED_UYVY   (0x102)
 
#define EPIC_COLOR_YUV420_PLANAR   (0x103)
 
#define EPIC_SUPPROT_OUT_FORMAT(cf)
 
#define EPIC_LAYER_OPAQUE   (0xFF)
 
#define EPIC_MAX_LOOKUP_TABLE_CNT   (256)
 
#define EPIC_LOOKUP_TABLE_SIZE   (EPIC_MAX_LOOKUP_TABLE_CNT*4)
 
#define EPIC_IS_EZIP_COLOR_MODE(c)   (EPIC_COLOR_EZIP_FLAG == (EPIC_COLOR_EZIP_FLAG&(c)))
 
#define EPIC_IS_YUV_COLOR_MODE(c)   (EPIC_COLOR_YUV_FLAG == (EPIC_COLOR_YUV_FLAG&(c)))
 
#define EPIC_TO_INT32_COORD(INT16, FRAC16)   ((int32_t) ((((int32_t) (INT16)&0xFFFF) << 16) | ((FRAC16)&0xFFFF)))
 
#define EPIC_INT32_COORD_GET_INT16(_INT32_)   ((int16_t) ((_INT32_) >> 16))
 
#define EPIC_INT32_COORD_GET_FRAC16(_INT32_)   ((uint16_t) ((_INT32_)&0xFFFF))
 
#define EPIC_INPUT_SCALE_NONE   (1000)
 
#define EPIC_SIN_COS_FRAC_BIT   (15)
 
#define EPIC_OP_HIST_DEPTH   (4)
 

Typedefs

typedef int16_t(* EPIC_TransPath) (int16_t cur, EPIC_LayerConfigTypeDef *pTransLayer, void *user_data)
 
typedef struct __EPIC_HandleTypeDef EPIC_HandleTypeDef
 

Enumerations

enum  HAL_EPIC_StateTypeDef {
  HAL_EPIC_STATE_RESET = 0x00U,
  HAL_EPIC_STATE_READY = 0x01U,
  HAL_EPIC_STATE_BUSY = 0x02U,
  HAL_EPIC_STATE_TIMEOUT = 0x03U,
  HAL_EPIC_STATE_ERROR = 0x04U,
  HAL_EPIC_STATE_SUSPEND = 0x05U
}
 HAL EPIC State structures definition. More...
 
enum  Alpha_BlendTypeDef {
  ALPHA_BLEND_INVALID = 0x00U,
  ALPHA_BLEND_RGBCOLOR = 0x00U,
  ALPHA_BLEND_MASK = 0x01U,
  ALPHA_BLEND_OVERWRITE = 0x02U
}
 The blending behaviors of EPIC A4/A8 layer. More...
 
enum  EPIC_OpTypeDef {
  EPIC_OP_ROTATION,
  EPIC_OP_BLENDING,
  EPIC_OP_FILLING,
  EPIC_OP_FillGrad,
  EPIC_OP_BLENDING_EX,
  EPIC_OP_COPY,
  EPIC_OP_CONT_BLENDING,
  EPIC_OP_CONT_BLENDING_REPEAT,
  EPIC_OP_TRANSFORM
}
 
enum  EPIC_ApiEnumType {
  EPIC_API_NORMAL = 0,
  EPIC_API_CONTINUE,
  EPIC_API_TRANSFORM
}
 

Functions

HAL_StatusTypeDef HAL_EPIC_Init (EPIC_HandleTypeDef *epic)
 EPIC Init. More...
 
void HAL_EPIC_BlendDataInit (EPIC_BlendingDataType *layer)
 Init an epic blend struct to default vaules. More...
 
HAL_StatusTypeDef HAL_EPIC_BlendStart (EPIC_HandleTypeDef *epic, EPIC_BlendingDataType *fg, EPIC_BlendingDataType *bg, EPIC_BlendingDataType *dst, uint8_t alpha)
 Start blending in polling mode. More...
 
HAL_StatusTypeDef HAL_EPIC_BlendStart_IT (EPIC_HandleTypeDef *epic, EPIC_BlendingDataType *fg, EPIC_BlendingDataType *bg, EPIC_BlendingDataType *dst, uint8_t alpha)
 Start blending in interrupt mode. More...
 
void HAL_EPIC_RotDataInit (EPIC_TransformCfgTypeDef *rot_cfg)
 Init an epic rotate cfg struct to default vaules. More...
 
HAL_StatusTypeDef HAL_EPIC_Rotate (EPIC_HandleTypeDef *epic, EPIC_TransformCfgTypeDef *rot_cfg, EPIC_BlendingDataType *fg, EPIC_BlendingDataType *bg, EPIC_BlendingDataType *dst, uint8_t alpha)
 Rotate and scale src1 based on the image center, blend with bg and output to dst in polling mode. More...
 
HAL_StatusTypeDef HAL_EPIC_Rotate_IT (EPIC_HandleTypeDef *epic, EPIC_TransformCfgTypeDef *rot_cfg, EPIC_BlendingDataType *fg, EPIC_BlendingDataType *bg, EPIC_BlendingDataType *dst, uint8_t alpha)
 Rotate and scale src1 based on the image center, blend with bg and output to dst in interrupt mode. More...
 
void HAL_EPIC_FillDataInit (EPIC_FillingCfgTypeDef *param)
 Init an epic fill cfg struct to default vaules. More...
 
HAL_StatusTypeDef HAL_EPIC_FillStart_IT (EPIC_HandleTypeDef *epic, EPIC_FillingCfgTypeDef *param)
 Fill the region with given color in interrupt mode. More...
 
HAL_StatusTypeDef HAL_EPIC_FillStart (EPIC_HandleTypeDef *epic, EPIC_FillingCfgTypeDef *param)
 Fill the region with given color in polling mode. More...
 
HAL_StatusTypeDef HAL_EPIC_Copy_IT (EPIC_HandleTypeDef *epic, EPIC_BlendingDataType *src, EPIC_BlendingDataType *dst)
 Copy src data buffer to dst. More...
 
void HAL_EPIC_FillGradDataInit (EPIC_GradCfgTypeDef *param)
 Init an epic fill grad cfg struct to default vaules. More...
 
HAL_StatusTypeDef HAL_EPIC_FillGrad_IT (EPIC_HandleTypeDef *epic, EPIC_GradCfgTypeDef *param)
 
HAL_StatusTypeDef HAL_EPIC_FillGrad (EPIC_HandleTypeDef *epic, EPIC_GradCfgTypeDef *param)
 
void HAL_EPIC_LayerConfigInit (EPIC_LayerConfigTypeDef *layer)
 Init an epic layer config struct to default values. More...
 
HAL_StatusTypeDef HAL_EPIC_BlendStartEx (EPIC_HandleTypeDef *epic, EPIC_LayerConfigTypeDef *input_layer, uint8_t input_layer_num, EPIC_LayerConfigTypeDef *output_layer)
 
HAL_StatusTypeDef HAL_EPIC_BlendStartEx_IT (EPIC_HandleTypeDef *epic, EPIC_LayerConfigTypeDef *input_layer, uint8_t input_layer_num, EPIC_LayerConfigTypeDef *output_layer)
 
void HAL_EPIC_IRQHandler (EPIC_HandleTypeDef *epic)
 EPIC IRQ Handler. More...
 
HAL_StatusTypeDef HAL_EPIC_ContBlendStart (EPIC_HandleTypeDef *hepic, EPIC_LayerConfigTypeDef *input_layer, EPIC_LayerConfigTypeDef *mask_layer, EPIC_LayerConfigTypeDef *output_layer)
 
HAL_StatusTypeDef HAL_EPIC_ContBlendRepeat (EPIC_HandleTypeDef *hepic, EPIC_LayerConfigTypeDef *cont_layer, EPIC_LayerConfigTypeDef *mask_layer, EPIC_LayerConfigTypeDef *output_layer)
 
HAL_StatusTypeDef HAL_EPIC_ContBlendStop (EPIC_HandleTypeDef *hepic)
 
HAL_StatusTypeDef HAL_EPIC_TransStart (EPIC_HandleTypeDef *hepic, EPIC_LayerConfigTypeDef *input_layer, uint8_t input_layer_num, EPIC_LayerConfigTypeDef *output_layer, EPIC_TransPath hor_path, EPIC_TransPath ver_path, void *user_data)
 

Detailed Description

EPIC HAL module driver.

Macro Definition Documentation

◆ EPIC_COLOR_A2

#define EPIC_COLOR_A2   (7)

A2 color format

◆ EPIC_COLOR_A4

#define EPIC_COLOR_A4   (6)

A4 color format

◆ EPIC_COLOR_A8

#define EPIC_COLOR_A8   (5)

A8 color format

◆ EPIC_COLOR_ARGB8565

#define EPIC_COLOR_ARGB8565   (1)

ARGB8565 color format

◆ EPIC_COLOR_ARGB8888

#define EPIC_COLOR_ARGB8888   (3)

ARGB8888 color format

◆ EPIC_COLOR_EZIP

#define EPIC_COLOR_EZIP   (0x81)

EZIP color format

◆ EPIC_COLOR_EZIP_FLAG

#define EPIC_COLOR_EZIP_FLAG   (0x80)

EZIP color format flag, supported after A0

◆ EPIC_COLOR_L8

#define EPIC_COLOR_L8   (4)

L8 color format

◆ EPIC_COLOR_MONO

#define EPIC_COLOR_MONO   (8)

Monochrome color format

◆ EPIC_COLOR_RGB565

#define EPIC_COLOR_RGB565   (0)

RGB565 color format

◆ EPIC_COLOR_RGB888

#define EPIC_COLOR_RGB888   (2)

RGB888 color format

◆ EPIC_COLOR_YUV420_PLANAR

#define EPIC_COLOR_YUV420_PLANAR   (0x103)

iYUV

◆ EPIC_COLOR_YUV422_PACKED_UYVY

#define EPIC_COLOR_YUV422_PACKED_UYVY   (0x102)

UYUV

◆ EPIC_COLOR_YUV422_PACKED_YUYV

#define EPIC_COLOR_YUV422_PACKED_YUYV   (0x101)

YUYV

◆ EPIC_COLOR_YUV_FLAG

#define EPIC_COLOR_YUV_FLAG   (0x100)

YUV format example:

  1. YUV422_PACKED_YUYV: YUYV_YUYV_YUYV_..._YUYV
  2. YUV420_PLANAR(YUV420P): YYYY_YYYY_YYYY_..._YYYY U_U_U_..._U V_V_V_..._V
  3. YUV420_SEMI_PLANAR(YUV420SP): YYYY_YYYY_YYYY_..._YYYY UV_UV_UV_..._UV

◆ EPIC_LOOKUP_TABLE_SIZE

#define EPIC_LOOKUP_TABLE_SIZE   (EPIC_MAX_LOOKUP_TABLE_CNT*4)

In bytes

◆ EPIC_MAX_LOOKUP_TABLE_CNT

#define EPIC_MAX_LOOKUP_TABLE_CNT   (256)

Maximum lookup table color numbers

◆ EPIC_SUPPROT_OUT_FORMAT

#define EPIC_SUPPROT_OUT_FORMAT (   cf)
Value:
((EPIC_OUTPUT_RGB565 == (cf)) || (EPIC_OUTPUT_ARGB8565 == (cf)) \
|| (EPIC_OUTPUT_RGB888 == (cf)) || (EPIC_OUTPUT_ARGB8888 == (cf)))

Typedef Documentation

◆ EPIC_HandleTypeDef

EPIC handle structure definition

Enumeration Type Documentation

◆ Alpha_BlendTypeDef

The blending behaviors of EPIC A4/A8 layer.

Enumerator
ALPHA_BLEND_INVALID 

Invalid

ALPHA_BLEND_RGBCOLOR 

Append a fixed RGB color to be an ARGB layer

ALPHA_BLEND_MASK 

Alpha mask - Multiply with background's alpha

ALPHA_BLEND_OVERWRITE 

Replace the background's alpha

◆ EPIC_ApiEnumType

Enumerator
EPIC_API_CONTINUE 

Continues mode

◆ HAL_EPIC_StateTypeDef

HAL EPIC State structures definition.

Enumerator
HAL_EPIC_STATE_RESET 

EPIC not yet initialized or disabled

HAL_EPIC_STATE_READY 

Peripheral Initialized and ready for use

HAL_EPIC_STATE_BUSY 

An internal process is ongoing

HAL_EPIC_STATE_TIMEOUT 

Timeout state

HAL_EPIC_STATE_ERROR 

EPIC state error

HAL_EPIC_STATE_SUSPEND 

EPIC process is suspended

Function Documentation

◆ HAL_EPIC_BlendDataInit()

void HAL_EPIC_BlendDataInit ( EPIC_BlendingDataType layer)

Init an epic blend struct to default vaules.

Parameters
[layer]EPIC layer
Return values
None

◆ HAL_EPIC_BlendStart()

HAL_StatusTypeDef HAL_EPIC_BlendStart ( EPIC_HandleTypeDef epic,
EPIC_BlendingDataType fg,
EPIC_BlendingDataType bg,
EPIC_BlendingDataType dst,
uint8_t  alpha 
)

Start blending in polling mode.

Parameters
[in]epicEPIC handle
[in]fgforeground layer configuration
[in]bgbackground layer configuration
[in]dstoutput layer configuration
[in]alphaalpha value
Return values
HALstatus

◆ HAL_EPIC_BlendStart_IT()

HAL_StatusTypeDef HAL_EPIC_BlendStart_IT ( EPIC_HandleTypeDef epic,
EPIC_BlendingDataType fg,
EPIC_BlendingDataType bg,
EPIC_BlendingDataType dst,
uint8_t  alpha 
)

Start blending in interrupt mode.

Parameters
[in]epicEPIC handle
[in]fgforeground layer configuration
[in]bgbackground layer configuration
[in]dstoutput layer configuration
[in]alphaalpha value
Return values
HALstatus

◆ HAL_EPIC_BlendStartEx()

HAL_StatusTypeDef HAL_EPIC_BlendStartEx ( EPIC_HandleTypeDef epic,
EPIC_LayerConfigTypeDef input_layer,
uint8_t  input_layer_num,
EPIC_LayerConfigTypeDef output_layer 
)

input_layer[0]: bottom layer, input_layer[1] is on top of input_layer[0] input_layer[2] is on top of input_layer[1], ...

and mask layer will apply to the layer(1 layer only) under it.

◆ HAL_EPIC_BlendStartEx_IT()

HAL_StatusTypeDef HAL_EPIC_BlendStartEx_IT ( EPIC_HandleTypeDef epic,
EPIC_LayerConfigTypeDef input_layer,
uint8_t  input_layer_num,
EPIC_LayerConfigTypeDef output_layer 
)

input_layer[0]: bottom layer, input_layer[1] is on top of input_layer[0] input_layer[2] is on top of input_layer[1], ...

and mask layer will apply to the layer(1 layer only) under it.

◆ HAL_EPIC_Copy_IT()

HAL_StatusTypeDef HAL_EPIC_Copy_IT ( EPIC_HandleTypeDef epic,
EPIC_BlendingDataType src,
EPIC_BlendingDataType dst 
)

Copy src data buffer to dst.

Parameters
[in]epicEPIC handle
[in]srcsrc layer configuration
[in]dstdst layer configuration
Return values
HALstatus

◆ HAL_EPIC_FillDataInit()

void HAL_EPIC_FillDataInit ( EPIC_FillingCfgTypeDef param)

Init an epic fill cfg struct to default vaules.

Parameters
paramEPIC fill configuration parameter
Return values
None

◆ HAL_EPIC_FillGradDataInit()

void HAL_EPIC_FillGradDataInit ( EPIC_GradCfgTypeDef param)

Init an epic fill grad cfg struct to default vaules.

Parameters
paramEPIC fill grad configuration parameter
Return values
None

◆ HAL_EPIC_FillStart()

HAL_StatusTypeDef HAL_EPIC_FillStart ( EPIC_HandleTypeDef epic,
EPIC_FillingCfgTypeDef param 
)

Fill the region with given color in polling mode.

if alpha is used, filling color would be blended with original color in the buffer output_color = alpha * filling_color + (255 - alpha) * original_color

Parameters
[in]epicEPIC handle
[in]paramfilling region configuration
Return values
HALstatus

◆ HAL_EPIC_FillStart_IT()

HAL_StatusTypeDef HAL_EPIC_FillStart_IT ( EPIC_HandleTypeDef epic,
EPIC_FillingCfgTypeDef param 
)

Fill the region with given color in interrupt mode.

if alpha is used, filling color would be blended with original color in the buffer output_color = alpha * filling_color + (255 - alpha) * original_color

Parameters
[in]epicEPIC handle
[in]paramfilling region configuration
Return values
HALstatus

◆ HAL_EPIC_Init()

HAL_StatusTypeDef HAL_EPIC_Init ( EPIC_HandleTypeDef epic)

EPIC Init.

Parameters
[in]epicEPIC handle
Return values
HALstatus

◆ HAL_EPIC_IRQHandler()

void HAL_EPIC_IRQHandler ( EPIC_HandleTypeDef epic)

EPIC IRQ Handler.

Parameters
epicEPIC handle
Return values
None

◆ HAL_EPIC_LayerConfigInit()

void HAL_EPIC_LayerConfigInit ( EPIC_LayerConfigTypeDef layer)

Init an epic layer config struct to default values.

Parameters
layerEPIC layer
Return values
None

◆ HAL_EPIC_Rotate()

HAL_StatusTypeDef HAL_EPIC_Rotate ( EPIC_HandleTypeDef epic,
EPIC_TransformCfgTypeDef rot_cfg,
EPIC_BlendingDataType fg,
EPIC_BlendingDataType bg,
EPIC_BlendingDataType dst,
uint8_t  alpha 
)

Rotate and scale src1 based on the image center, blend with bg and output to dst in polling mode.

Parameters
[in]epicEPIC handle
[in]rot_cfgrotation configuration
[in]fgconfiguration of foreground layer that's to be rotated
[in]bgbackground layer configuration
[in]dstoutput layer configuration
[in]alphaalpha value for the fg.
Return values
HALstatus
Note
fields in fg, bg and dst would be modified

◆ HAL_EPIC_Rotate_IT()

HAL_StatusTypeDef HAL_EPIC_Rotate_IT ( EPIC_HandleTypeDef epic,
EPIC_TransformCfgTypeDef rot_cfg,
EPIC_BlendingDataType fg,
EPIC_BlendingDataType bg,
EPIC_BlendingDataType dst,
uint8_t  alpha 
)

Rotate and scale src1 based on the image center, blend with bg and output to dst in interrupt mode.

Parameters
[in]epicEPIC handle
[in]rot_cfgrotation configuration
[in]fgconfiguration of foreground layer that's to be rotated
[in]bgbackground layer configuration
[in]dstoutput layer configuration
[in]alphaalpha value
Return values
HALstatus
Note
fields in fg, bg and dst would be modified

◆ HAL_EPIC_RotDataInit()

void HAL_EPIC_RotDataInit ( EPIC_TransformCfgTypeDef rot_cfg)

Init an epic rotate cfg struct to default vaules.

Parameters
rot_cfgEPIC rotation configuration parameter
Return values
None
EPIC_OUTPUT_ARGB8565
#define EPIC_OUTPUT_ARGB8565
Definition: bf0_hal_epic.h:137
EPIC_OUTPUT_RGB888
#define EPIC_OUTPUT_RGB888
Definition: bf0_hal_epic.h:138
EPIC_OUTPUT_ARGB8888
#define EPIC_OUTPUT_ARGB8888
Definition: bf0_hal_epic.h:139
EPIC_OUTPUT_RGB565
#define EPIC_OUTPUT_RGB565
Definition: bf0_hal_epic.h:136