Studentenversion des ESY6/A Praktikums "signal_processing".
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

taskTests.cc 2.1KB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #include "taskTests.h"
  2. #include "../../software/signal_processing/system/data_channel.h"
  3. #include "../../software/signal_processing/system/binding.h"
  4. #include "../../software/signal_processing/system/task_sine.h"
  5. #include "../../software/signal_processing/system/task_rand.h"
  6. #include "../../software/signal_processing/system/task_add.h"
  7. #include "../../software/signal_processing/system/task_fft.h"
  8. #include "../../software/signal_processing/system/task_crc.h"
  9. #include "../../software/signal_processing/system/sine_config.h"
  10. #include "../../software/signal_processing/system/rand_config.h"
  11. #include "../../software/signal_processing/system/add_config.h"
  12. #include "../../software/signal_processing/system/fft_config.h"
  13. #include "../../software/signal_processing/system/crc_config.h"
  14. #include "../../software/signal_processing_bsp/system.h"
  15. #include <cmath>
  16. void configureAndRunSine() {
  17. DataChannelBinding binding = { BINDING_HW, BINDING_HW };
  18. data_channel_bind( DATA_CHANNEL_0_BASE, & binding );
  19. task_sine_run( & SINE_CONFIG );
  20. }
  21. void configureAndRunCosine() {
  22. DataChannelBinding binding = { BINDING_HW, BINDING_HW };
  23. data_channel_bind( DATA_CHANNEL_1_BASE, & binding );
  24. task_sine_run( & COSINE_CONFIG );
  25. }
  26. void configureAndRunRand() {
  27. DataChannelBinding binding = { BINDING_HW, BINDING_HW };
  28. data_channel_bind( DATA_CHANNEL_2_BASE, & binding );
  29. task_rand_run( & RAND_CONFIG );
  30. }
  31. void configureAndRunAddSineCosine() {
  32. DataChannelBinding binding = { BINDING_HW, BINDING_HW };
  33. data_channel_bind( DATA_CHANNEL_3_BASE, & binding );
  34. task_add_run( & ADD_SINE_COSINE_CONFIG );
  35. }
  36. void configureAndRunAddRand() {
  37. DataChannelBinding binding = { BINDING_HW, BINDING_HW };
  38. data_channel_bind( DATA_CHANNEL_4_BASE, & binding );
  39. task_add_run( & ADD_RAND_CONFIG );
  40. }
  41. void configureAndRunFft() {
  42. DataChannelBinding binding = { BINDING_HW, BINDING_HW };
  43. data_channel_bind( DATA_CHANNEL_5_BASE, & binding );
  44. task_fft_run( & FFT_CONFIG );
  45. }
  46. void configureAndRunCrc() {
  47. DataChannelBinding binding = { BINDING_HW, BINDING_HW };
  48. data_channel_bind( DATA_CHANNEL_6_BASE, & binding );
  49. task_crc_run( & CRC_CONFIG );
  50. }