SayoriOS 0.3.3

status_sounds.c
1 #include <io/ports.h>
2 #include <drv/beeper.h>
3 #include <io/status_sounds.h>
4 #include "sys/timer.h"
5
6 void ERROR_sound()
7 {
8 beeperPlay(500);
9 sleep_ms(50);
10 beeperSilent();
11 beeperPlay(250);
12 sleep_ms(50);
13 beeperSilent();
14 }
15
16 void ATTENTION_sound()
17 {
18 beeperPlay(1000);
19 sleep_ms(50);
20 beeperSilent();
21 beeperPlay(1000);
22 sleep_ms(50);
23 beeperSilent();
24 beeperPlay(1000);
25 sleep_ms(50);
26 beeperSilent();
27 }
28
29 void ALERT_sound()
30 {
31 beeperPlay(250);
32 sleep_ms(50);
33 beeperSilent();
34 beeperPlay(500);
35 sleep_ms(50);
36 beeperSilent();
37 }
38
39 void GLOBAL_ERROR_sound()
40 {
41 beeperPlay(500);
42 sleep_ms(100);
43 beeperSilent();
44 beeperPlay(250);
45 sleep_ms(100);
46 beeperSilent();
47 beeperPlay(100);
48 sleep_ms(100);
49 beeperSilent();
50 beeperPlay(50);
51 sleep_ms(200);
52 beeperSilent();
53 }
beeperSilent
void beeperSilent()
[Beeper] Выключить звук
Definition: beeper.c:42
beeperPlay
void beeperPlay(uint32_t frequency)
Вопроизвести звук (квадратной формы волны)
Definition: beeper.c:21
sleep_ms
void sleep_ms(uint32_t milliseconds)
Ожидание по миллисекундам
Definition: timer.c:68