RA Flexible Software Package Documentation
Release v5.6.0
|
|
Interface for CAPTURE functions.
The CAPTURE interface provides the functionality for capturing an image from an image sensor/camera. When a capture is complete a capture complete interrupt is triggered.
Data Structures | |
struct | capture_status_t |
struct | capture_callback_args_t |
struct | capture_cfg_t |
struct | capture_api_t |
struct | capture_instance_t |
Typedefs | |
typedef uint32_t | capture_event_t |
typedef void | capture_ctrl_t |
Enumerations | |
enum | capture_state_t |
struct capture_status_t |
CAPTURE status
Data Fields | ||
---|---|---|
capture_state_t | state | Current state. |
uint32_t * | p_buffer | Pointer to active buffer. |
uint32_t | data_size | Size of data written to provided buffer. |
struct capture_callback_args_t |
CAPTURE callback function parameter data
Data Fields | ||
---|---|---|
capture_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 capture_api_t::open function in capture_cfg_t. |
struct capture_cfg_t |
CAPTURE 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. | |
uint8_t | bytes_per_pixel |
Number of bytes per pixel. | |
void(* | p_callback )(capture_callback_args_t *p_args) |
Callback provided when a CAPTURE transfer ISR occurs. | |
void const * | p_context |
User defined context passed to callback function. | |
void const * | p_extend |
Extension parameter for hardware specific settings. | |
struct capture_api_t |
CAPTURE functions implemented at the HAL layer will follow this API.
Data Fields | |
fsp_err_t(* | open )(capture_ctrl_t *const p_ctrl, capture_cfg_t const *const p_cfg) |
fsp_err_t(* | close )(capture_ctrl_t *const p_ctrl) |
fsp_err_t(* | captureStart )(capture_ctrl_t *const p_ctrl, uint8_t *const p_buffer) |
fsp_err_t(* | callbackSet )(capture_ctrl_t *const p_ctrl, void(*p_callback)(capture_callback_args_t *), void const *const p_context, capture_callback_args_t *const p_callback_memory) |
fsp_err_t(* | statusGet )(capture_ctrl_t *const p_ctrl, capture_status_t *p_status) |
fsp_err_t(* capture_api_t::open) (capture_ctrl_t *const p_ctrl, capture_cfg_t const *const p_cfg) |
Initial configuration.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to pin configuration structure. |
fsp_err_t(* capture_api_t::close) (capture_ctrl_t *const p_ctrl) |
Closes the driver and allows reconfiguration. May reduce power consumption.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* capture_api_t::captureStart) (capture_ctrl_t *const p_ctrl, uint8_t *const p_buffer) |
Start a capture.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_buffer | New pointer to store captured image data. |
fsp_err_t(* capture_api_t::callbackSet) (capture_ctrl_t *const p_ctrl, void(*p_callback)(capture_callback_args_t *), void const *const p_context, capture_callback_args_t *const p_callback_memory) |
Specify callback function and optional context pointer and working memory pointer.
[in] | p_ctrl | Pointer to the CAPTURE control block. |
[in] | p_callback | Callback function |
[in] | p_context | Pointer to send to callback function |
[in] | p_working_memory | Pointer to volatile memory where callback structure can be allocated. Callback arguments allocated here are only valid during the callback. |
fsp_err_t(* capture_api_t::statusGet) (capture_ctrl_t *const p_ctrl, capture_status_t *p_status) |
Check scan status.
[in] | p_ctrl | Pointer to control handle structure |
[out] | p_status | Pointer to store current status in |
struct capture_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
capture_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
capture_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
capture_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef uint32_t capture_event_t |
CAPTURE callback event ID - see implimentation for details
typedef void capture_ctrl_t |
CAPTURE control block. Allocate an instance specific control block to pass into the CAPTURE API calls.
enum capture_state_t |