DSP program for the Surfboard hardware (PCB to be open sourced) http://www.avbotz.com/ourauv/electrical/signal-processing/

Dependencies:   MODDMA SimpleIOMacros mbed-dsp mbed

Committer:
avbotz
Date:
Fri Aug 02 02:25:12 2013 +0000
Revision:
1:f69ec4c889ff
Parent:
0:2381a319fc35
Initial commit. Not working. MODDMA makes DMA setup slow, and the mbed SPI peripheral corrupts data sometimes. I will write my own SPI and DMA classes and see how it goes.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
avbotz 0:2381a319fc35 1 #ifndef DMA_H__
avbotz 0:2381a319fc35 2 #define DMA_H__
avbotz 0:2381a319fc35 3
avbotz 0:2381a319fc35 4 #include "mbed.h"
avbotz 0:2381a319fc35 5
avbotz 0:2381a319fc35 6 #include "IOMacros.h"
avbotz 0:2381a319fc35 7
avbotz 0:2381a319fc35 8 #include "surfboard.h"
avbotz 0:2381a319fc35 9 #include "hydro_dsp.h"
avbotz 0:2381a319fc35 10 #include "MODDMA_cache.h"
avbotz 0:2381a319fc35 11
avbotz 0:2381a319fc35 12 // TODO: check this value
avbotz 0:2381a319fc35 13 #define TARGET_SPS (105496 / 10) // samples per second
avbotz 0:2381a319fc35 14
avbotz 0:2381a319fc35 15 int setup_dma();
avbotz 0:2381a319fc35 16 void teardown_dma();
avbotz 0:2381a319fc35 17
avbotz 0:2381a319fc35 18 void event_irq_init();
avbotz 0:2381a319fc35 19
avbotz 0:2381a319fc35 20 void dma_error_cb();
avbotz 0:2381a319fc35 21 void get_data();
avbotz 0:2381a319fc35 22 void parse_data();
avbotz 0:2381a319fc35 23
avbotz 0:2381a319fc35 24 extern MODDMA_Cache dma;
avbotz 0:2381a319fc35 25 extern MODDMA_Config* dma_conf;
avbotz 0:2381a319fc35 26 //extern q15_t parsed[2][NUM_CHANNELS][BLOCK_SIZE];
avbotz 0:2381a319fc35 27 extern char parsed[2][NUM_CHANNELS][BLOCK_SIZE][3];
avbotz 0:2381a319fc35 28 extern char write_block;
avbotz 0:2381a319fc35 29 extern int buf_index;
avbotz 0:2381a319fc35 30 extern unsigned int read_blocks;
avbotz 0:2381a319fc35 31
avbotz 0:2381a319fc35 32 #endif