Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "arm_math.h"
00025
00058 arm_status arm_fir_decimate_init_f32(
00059 arm_fir_decimate_instance_f32 * S,
00060 uint16_t numTaps,
00061 uint8_t M,
00062 float32_t * pCoeffs,
00063 float32_t * pState,
00064 uint32_t blockSize)
00065 {
00066 arm_status status;
00067
00068
00069 if((blockSize % M) != 0u)
00070 {
00071
00072 status = ARM_MATH_LENGTH_ERROR;
00073 }
00074 else
00075 {
00076
00077 S->numTaps = numTaps;
00078
00079
00080 S->pCoeffs = pCoeffs;
00081
00082
00083 memset(pState, 0, (numTaps + (blockSize - 1u)) * sizeof(float32_t));
00084
00085
00086 S->pState = pState;
00087
00088
00089 S->M = M;
00090
00091 status = ARM_MATH_SUCCESS;
00092 }
00093
00094 return (status);
00095
00096 }
00097