eIQ MPP Hardware Abstraction Layer API

MPP-HAL VERSION 3.3

Chapter 1

This is the documentation for the Hardware Abstraction Layer(HAL) API.

1.1 HAL overview

The hardware abstraction layer is used to abstract hardware and software components. With the usage of an HAL abstraction, the vision pipeline will be leveraging hardware accelerated components whenever possible.

  1. MPP hal description:

The HAL is presented with respect of the following points:

  • A common header file “hal.h” includes all hardware top level functions.

  • All hardware top level functions are using the prefix: “hal_ “.

  • For each platform all hal_ functions defined in hal.h should be implemented at least with an empty function.

Here is an overview:

Figure 1.1 HAL overview

  1. MPP HAL components:

  2. Source elements HAL

  • Camera

  • Static image

  1. processing elements HAL

  • Graphics driver

  • Vision algorithms

  • Labeled rectangle

  1. Sink elements HAL

  • Display

  1. Supported devices:

At present, the MPP HAL supports the following devices:

  • Cameras:

  • OV5640

  • MT9M114

  • OV7670

  • Displays:

  • RK055AHD091

  • RK055MHD091

  • RK043FN02H-CT

  • Mikroe TFT Proto 5(SSD1963 controller)

  • NXP’s LCD-PAR-S035 (ST7796S controller)

  • Graphics:

  • PXP

  • CPU

  • GPU

  1. Supported boards:

Currently, the MPP HAL supports the following boards:

  • (deprecated) evkmimxrt1170 is supported with the following devices:

    • Cameras: OV5640.

    • Displays: RK055AHD091 and RK055MHD091.

  • (deprecated) evkbimxrt1050 is supported with the following devices:

    • Cameras: MT9M114.

    • Displays: RK043FN02H-CT.

  • evkbmimxrt1170 is supported by porting the following devices:

    • Cameras: OV5640.

    • Displays: RK055AHD091 and RK055MHD091.

  • frdmmcxn947 is supported by porting the following devices:

    • Cameras: OV7670.

    • Displays: Mikroe TFT Proto 5” and NXP’s LCD-PAR-S035.

  • mimxrt700evk is supported by porting the following devices:

    • Cameras: OV7670.

    • Displays: RK055AHD091 and RK055MHD091.

How to port new boards/devices: The MPP Hal provides the flexibility to the user to port new boards and devices(cameras and displays).

Supporting new boards: To support a new board a new file hal_{board_name} should be added under the ‘hal’ directory.

Supporting new devices: The hal components that can support new devices are:

  • Cameras

  • Display

  • Graphics processing

A new device can simply be supported by:

  • Providing the approriate hal_{device_module} implementation.

  • Adding his name and setup entry point to the appropriate device list in the associated board hal_{board_name} file.

Enabling/Disabling Hal components and devices:

  • The HAL components can be enabled/disabled from “mpp_config.h” using the compilation flags(HAL_ENABLE_{component_name}).

  • The HAL devices can also be enabled/disabled from “mpp_config.h” using the compilation flags(HAL_ENABLE_{device_name}).

Chapter 2

  1. HAL Types

Data Structures

Macros

Typedefs

Enumerations

Functions

  1. Detailed Description

This section provides the detailed documentation for the MPP HAL types.

  1. Data Structure Documentation

  2. struct camera_dev_static_config_t

Structure that characterizes the camera device. Data Fields

int

height

buffer height

int

width

buffer width

int

pitch

buffer pitch

int

left

left position

int

top

top position

int

right

right position

int

bottom

bottom position

mpp_rotate_degree_t

rotate

rotate degree

mpp_flip_mode_t

flip

flip

int

swapByte

swap byte per two bytes

mpp_pixel_format_t

format

pixel format

int

framerate

frame rate

int

stripe_size

stripe size in bytes

bool

stripe

stripe mode

  1. struct camera_dev_private_capability_t

camera device private capability. Data Fields

camera_dev_callback_t

callback

callback

void ∗

param

parameter for the callback

  1. struct _camera_dev

Attributes of a camera device. hal camera device declaration.

Camera devices can enqueue and dequeue frames as well as react to events from input devices via the “input← Notify” function. Camera devices can use any number of interfaces, including MIPI and CSI as long as the HAL driver implements the necessary functions found in camera_dev_operator_t. Examples of camera devices include the Orbbec U1S 3D SLM camera module and the OnSemi MT9M114 camera module.

Data Fields

int

id

unique id which is assigned by camera manager during registration

char

name[HAL_DEVICE_NAME_MAX_L

ENGTHname of] the device

const camera_dev_operator_t

ops

operations

camera_dev_static_config_t

config

static configurations

camera_dev_private_capability_t

cap

private capability

  1. struct static_image_static_config_t

Structure that characterize the image element. Data Fields

int

height

buffer height

int

width

buffer width

int

left

left position

int

top

top position

int

right

right position

int

bottom

bottom position

mpp_pixel_format_t

format

pixel format

bool

stripe

stripe mode

  1. struct _static_image

Attributes of a an image element. Data Fields

int

id

unique id which is assigned by image manager

const static_image_operator_t

ops

operations

static_image_static_config_t

config

static configs

int

stripe_idx

the current stripe index

uint8_t ∗

buffer

static image buffer

  1. struct gfx_surface_t

Gfx surface parameters. Data Fields

int

height

buffer height

int

width

buffer width

Data Fields

int

pitch

buffer pitch

int

left

left position

int

top

top position

int

right

right position

int

bottom

bottom position

int

swapByte

swap byte per two bytes

mpp_pixel_format_t

format

pixel format

void ∗

buf

buffer

void ∗

lock

the structure is determined by hal and set to null if not use in hal

  1. struct gfx_rotate_config_t

gfx rotate configuration Data Fields

gfx_rotate_target_t

target

mpp_rotate_degree_t

degree

  1. struct _gfx_dev Data Fields

int

id

const gfx_dev_operator_t

ops

gfx_surface_t

src

gfx_surface_t

dst

mpp_callback_t

callback

void ∗

user_data

  1. struct hal_rect_t

rectangle positions. Data Fields

int

top

int

left

int

bottom

int

right

  1. struct model_param_t

Structure passed to HAL as description of the binary model provided by user.

Data Fields

Field Documentation model_data

const void∗ model_param_t::model_data pointer to model binary

model_size

int model_param_t::model_size model binary size

model_input_mean

float model_param_t::model_input_mean

model ‘mean’ of input values, used for normalization

model_input_std

float model_param_t::model_input_std

model ‘standard deviation’ of input values, used for normalization

inference_params

mpp_inference_params_t model_param_t::inference_params inference parameters

height

int model_param_t::height frame height

width

int model_param_t::width frame width

format

mpp_pixel_format_t model_param_t::format pixel format

inputType

mpp_tensor_type_t model_param_t::inputType input type

tensor_order

mpp_tensor_order_t model_param_t::tensor_order tensor order

evt_callback_f

int(∗ model_param_t::evt_callback_f) (mpp_t mpp, mpp_evt_t evt, void ∗evt_data, void ∗user_← data)

the callback to be called when model output is ready

cb_userdata

void∗ model_param_t::cb_userdata

pointer to user data, should be passed by callback

  1. struct valgo_dev_private_capability_t Valgo devices private capability.

    Data Fields

void ∗

param

param for the callback

  1. struct vision_frame_t

Characteristics that need to be defined by a vision algo. Data Fields

int

height

frame height

int

width

frame width

int

pitch

frame pitch

mpp_pixel_format_t

format

pixel format

void ∗

input_buf

pixel input buffer

  1. struct _vision_algo_dev

Attributes of a vision algo device. Data Fields

int

id

unique id which is assigned by algorithm manager during the registration

char

name[HAL_DEVICE_NAME_MAX_L

ENGTHname to] identify

valgo_dev_private_capability_t

cap

private capability

const vision_algo_dev_operator_t

ops

operations

vision_algo_private_data_t

priv_data

private data

  1. struct _display_dev_private_capability

Structure that characterizes the display device. Data Fields

int

height

buffer height

int

width

buffer width

int

pitch

buffer pitch

int

left

left position

int

top

top position

int

right

right position

int

bottom

bottom position

int

stripe_height

stripe height (0 if stripe mode is off)

bool

stripe

stripe mode

Data Fields

mpp_rotate_degree_t

rotate

rotate degree

mpp_pixel_format_t

format

pixel format

int

nbFrameBuffer

number of input buffers

void ∗∗

frameBuffers

array of pointers to frame buffer

mpp_callback_t

callback

callback

void ∗

user_data

parameter for the callback

  1. struct _display_dev

Attributes of a display device. hal display device declaration.

Display devices can be used to display images, GUI overlays, etc. Examples of display devices include display panels like the RK024hh298 display, and external displays like UVC (video over USB).

Data Fields

int

id

unique id which is assigned by the display manager during the registration

char

name[HAL_DEVICE_NAME_MAX_L

ENGTHname of] the device

const display_dev_operator_t

ops

operations

display_dev_private_capability_t

cap

private capability

  1. struct hw_buf_desc_t

the hardware specific buffer requirements Data Fields

int

stride

the number of bytes between 2 lines of image

int

nb_lines

the number of lines required (set to 0 if the element doesn’t require a specific number of lines)

int

alignment

alignment requirement in bytes

bool

cacheable

if true, HW will require cache maintenance

unsigned char ∗

addr

the aligned buffer address

unsigned char ∗

heap_p

pointer to the heap that should be freed

  1. struct hal_graphics_setup_t Data Fields

const char ∗ gfx_dev_name graphic_setup_func_t gfx_setup_func

  1. struct hal_display_setup_t Data Fields

const char ∗

display_name

display_setup_func_t

display_setup_func

  1. struct hal_camera_setup_t Data Fields

const char ∗

camera_name

camera_setup_func_t

camera_setup_func

  1. struct checksum_data_t

computed checksum Data Fields

checksum_type_t

type

checksum calculation method

uint32_t

value

checksum value

  1. Macro Definition Documentation

  2. HAL_GFX_DEV_CPU_NAME

#define HAL_GFX_DEV_CPU_NAME hal graphics (gfx) device declaration.

Graphics processing devices can be used to perform conversion from one image format to another, resize images and compose images on top of one another. Examples of graphics devices include the PXP (pixel pipeline) found on many i.MXRT series MCUs. Name of the graphic device using CPU operations

  1. GUI_PRINTF_BUF_SIZE [1/2]

#define GUI_PRINTF_BUF_SIZE Local text buffer size.

  1. GUI_PRINTF_BUF_SIZE [2/2]

#define GUI_PRINTF_BUF_SIZE Local text buffer size.

  1. MAX_INPUT_PORTS

#define MAX_INPUT_PORTS

HAL public types header.

maximum number of element inputs/outputs

  1. HAL_DEVICE_NAME_MAX_LENGTH

#define HAL_DEVICE_NAME_MAX_LENGTH maximum length of device name

  1. Typedef Documentation

  2. camera_dev_callback_t

typedef int(∗ camera_dev_callback_t) (const camera_dev_t ∗dev, camera_event_t event, void ∗param, uint8_t fromISR)

Callback function to notify camera manager that one frame is dequeued.

Parameters

dev

Device structure of the camera device calling this function

event

id of the event that took place

param

Parameters

fromISR

True if this operation takes place in an irq, 0 otherwise

Returns

0 if the operation was successfully

  1. mpp_callback_t

typedef int(∗ mpp_callback_t) (mpp_t mpp, mpp_evt_t evt, void ∗evt_data, void ∗user_data) The mpp callback function prototype.

  1. graphic_setup_func_t

typedef int(∗ graphic_setup_func_t) (gfx_dev_t ∗) graphics setup

  1. HAL Types 21**

  2. display_setup_func_t

typedef int(∗ display_setup_func_t) (display_dev_t ∗) display setup

  1. camera_setup_func_t

typedef int(∗ camera_setup_func_t) (const char ∗, camera_dev_t ∗) camera setup

  1. Enumeration Type Documentation

  2. hal_camera_status_t

enum hal_camera_status_t Camera return status. Enumerator

kStatus_HAL_CameraSuccess

HAL camera successful.

kStatus_HAL_CameraBusy

Camera is busy.

kStatus_HAL_CameraNonBlocking

Camera will return immediately.

kStatus_HAL_CameraError

Error occurs on HAL Camera.

  1. camera_event_t

enum camera_event_t

Type of events that are supported by calling the callback function. Enumerator

kCameraEvent_SendFrame

Camera new frame is available.

kCameraEvent_CameraDeviceInit

Camera device finished the initialization process.

  1. hal_image_status_t

enum hal_image_status_t static image return status

Enumerator

MPP_kStatus_HAL_ImageSuccess

Successfully.

MPP_kStatus_HAL_ImageError

Error occurs on HAL Image.

  1. gfx_rotate_target_t

enum gfx_rotate_target_t gfx rotate target

  1. hal_valgo_status_t

enum hal_valgo_status_t

Valgo Error codes for hal operations. Enumerator

kStatus_HAL_ValgoSuccess

Successfully.

kStatus_HAL_ValgoMallocError

memory allocation failed for HAL algorithm

kStatus_HAL_ValgoInitError

algorithm initialization error

kStatus_HAL_ValgoError

Error occurs in HAL algorithm

kStatus_HAL_ValgoStop

HAL algorithm stop

  1. display_event_t

enum display_event_t

Type of events that are supported by calling the callback function. Enumerator

kDisplayEvent_RequestFrame

Display finished sending the frame asynchronously, provide another frame.

  1. hal_display_status_t

enum hal_display_status_t Error codes for display hal devices. Enumerator

kStatus_HAL_DisplaySuccess

HAL display successful.

kStatus_HAL_DisplayTxBusy

Display tx is busy.

kStatus_HAL_DisplayNonBlocking

Display will return immediately.

MCU Media PrkStatus_HAL_Displaocessing Pipeline yError

Error occurs on HAL Display.

  1. HAL OPERATIONS 29**

  2. mpp_memory_policy_t

enum mpp_memory_policy_t

The memory allocation policy of an element’s hal.

During the pipeline construction, the HAL uses this enum to tell the pipeline if it already owns input/ouput buffers. Before the pipeline starts, the memory manager will map the existing buffers to elements and allocate missing buffers from the heap.

Enumerator

HAL_MEM_ALLOC_NONE

element requires buffers to be provided by other elements, or by the pipeline

HAL_MEM_ALLOC_INPUT

element allocates its input buffer, it may require output buffers to be provided by other elements, or by the pipeline

HAL_MEM_ALLOC_OUTPUT

element allocates its output buffer, it may require input buffers to be provided by other elements, or by the pipeline

HAL_MEM_ALLOC_BOTH

element allocates both its input and output buffers

  1. checksum_type_t

enum checksum_type_t checksum calculation method Enumerator

CHECKSUM_TYPE_PISANO

checksum computed using Pisano

CHECKSUM_TYPE_CRC_ELCDIF

checksum computed CRC from ELCDIF

  1. Function Documentation

  2. HAL_GfxDev_CPU_Register()

int HAL_GfxDev_CPU_Register (

gfx_dev_t ∗ dev )

Register the graphic device with the CPU operations. Parameters

in

dev

graphic device to register

Returns

error code (0: success, otherwise: failure)

  1. HAL_GfxDev_GPU_Register()

int HAL_GfxDev_GPU_Register (

gfx_dev_t ∗ dev )

Register the graphic device with the GPU operations. Parameters

in

dev

graphic device to register

Returns

error code (0: success, otherwise: failure)

  1. HAL OPERATIONS

Data Structures

Typedefs

  • typedef int(∗mpp_callback_t) (mpp_t mpp, mpp_evt_t evt, void ∗evt_data, void ∗user_data)

Functions

  • void GUI_DrawText (uint16_t ∗lcd_buf, uint16_t fcolor, uint16_t bcolor, uint32_t width, int x, int y, const char ∗label)

  • static void hal_draw_pixel565 (uint16_t ∗pDst, uint32_t x, uint32_t y, uint16_t color, uint32_t lcd_w)

  • static void hal_draw_text565 (uint16_t ∗lcd_buf, uint16_t fcolor, uint16_t bcolor, uint32_t width, int x, int y, const char ∗label, int stripe_top, int stripe_bottom)

  • static void hal_draw_rect565 (uint16_t ∗lcd_buf, hal_rect_t rect, mpp_color_t rgb, uint32_t width, int stripe← _top, int stripe_bottom)

  • static int get_bitpp (mpp_pixel_format_t type)

  • void swap_2_bytes (uint8_t ∗data, int size)

  1. Detailed Description

This section provides the detailed documentation for the MPP HAL operations that needs to be implemented for each component.

  1. Data Structure Documentation

  2. struct camera_dev_operator_t

Operation that needs to be implemented by a camera device.

Data Fields

Field Documentation init

hal_camera_status_t(∗ camera_dev_operator_t::init) (camera_dev_t ∗dev, mpp_camera_params_← t ∗config, camera_dev_callback_t callback, void ∗param)

initialize the dev deinit

hal_camera_status_t(∗ camera_dev_operator_t::deinit) (camera_dev_t ∗dev) deinitialize the dev

start

hal_camera_status_t(∗ camera_dev_operator_t::start) (const camera_dev_t ∗dev) start the dev

stop

hal_camera_status_t(∗ camera_dev_operator_t::stop) (const camera_dev_t ∗dev) stop the dev

enqueue

hal_camera_status_t(∗ camera_dev_operator_t::enqueue) (const camera_dev_t ∗dev, void ∗data) enqueue a buffer to the dev

dequeue

hal_camera_status_t(∗ camera_dev_operator_t::dequeue) (const camera_dev_t ∗dev, void ∗∗data, int ∗stripe)

dequeue a buffer from the dev (blocking) get_buf_desc

hal_camera_status_t(∗ camera_dev_operator_t::get_buf_desc) (const camera_dev_t ∗dev, hw_buf_desc_t ∗out_buf, mpp_memory_policy_t ∗policy)

get buffer descriptors and policy

  1. struct static_image_operator_t

Operation that needs to be implemented by an image element.

Data Fields

Field Documentation init

hal_image_status_t(∗ static_image_operator_t::init) (static_image_t ∗elt, mpp_img_params_← t ∗config, void ∗param)

initialize the elt dequeue

hal_image_status_t(∗ static_image_operator_t::dequeue) (static_image_t ∗elt, hw_buf_desc_t ∗out_buf, int ∗stripe_num)

dequeue a buffer from the elt

  1. struct gfx_dev_operator_t

Operation that needs to be implemented by gfx device.

Data Fields

  1. struct vision_algo_dev_operator_t

Operation that needs to be implemented by a vision algorithm device.

Data Fields

Field Documentation init

hal_valgo_status_t(∗ vision_algo_dev_operator_t::init) (vision_algo_dev_t ∗dev, model_param_t ∗param)

initialize the dev deinit

hal_valgo_status_t(∗ vision_algo_dev_operator_t::deinit) (vision_algo_dev_t ∗dev) deinitialize the dev

  1. HAL OPERATIONS 31**

run

hal_valgo_status_t(∗ vision_algo_dev_operator_t::run) (const vision_algo_dev_t ∗dev, void ∗data)

start the dev get_buf_desc

hal_valgo_status_t(∗ vision_algo_dev_operator_t::get_buf_desc) (const vision_algo_dev_t ∗dev, hw_buf_desc_t ∗in_buf, mpp_memory_policy_t ∗policy)

read input parameters

  1. struct display_dev_operator_t

Operation that needs to be implemented by a display device.

Data Fields

  1. HAL OPERATIONS

∗init )(display_dev_t ∗dev, mpp_display_params_t ∗config, mpp_callback_t callback, ∗deinit )(const display_dev_t ∗dev)

start )(display_dev_t ∗dev)

stop )(display_dev_t ∗dev)

blit )(const display_dev_t ∗dev, void ∗frame, int stripe)

∗get_buf_desc )(const display_dev_t ∗dev, hw_buf_desc_t ∗in_buf, mpp_memory_policy_t

  1. HAL OPERATIONS

Field Documentation init

hal_display_status_t(∗ display_dev_operator_t::init) (display_dev_t ∗dev, mpp_display_params_t ∗config, mpp_callback_t callback, void ∗user_data)

initialize the dev deinit

hal_display_status_t(∗ display_dev_operator_t::deinit) (const display_dev_t ∗dev) deinitialize the dev

start

hal_display_status_t(∗ display_dev_operator_t::start) (display_dev_t ∗dev) start the dev

stop

hal_display_status_t(∗ display_dev_operator_t::stop) (display_dev_t ∗dev) stop the dev

blit

hal_display_status_t(∗ display_dev_operator_t::blit) (const display_dev_t ∗dev, void ∗frame, int stripe)

blit a buffer to the dev get_buf_desc

hal_display_status_t(∗ display_dev_operator_t::get_buf_desc) (const display_dev_t ∗dev, hw_buf_desc_t ∗in_buf, mpp_memory_policy_t ∗policy)

get buffer descriptors and policy

  1. Typedef Documentation

3.2.3.1 mpp_callback_t

typedef int(∗ mpp_callback_t) (mpp_t mpp, mpp_evt_t evt, void ∗evt_data, void ∗user_data) The mpp callback function prototype.

  1. Function Documentation

  2. GUI_DrawText()

void GUI_DrawText (

uint16_t ∗ lcd_buf,

uint16_t fcolor,

uint16_t bcolor,

uint32_t width,

int x,

int y,

const char ∗ label )

Draws text stored in label pointer to LCD buffer.

This function copy content of data from label text buffer to the LCD. Parameters

lcd_buf

LCD buffer address destination for drawing text

fcolor

foreground color in rgb565 format

bcolor

background color in rgb565 format

width

LCD width

x

drawing position on X axe

y

drawing position on Y axe

  1. HAL OPERATIONS 35**

Returns

The return number of written chars to the buffer

  1. hal_draw_pixel565()

static void hal_draw_pixel565 (

uint16_t ∗ pDst,

uint32_t x,

uint32_t y,

uint16_t color,

uint32_t lcd_w ) [static] Draws pixel with RGB565 color to defined point. Parameters

pDst

image data address of destination buffer

x

drawing position on X axe

y

drawing position on Y axe

color

RGB565 encoded value

lcd← _w

lcd width

  1. hal_draw_text565()

static void hal_draw_text565 (

uint16_t ∗ lcd_buf,

uint16_t fcolor,

uint16_t bcolor,

uint32_t width,

int x,

int y,

const char ∗ label,

int stripe_top,

int stripe_bottom ) [static]

Draws text stored in label pointer to LCD buffer.

This function copy content of data from label text buffer to the LCD. Parameters

lcd_buf

LCD buffer address destination for drawing text

fcolor

foreground color in rgb565 format

bcolor

background color in rgb565 format

width

LCD width

x

drawing position on X axe

y

drawing position on Y axe

format

C string pointed by format

  1. HAL Setup Functions 41 Parameters

Returns

The return number of written chars to the buffer

  1. hal_draw_rect565()

static void hal_draw_rect565 (

uint16_t ∗ lcd_buf,

hal_rect_t rect,

mpp_color_t rgb,

uint32_t width,

int stripe_top,

int stripe_bottom ) [static]

Draws rectangle. Parameters

in

lcd_buf

LCD buffer address destination for drawing rectangle

in

color

background color in rgb565 format

in

x

drawing position on X axe

in

y

drawing position on Y axe

in

xsize

rectangle width

in

ysize

rectangle height

in

r

0-255 red color value

in

g

0-255 green color value

in

b

0-255 blue color value

in

width

LCD width

Returns

N/A

  1. **get_bitpp()**static int get_bitpp (

mpp_pixel_format_t type ) [static]

returns the number of bits per pixel per format, unknown format return 0

  1. **swap_2_bytes()**void swap_2_bytes (

uint8_t ∗ data,

int size )

Swaps a buffer’s MSB and LSB bytes.

data

pointer to the buffer to be converted(from little endian to big endian and vice-versa).

size

buffer size.

  1. HAL Setup Functions

Functions

  1. Detailed Description

This section provides the detailed documentation for the HAL setup functions that should be defined by each device.

  1. Function Documentation

  2. hal_label_rectangle()

int hal_label_rectangle (

uint8_t ∗ frame,

int width,

int height,

mpp_pixel_format_t format,

mpp_labeled_rect_t ∗ lr,

int stripe,

int stripe_max )

Implementation of hal labeled rectangle component that draws a rectangle and a text on an input image. Parameters

in

frame

The buffer address

in

width

Image width

in

height

Image height

in

format

Image format

in

lr

Labeled rectangle parameters

in

stripe

stripe number (0=no stripe)

in

stripe_max

max nb of stripes

Returns

0

  1. hal_inference_tflite_setup()

int hal_inference_tflite_setup (

vision_algo_dev_t ∗ dev )

Hal setup function for inference engine Tensorflow-Lite Micro. Parameters

in

dev

vision algo device to register

Returns

error code (0: success, otherwise: failure)

  1. **hal_display_setup()**int hal_display_setup (

const char ∗ name,

display_dev_t ∗ dev ) Register with a display device specified by name. If name is NULL, return error.

Parameters

in

name

display name

in

dev

display device to register

Returns

error code (0: success, otherwise: failure)

  1. **hal_camera_setup()**int hal_camera_setup (

const char ∗ name, camera_dev_t ∗ dev )

Register with a camera device specified by name. If name is NULL, return error.

in

name

camera name

in

dev

camera device to register

Returns

error code (0: success, otherwise: failure)

  1. **hal_gfx_setup()**int hal_gfx_setup (

const char ∗ name, gfx_dev_t ∗ dev )

Register with a graphic processing device specified by name.

If name is NULL, the first available graphic processing supported by Hw will be selected. The graphic device using CPU operations will be selected if name is not specified and if no graphic processing is available for the Hw.

Parameters

in

name

graphic processing device performing the image conversion

in

dev

graphic device to register

Returns

error code (0: success, otherwise: failure)