RZ/A Flexible Software Package Documentation  Release v3.3.0

 
Camera Interface

Detailed Description

Interface for camera.

Summary

The Camera interface provides a general API for configuring and controlling camera panels.

Data Structures

struct  camera_status_t
 
struct  camera_callback_args_t
 
struct  camera_buffer_cfg_t
 
struct  cru_cfg_t
 
struct  cru_api_t
 
struct  camera_instance_t
 

Typedefs

typedef uint32_t camera_event_t
 
typedef void cru_ctrl_t
 

Enumerations

enum  camera_state_t
 

Data Structure Documentation

◆ camera_status_t

struct camera_status_t

CAMERA status

Data Fields
camera_state_t state Current state.
uint32_t * p_buffer Pointer to active buffer.
uint32_t data_size Size of data written at the end of one-frame capture.

◆ camera_callback_args_t

struct camera_callback_args_t

CAMERA callback function parameter data

Data Fields
camera_event_t event Event causing the callback.
uint8_t * p_buffer Pointer to buffer that contains captured data.
void const * p_context Placeholder for user data. Set in cru_api_t::open function in cru_cfg_t.

◆ camera_buffer_cfg_t

struct camera_buffer_cfg_t

Buffer addresses

Data Fields
uint8_t * pp_buffer[8] Pointer to array of buffer pointers.
uint8_t num_buffers Number of buffers to use.

◆ cru_cfg_t

struct cru_cfg_t

CRU configuration parameters.

Data Fields

uint16_t x_capture_start_pixel
 Horizontal position to start capture.
 
uint16_t x_capture_pixels
 Number of horizontal pixels to capture.
 
uint16_t y_capture_start_pixel
 Vertical position to start capture.
 
uint16_t y_capture_pixels
 Number of vertical lines/pixels to capture.
 
camera_buffer_cfg_t buffer_cfg
 Buffer Configuration.
 
void(* p_callback )(camera_callback_args_t *p_args)
 Callback provided when a image conversion ISR occurs.
 
void const * p_extend
 Placeholder for user data.
 

◆ cru_api_t

struct cru_api_t

CRU functions implemented at the HAL layer will follow this API.

Data Fields

fsp_err_t(* open )(cru_ctrl_t *const p_ctrl, cru_cfg_t const *const p_cfg)
 
fsp_err_t(* close )(cru_ctrl_t *const p_ctrl)
 
fsp_err_t(* captureStart )(cru_ctrl_t *const p_ctrl)
 
fsp_err_t(* captureStop )(cru_ctrl_t *const p_ctrl)
 
fsp_err_t(* statusGet )(cru_ctrl_t *const p_ctrl, camera_status_t *p_status)
 

Field Documentation

◆ open

fsp_err_t(* cru_api_t::open) (cru_ctrl_t *const p_ctrl, cru_cfg_t const *const p_cfg)

Initial configuration.

Note
To reconfigure after calling this function, call cru_api_t::close first.
Parameters
[in]p_ctrlPointer to control structure.
[in]p_cfgPointer to pin configuration structure.

◆ close

fsp_err_t(* cru_api_t::close) (cru_ctrl_t *const p_ctrl)

Closes the driver and allows reconfiguration. May reduce power consumption.

Parameters
[in]p_ctrlPointer to control structure.

◆ captureStart

fsp_err_t(* cru_api_t::captureStart) (cru_ctrl_t *const p_ctrl)

Start a capture.

Parameters
[in]p_ctrlPointer to control structure.

◆ captureStop

fsp_err_t(* cru_api_t::captureStop) (cru_ctrl_t *const p_ctrl)

Stop a capture

Parameters
[in]p_ctrlPointer to control structure.

◆ statusGet

fsp_err_t(* cru_api_t::statusGet) (cru_ctrl_t *const p_ctrl, camera_status_t *p_status)

Check scan status.

Parameters
[in]p_ctrlPointer to control handle structure
[out]p_statusPointer to store current status in

◆ camera_instance_t

struct camera_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
cru_ctrl_t * p_ctrl Pointer to the control structure for this instance.
cru_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
cru_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ camera_event_t

typedef uint32_t camera_event_t

CAMERA callback event - see implimentation

◆ cru_ctrl_t

typedef void cru_ctrl_t

CRU control block. Allocate an instance specific control block to pass into the CRU API calls.

Enumeration Type Documentation

◆ camera_state_t

CAMERA states.

Enumerator
CAMERA_STATE_IDLE 

CAMERA is idle.

CAMERA_STATE_IN_PROGRESS 

CAMERA capture in progress.

CAMERA_STATE_BUSY 

CAMERA reset in progress.