00001
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00067 #ifndef __DSP_SIGNAL_GENERATION_H__
00068 #define __DSP_SIGNAL_GENERATION_H__
00069
00070 #ifdef __AVR32_ABI_COMPILER__
00071
00098 dsp16_t dsp16_gen_sin(dsp16_t *vect1, int size, int f, int fs, dsp16_t phase);
00108 dsp32_t dsp32_gen_sin(dsp32_t *vect1, int size, int f, int fs, dsp32_t phase);
00109
00110
00137 dsp16_t dsp16_gen_cos(dsp16_t *vect1, int size, int f, int fs, dsp16_t phase);
00147 dsp32_t dsp32_gen_cos(dsp32_t *vect1, int size, int f, int fs, dsp32_t phase);
00148
00149
00171 void dsp16_gen_noise(dsp16_t *vect1, int size, dsp16_t amp);
00178 void dsp32_gen_noise(dsp32_t *vect1, int size, dsp32_t amp);
00179
00206 void dsp16_gen_rect(dsp16_t *vect1, int size, int f, int fs, dsp16_t duty, dsp16_t delay);
00218 void dsp32_gen_rect(dsp32_t *vect1, int size, int f, int fs, dsp32_t duty, dsp32_t delay);
00219
00244 inline static void dsp16_gen_sqr(dsp16_t *vect1, int size, int f, int fs, dsp16_t delay) { dsp16_gen_rect(vect1, size, f, fs, DSP16_Q(0.5), delay); }
00254 inline static void dsp32_gen_sqr(dsp32_t *vect1, int size, int f, int fs, dsp32_t delay) { dsp32_gen_rect(vect1, size, f, fs, DSP32_Q(0.5), delay); }
00255
00283 dsp16_t dsp16_gen_saw(dsp16_t *vect1, int size, int f, int fs, dsp16_t duty, dsp16_t delay);
00296 dsp32_t dsp32_gen_saw(dsp32_t *vect1, int size, int f, int fs, dsp32_t duty, dsp32_t delay);
00297
00322 void dsp16_gen_dcomb(dsp16_t *vect1, int size, int f, int fs, dsp16_t delay);
00332 void dsp32_gen_dcomb(dsp32_t *vect1, int size, int f, int fs, dsp32_t delay);
00333
00355 void dsp16_gen_ramp(dsp16_t *vect1, int size, dsp16_t increment);
00362 void dsp32_gen_ramp(dsp32_t *vect1, int size, dsp32_t increment);
00363
00386 void dsp16_gen_step(dsp16_t *vect1, int size, dsp16_t intial_value, dsp16_t final_value, int step_index);
00395 void dsp32_gen_step(dsp32_t *vect1, int size, dsp32_t intial_value, dsp32_t final_value, int step_index);
00396
00418 void dsp16_gen_dirac(dsp16_t *vect1, int size, int dirac_index);
00425 void dsp32_gen_dirac(dsp32_t *vect1, int size, int dirac_index);
00426
00427 #endif // __AVR32_ABI_COMPILER__
00428 #endif //__DSP_SIGNAL_GENERATION_H__
00429