Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: unzen_sample_nucleo_f746 skeleton_unzen_nucleo_f746 ifmag_noise_canceller synthesizer_f746
Diff: firinterpolator.cpp
- Revision:
- 1:0a37bce4f985
- Child:
- 5:3d6cf4dbf458
diff -r 058daa59980d -r 0a37bce4f985 firinterpolator.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/firinterpolator.cpp Mon Jan 02 11:04:49 2017 +0000
@@ -0,0 +1,27 @@
+#include "amakusa.h"
+
+amakusa::FIRInterpolator::FIRInterpolator(uint16_t taps, float32_t *pCoeff, uint32_t blockSize, uint8_t L )
+ : AbstractFilter( blockSize )
+{
+ arm_fir_interpolate_init_f32(
+ &(this->state),
+ L,
+ taps,
+ pCoeff,
+ new float32_t[taps/L+blockSize-1],
+ blockSize);
+}
+
+amakusa::FIRInterpolator::~FIRInterpolator()
+{
+ delete [] this->state.pState;
+}
+void amakusa::FIRInterpolator::run( float32_t *pSrc, float32_t *pDst, uint32_t blockSize )
+{
+ arm_fir_interpolate_f32(
+ & this->state,
+ pSrc,
+ pDst,
+ blockSize ? blockSize : this->blockSize
+ );
+}
\ No newline at end of file