RA Flexible Software Package Documentation
Release v5.6.0
|
|
Interface for IIR filter functionality.
The IIR interface allows access to the IIRFA peripheral for hardware acceleration of direct form 2 transposed biquad IIR filters.
Data Structures | |
struct | iir_filter_coeffs_t |
struct | iir_filter_state_t |
struct | iir_filter_cfg_t |
struct | iir_status_t |
struct | iir_cfg_t |
struct | iir_api_t |
struct | iirfa_instance_t |
Typedefs | |
typedef void | iir_ctrl_t |
struct iir_filter_coeffs_t |
struct iir_filter_state_t |
struct iir_filter_cfg_t |
Filter configuration
Data Fields | ||
---|---|---|
iir_filter_coeffs_t * | p_filter_coeffs | Filter coefficients. |
iir_filter_state_t * | p_filter_state | Filter state data. |
uint8_t | stage_base | Hardware stage to start from. |
uint8_t | stage_num | Number of filter stages to use. |
struct iir_status_t |
Filter state register status
struct iir_cfg_t |
struct iir_api_t |
IIR driver structure. IIR functions implemented at the HAL layer follow this API.
Data Fields | |
fsp_err_t(* | open )(iir_ctrl_t *const p_ctrl, iir_cfg_t const *const p_cfg) |
fsp_err_t(* | close )(iir_ctrl_t *const p_ctrl) |
fsp_err_t(* | configure )(iir_ctrl_t *const p_ctrl, iir_filter_cfg_t const *const p_filter_cfg) |
fsp_err_t(* | filter )(iir_ctrl_t *const p_ctrl, float const *p_data_in, float *p_data_out, uint16_t const num_samples) |
fsp_err_t(* | statusGet )(iir_ctrl_t *const p_ctrl, iir_status_t *const p_status) |
fsp_err_t(* iir_api_t::open) (iir_ctrl_t *const p_ctrl, iir_cfg_t const *const p_cfg) |
Initial configuration.
[in] | p_ctrl | Pointer to control block. Must be declared by user. Elements set here. |
[in] | p_cfg | Pointer to configuration structure. All elements of this structure must be set by user. |
fsp_err_t(* iir_api_t::close) (iir_ctrl_t *const p_ctrl) |
Close the IIRFA channel.
[in] | p_ctrl | Control block set in iir_api_t::open. |
fsp_err_t(* iir_api_t::configure) (iir_ctrl_t *const p_ctrl, iir_filter_cfg_t const *const p_filter_cfg) |
Configure filter coefficients and state variables.
[in] | p_ctrl | Control block set in iir_api_t::open. |
[in] | p_filter_cfg | Pointer to filter configuration to write. |
fsp_err_t(* iir_api_t::filter) (iir_ctrl_t *const p_ctrl, float const *p_data_in, float *p_data_out, uint16_t const num_samples) |
Filter the specified data.
[in] | p_ctrl | Control block set in iir_api_t::open. |
[in] | p_data_in | Pointer to float input data. |
[in] | p_data_out | Pointer to float output buffer. |
[in] | num_samples | Number of samples to process. |
fsp_err_t(* iir_api_t::statusGet) (iir_ctrl_t *const p_ctrl, iir_status_t *const p_status) |
Retrieve current status (including state registers).
[in] | p_ctrl | Control block set in iir_api_t::open. |
[in] | p_status | Pointer to status struct. |
struct iirfa_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
iir_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
iir_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
iir_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void iir_ctrl_t |
IIR control block. Allocate an instance specific control block to pass into the DAC API calls.