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