Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
SnSigProcDataTable.h
- Committer:
- uci1
- Date:
- 2015-11-24
- Revision:
- 110:d1da040a0cf2
- Parent:
- 84:80b15993944e
- Child:
- 114:554fa3a956b4
File content as of revision 110:d1da040a0cf2:
#ifndef SN_SnSigProcDataTable #define SN_SnSigProcDataTable #include "SnPreCompOptions.h" #include <stdint.h> // use template specialization to cause a compiler // error if we change the number of samples in the future // and no appropriate data table is supplied template<int NSMP> struct SnSigProcDataTable { }; // save RAM by not implementing data tables that won't be used // (altho I guess they will be optimized away in any case) #if CHIPBOARD==SST4CH // hard code the number here because these tables are only valid for this value. // use kNsamps when instantiating it, though, so a compiler error will happen // if there's no data table for that number of samples. template<> struct SnSigProcDataTable<256> { // these are the pairs: (j, m) at each step of the loop over odd // values of i in DiscreteCpxFFT typedef uint8_t DfftDivideIndicies_t; // get away with only 8 bits for 256 samples static const DfftDivideIndicies_t kDfftDivideIndicies[256]; // these are the twidle factors: wr, wi used in DiscreteCpxFFT typedef float DfftTwidleFactor_t; static const DfftTwidleFactor_t kDfftTwidleFactors[254]; typedef float RealDfftTwidleFactor_t; static const RealDfftTwidleFactor_t kRealDfftTwidleFactor[126]; }; #endif #if CHIPBOARD==ATWD4CH // hard code the number here because these tables are only valid for this value. // use kNsamps when instantiating it, though, so a compiler error will happen // if there's no data table for that number of samples. template<> struct SnSigProcDataTable<128> { // these are the pairs: (j, m) at each step of the loop over odd // values of i in DiscreteCpxFFT typedef uint8_t DfftDivideIndicies_t; // get away with only 8 bits for 256 samples static const DfftDivideIndicies_t kDfftDivideIndicies[128]; // these are the twidle factors: wr, wi used in DiscreteCpxFFT typedef float DfftTwidleFactor_t; static const DfftTwidleFactor_t kDfftTwidleFactors[126]; typedef float RealDfftTwidleFactor_t; static const RealDfftTwidleFactor_t kRealDfftTwidleFactor[62]; }; #endif #endif // SnSigProcDataTable