Remove all debug and printf
This commit is contained in:
14
sdk/software/examples/fft/fft.c
Normal file
14
sdk/software/examples/fft/fft.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "fft.h"
|
||||
#include "common_func.h"
|
||||
|
||||
void fft_start() {
|
||||
RegWrite(FFT_CSR_REG, FFT_CTRL_START);
|
||||
}
|
||||
|
||||
void fft_wait() {
|
||||
while ((RegRead(FFT_CSR_REG) & FFT_STAT_DONE) == 0) {}
|
||||
}
|
||||
|
||||
unsigned int fft_get_csr() {
|
||||
return RegRead(FFT_CSR_REG);
|
||||
}
|
||||
16
sdk/software/examples/fft/fft.h
Normal file
16
sdk/software/examples/fft/fft.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#define FFT_BASE 0xbf400000
|
||||
#define FFT_IN_RE_BASE (FFT_BASE + 0x1000)
|
||||
#define FFT_IN_IM_BASE (FFT_BASE + 0x2000)
|
||||
#define FFT_OUT_RE_BASE (FFT_BASE + 0x3000)
|
||||
#define FFT_OUT_IM_BASE (FFT_BASE + 0x4000)
|
||||
#define FFT_CSR_REG (FFT_BASE + 0xF000)
|
||||
#define FFT_CTRL_START (1 << 4)
|
||||
#define FFT_STAT_DONE (1 << 1)
|
||||
#define FFT_STAT_BUSY (1 << 0)
|
||||
#define FFT_POINT_NUM 1024
|
||||
|
||||
void fft_start();
|
||||
void fft_wait();
|
||||
unsigned int fft_get_csr();
|
||||
Reference in New Issue
Block a user