refactor(test): encapsulate FFT and DMA into unified module
This commit is contained in:
14
sdk/software/bsp/drivers/fft.c
Normal file
14
sdk/software/bsp/drivers/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);
|
||||
}
|
||||
Reference in New Issue
Block a user