sound.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #include <stdint.h>
  3. #define e_SOUND_MODE_NULL 0xFF
  4. typedef enum : uint8_t {
  5. e_SOUND_MODE_LOUD,
  6. e_SOUND_MODE_ONCE,
  7. e_SOUND_MODE_SILENT,
  8. e_SOUND_MODE_BLIND
  9. } eSOUND_MODE;
  10. #define e_SOUND_MODE_DEFAULT e_SOUND_MODE_LOUD
  11. typedef enum : uint8_t {
  12. e_SOUND_TYPE_ButtonEcho,
  13. e_SOUND_TYPE_EncoderEcho,
  14. e_SOUND_TYPE_StandardPrompt,
  15. e_SOUND_TYPE_StandardConfirm,
  16. e_SOUND_TYPE_StandardWarning,
  17. e_SOUND_TYPE_StandardAlert,
  18. e_SOUND_TYPE_EncoderMove,
  19. e_SOUND_TYPE_BlindAlert
  20. } eSOUND_TYPE;
  21. typedef enum : uint8_t {
  22. e_SOUND_CLASS_Echo,
  23. e_SOUND_CLASS_Prompt,
  24. e_SOUND_CLASS_Confirm,
  25. e_SOUND_CLASS_Warning,
  26. e_SOUND_CLASS_Alert
  27. } eSOUND_CLASS;
  28. extern eSOUND_MODE eSoundMode;
  29. extern void Sound_Init(void);
  30. extern void Sound_Default(void);
  31. extern void Sound_CycleState(void);
  32. extern void Sound_MakeSound(eSOUND_TYPE eSoundType);
  33. extern void Sound_MakeCustom(uint16_t ms,uint16_t tone_ ,bool critical);
  34. //static void Sound_DoSound_Echo(void);
  35. //static void Sound_DoSound_Prompt(void);