remove buffer used only in dump command

lever-ops
TT 6 years ago
parent 772e210ada
commit 47fec0b024

@ -21,8 +21,10 @@
#include <arm_math.h> #include <arm_math.h>
#include "nanovna.h" #include "nanovna.h"
#ifdef ENABLED_DUMP
int16_t samp_buf[SAMPLE_LEN]; int16_t samp_buf[SAMPLE_LEN];
int16_t ref_buf[SAMPLE_LEN]; int16_t ref_buf[SAMPLE_LEN];
#endif
const int16_t sincos_tbl[48][2] = { const int16_t sincos_tbl[48][2] = {
{ 10533, 31029 }, { 27246, 18205 }, { 32698, -2143 }, { 24636, -21605 }, { 10533, 31029 }, { 27246, 18205 }, { 32698, -2143 }, { 24636, -21605 },
@ -59,8 +61,10 @@ dsp_process(int16_t *capture, size_t length)
uint32_t sr = *p++; uint32_t sr = *p++;
int16_t ref = sr & 0xffff; int16_t ref = sr & 0xffff;
int16_t smp = (sr>>16) & 0xffff; int16_t smp = (sr>>16) & 0xffff;
#ifdef ENABLED_DUMP
ref_buf[i] = ref; ref_buf[i] = ref;
samp_buf[i] = smp; samp_buf[i] = smp;
#endif
int32_t s = sincos_tbl[i][0]; int32_t s = sincos_tbl[i][0];
int32_t c = sincos_tbl[i][1]; int32_t c = sincos_tbl[i][1];
samp_s += smp * s / 16; samp_s += smp * s / 16;

@ -100,8 +100,10 @@ extern int16_t rx_buffer[];
#define STATE_LEN 32 #define STATE_LEN 32
#define SAMPLE_LEN 48 #define SAMPLE_LEN 48
#ifdef ENABLED_DUMP
extern int16_t ref_buf[]; extern int16_t ref_buf[];
extern int16_t samp_buf[]; extern int16_t samp_buf[];
#endif
void dsp_process(int16_t *src, size_t len); void dsp_process(int16_t *src, size_t len);
void reset_dsp_accumerator(void); void reset_dsp_accumerator(void);

Loading…
Cancel
Save

Powered by TurnKey Linux.