API for using SignalProcessing.
More...
|
#define | ARM_MATH_CM4 |
|
#define | __FPU_PRESENT 1U |
|
|
enum | e_filterType { TYPE_LPF
, TYPE_HPF
, TYPE_BPF
, TYPE_BEF
} |
|
enum | IIRClass::e_format { IIRClass::Interleave
, IIRClass::Planar
} |
|
enum | IIRClass::e_error {
IIRClass::ERR_OK = 0
, IIRClass::ERR_CH_NUM = -1
, IIRClass::ERR_FORMAT = -2
, IIRClass::ERR_MEMORY = -3
,
IIRClass::ERR_FILTER_TYPE = -4
, IIRClass::ERR_FRAME_SIZE = -5
, IIRClass::ERR_BUF_FULL = -6
, IIRClass::ERR_FS = -7
} |
|
API for using SignalProcessing.
◆ e_filterType
Enumerator |
---|
TYPE_LPF | Low Pass Filter.
|
TYPE_HPF | High Pass Filter.
|
TYPE_BPF | Band Pass Filter.
|
TYPE_BEF | Band Elimination Filter.
|
◆ e_format
Enumerator |
---|
Interleave | the channel interleave format
|
Planar | the channel planar format
|
◆ e_error
Enumerator |
---|
ERR_OK | No error.
|
ERR_CH_NUM | Wrong channel setting.
|
ERR_FORMAT | Wrong output format setting.
|
ERR_MEMORY | Lack of memory area.
|
ERR_FILTER_TYPE | Wrong filter type setting.
|
ERR_FRAME_SIZE | Wrong number of samples.
|
ERR_BUF_FULL | Failture of write as buffer is full.
|
ERR_FS | Wrong sampling rate.
|
◆ begin()
bool IIRClass::begin |
( |
filterType_t |
type, |
|
|
int |
channel, |
|
|
int |
cutoff, |
|
|
float |
q, |
|
|
int |
sample = DEFAULT_FRAMESIZE , |
|
|
format_t |
output = Planar , |
|
|
int |
fs = 48000 |
|
) |
| |
Initialize the IIR library.
- Returns
- OK(true) or Failure(false)
This function is called only once when using the IIR library.
- Parameters
-
type | The execution filter type |
channel | The number of channels |
cutoff | The cutoff frequency(BPF/HPF) or the center frequency(BPF/BEF) |
q | The Q value(BPF/HPF) or the bandwidthoctave |
sample | The number of samples in an execution filter(default size is DEFAULT_FRAMESIZE) |
output | The output format(default is Planar) |
fs | The Sampling rate |
◆ put()
bool IIRClass::put |
( |
q15_t * |
pSrc, |
|
|
int |
size |
|
) |
| |
Put input data into the IIR library.
- Returns
- OK(true) or Failure(false)
Put input data into the IIR library. Multi-channel input data support interleave format.
- Parameters
-
pSrc | The pointer of input data address |
size | The number of input data sample |
◆ get() [1/2]
int IIRClass::get |
( |
q15_t * |
pDst, |
|
|
int |
channel |
|
) |
| |
Get the execution data of each channel.
- Returns
- The size of an execution data sample(Error code when negative numbers)
Get the execution data of each channel. This API can be called only for Planar format.
- Parameters
-
pDst | The pointer of area that output data is written |
channel | The each channel number of the execution data |
◆ get() [2/2]
int IIRClass::get |
( |
q15_t * |
pDsts | ) |
|
Get the execution data of all channels.
- Returns
- The size of execution data sample(Error code when negative numbers)
Get the execution data of all channels. This API can be called only for Interleave format.
- Parameters
-
pDsts | The pointer of area that output data is written |
◆ end()
Finalize the IIR library.
This function is called when you want to exit the IIR library.
◆ empty()
bool IIRClass::empty |
( |
int |
channel | ) |
|
Is the buffer empty or not of each channel.
- Returns
- Empty(true) or Not empty(false)
Is the buffer empty or not of each channel.
- Parameters
-
channel | The channel number that you want to check |
◆ getErrorCause()
error_t IIRClass::getErrorCause |
( |
| ) |
|
|
inline |
Get error information.
- Returns
- Error code[IIRClass::error_t]
When an error occurs, you call this function and get error cause information.
◆ BITLEN
const int IIRClass::BITLEN = 16 |
|
static |
The bit length definition (Only Support 16bit)
◆ DEFAULT_FRAMESIZE
const int IIRClass::DEFAULT_FRAMESIZE = 768 |
|
static |
The default number of samples in an execution frame
◆ MIN_FRAMESIZE
const int IIRClass::MIN_FRAMESIZE = 240 |
|
static |
The minimum number of samples in an execution frame
◆ MAX_CHANNEL_NUM
const int IIRClass::MAX_CHANNEL_NUM = 8 |
|
static |
The Maximum number of channels
◆ INPUT_BUFFER_SIZE
const int IIRClass::INPUT_BUFFER_SIZE = 4 |
|
static |
The size of input buffer (Multiple of frame size)