tone_gen.h 707 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef _TONE_GEN_H_
  2. #define _TONE_GEN_H_
  3. #define TAG "tone-gen"
  4. #include <furi.h>
  5. // ids for all scenes used by the app
  6. typedef enum {
  7. ToneGenAppScene_Starting,
  8. ToneGenAppScene_Playback,
  9. ToneGenAppScene_Settings,
  10. ToneGenAppScene_count
  11. } ToneGenAppScene;
  12. // ids for the 2 types of view used by the app
  13. typedef enum {
  14. ToneGenAppView_SharedMenu,
  15. ToneGenAppView_Submenu,
  16. ToneGenAppView_VariableItemList,
  17. ToneGenAppView_PlaybackView,
  18. ToneGenAppView_Popup,
  19. ToneGenAppView_count
  20. } ToneGenAppView;
  21. typedef enum { SINE, SQUARE } ToneWaveType;
  22. struct ToneData_t {
  23. int animationOffset;
  24. ToneWaveType waveType;
  25. uint16_t frequency;
  26. float volume;
  27. };
  28. #endif