Fix const errors when compiling for Cortex M0

pull/19/head
Torfinn Berset 7 years ago
parent 23765aeff4
commit db3a3ae6a5

@ -301,16 +301,16 @@ void arm_biquad_cascade_df1_q15(
/* Run the below code for Cortex-M0 */
q15_t *pIn = pSrc; /* Source pointer */
q15_t *pOut = pDst; /* Destination pointer */
q15_t b0, b1, b2, a1, a2; /* Filter coefficients */
q15_t Xn1, Xn2, Yn1, Yn2; /* Filter state variables */
q15_t Xn; /* temporary input */
q63_t acc; /* Accumulator */
int32_t shift = (15 - (int32_t) S->postShift); /* Post shift */
q15_t *pState = S->pState; /* State pointer */
const q15_t *pCoeffs = S->pCoeffs; /* Coefficient pointer */
uint32_t sample, stage = (uint32_t) S->numStages; /* Stage loop counter */
const q15_t *pIn = pSrc; /* Source pointer */
q15_t *pOut = pDst; /* Destination pointer */
q15_t b0, b1, b2, a1, a2; /* Filter coefficients */
q15_t Xn1, Xn2, Yn1, Yn2; /* Filter state variables */
q15_t Xn; /* temporary input */
q63_t acc; /* Accumulator */
int32_t shift = (15 - (int32_t) S->postShift); /* Post shift */
q15_t *pState = S->pState; /* State pointer */
const q15_t *pCoeffs = S->pCoeffs; /* Coefficient pointer */
uint32_t sample, stage = (uint32_t) S->numStages; /* Stage loop counter */
do
{

@ -476,7 +476,7 @@ void arm_fir_interpolate_f32(
float32_t *pState = S->pState; /* State pointer */
const float32_t *pCoeffs = S->pCoeffs; /* Coefficient pointer */
float32_t *pStateCurnt; /* Points to the current sample of the state */
float32_t *ptr1, *ptr2; /* Temporary pointers for state and coefficient buffers */
const float32_t *ptr1, *ptr2; /* Temporary pointers for state and coefficient buffers */
float32_t sum; /* Accumulator */

@ -431,7 +431,7 @@ void arm_fir_interpolate_q15(
ptr1 = pState;
/* Initialize coefficient pointer */
ptr2 = pCoeffs + (i - 1U);
ptr2 = (q15_t*) pCoeffs + (i - 1U);
/* Loop over the polyPhase length */
tapCnt = (uint32_t) phaseLen;

@ -428,7 +428,7 @@ void arm_fir_interpolate_q31(
ptr1 = pState;
/* Initialize coefficient pointer */
ptr2 = pCoeffs + (i - 1U);
ptr2 = (q31_t*) pCoeffs + (i - 1U);
tapCnt = phaseLen;

@ -262,9 +262,9 @@ void arm_fir_lattice_q31(
uint32_t blockSize)
{
q31_t *pState; /* State pointer */
const q31_t *pCoeffs = S->pCoeffs; /* Coefficient pointer */
const q31_t *px; /* temporary state pointer */
q31_t *pk; /* temporary coefficient pointer */
const q31_t *pCoeffs = S->pCoeffs; /* Coefficient pointer */
q31_t *px; /* temporary state pointer */
const q31_t *pk; /* temporary coefficient pointer */
q31_t fcurr, fnext, gcurr, gnext; /* temporary variables */
uint32_t numStages = S->numStages; /* Length of the filter */
uint32_t blkCnt, stageCnt; /* temporary variables for counts */

@ -342,7 +342,7 @@ void arm_iir_lattice_f32(
float32_t fcurr, fnext = 0, gcurr, gnext; /* Temporary variables for lattice stages */
float32_t acc; /* Accumlator */
uint32_t blkCnt, tapCnt; /* temporary variables for counts */
const float32_t *px1, *px2, *pk, *pv; /* temporary pointers for state and coef */
float32_t *px1, *px2, *pk, *pv; /* temporary pointers for state and coef */
uint32_t numStages = S->numStages; /* number of stages */
float32_t *pState; /* State pointer */
float32_t *pStateCurnt; /* State current pointer */

@ -357,7 +357,7 @@ void arm_iir_lattice_q15(
uint32_t stgCnt; /* Temporary variables for counts */
q63_t acc; /* Accumlator */
uint32_t blkCnt, tapCnt; /* Temporary variables for counts */
const q15_t *px1, *px2, *pk, *pv; /* temporary pointers for state and coef */
q15_t *px1, *px2, *pk, *pv; /* temporary pointers for state and coef */
uint32_t numStages = S->numStages; /* number of stages */
q15_t *pState; /* State pointer */
q15_t *pStateCurnt; /* State current pointer */

@ -175,7 +175,7 @@ void arm_lms_f32(
uint32_t blockSize)
{
float32_t *pState = S->pState; /* State pointer */
const float32_t *pCoeffs = S->pCoeffs; /* Coefficient pointer */
const float32_t *pCoeffs = S->pCoeffs; /* Coefficient pointer */
float32_t *pStateCurnt; /* Points to the current sample of the state */
float32_t *px, *pb; /* Temporary pointers for state and coefficient buffers */
float32_t mu = S->mu; /* Adaptive factor */
@ -347,7 +347,7 @@ void arm_lms_f32(
px = pState;
/* Initialize pCoeffs pointer */
pb = pCoeffs;
pb = (float32_t*) pCoeffs;
/* Set the accumulator to zero */
sum = 0.0f;
@ -379,7 +379,7 @@ void arm_lms_f32(
px = pState;
/* Initialize pCoeffs pointer */
pb = pCoeffs;
pb = (float32_t *) pCoeffs;
/* Loop over numTaps number of values */
tapCnt = numTaps;

@ -359,7 +359,7 @@ void arm_lms_norm_f32(
px = pState;
/* Initialize pCoeffs pointer */
pb = pCoeffs;
pb = (float32_t*) pCoeffs;
/* Read the sample from input buffer */
in = *pSrc++;
@ -399,7 +399,7 @@ void arm_lms_norm_f32(
px = pState;
/* Initialize pCcoeffs pointer */
pb = pCoeffs;
pb = (float32_t*) pCoeffs;
/* Loop over numTaps number of values */
tapCnt = numTaps;

@ -306,7 +306,7 @@ void arm_lms_norm_q15(
px = pState;
/* Initialize pCoeffs pointer */
pb = pCoeffs;
pb = (q15_t *) pCoeffs;
/* Read the sample from input buffer */
in = *pSrc++;
@ -370,7 +370,7 @@ void arm_lms_norm_q15(
px = pState;
/* Initialize coeff pointer */
pb = (pCoeffs);
pb = (q15_t *) (pCoeffs);
/* Loop over numTaps number of values */
tapCnt = numTaps;

@ -298,7 +298,7 @@ void arm_lms_norm_q31(
px = pState;
/* Initialize pCoeffs pointer */
pb = pCoeffs;
pb = (q31_t *) pCoeffs;
/* Read the sample from input buffer */
in = *pSrc++;
@ -358,7 +358,7 @@ void arm_lms_norm_q31(
px = pState;
/* Initialize coeff pointer */
pb = (pCoeffs);
pb = (q31_t *) (pCoeffs);
/* Loop over numTaps number of values */
tapCnt = numTaps;

@ -275,7 +275,7 @@ void arm_lms_q15(
px = pState;
/* Initialize pCoeffs pointer */
pb = pCoeffs;
pb = (q15_t *) pCoeffs;
/* Set the accumulator to zero */
acc = 0;
@ -320,7 +320,7 @@ void arm_lms_q15(
px = pState++;
/* Initialize pCoeffs pointer */
pb = pCoeffs;
pb = (q15_t *) pCoeffs;
/* Loop over numTaps number of values */
tapCnt = numTaps;

@ -267,7 +267,7 @@ void arm_lms_q31(
px = pState;
/* Initialize pCoeffs pointer */
pb = pCoeffs;
pb = (q31_t *) pCoeffs;
/* Set the accumulator to zero */
acc = 0;
@ -309,7 +309,7 @@ void arm_lms_q31(
px = pState++;
/* Initialize pCoeffs pointer */
pb = pCoeffs;
pb = (q31_t *) pCoeffs;
/* Loop over numTaps number of values */
tapCnt = numTaps;

@ -359,12 +359,12 @@ arm_status arm_mat_mult_q15(
/* Run the below code for Cortex-M0 */
const q15_t *pIn1 = pSrcA->pData; /* input data matrix pointer A */
const q15_t *pIn2 = pSrcB->pData; /* input data matrix pointer B */
const q15_t *pIn1 = pSrcA->pData; /* input data matrix pointer A */
const q15_t *pIn2 = pSrcB->pData; /* input data matrix pointer B */
q15_t *pInA = pSrcA->pData; /* input data matrix pointer A of Q15 type */
q15_t *pInB = pSrcB->pData; /* input data matrix pointer B of Q15 type */
q15_t *pOut = pDst->pData; /* output data matrix pointer */
const q15_t *px; /* Temporary output data matrix pointer */
q15_t *px; /* Temporary output data matrix pointer */
uint16_t numColsB = pSrcB->numCols; /* number of columns of input matrix B */
uint16_t numColsA = pSrcA->numCols; /* number of columns of input matrix A */
uint16_t numRowsA = pSrcA->numRows; /* number of rows of input matrix A */

Loading…
Cancel
Save