diff options
author | Marvin Borner | 2019-09-19 19:56:59 +0200 |
---|---|---|
committer | Marvin Borner | 2019-09-19 20:05:38 +0200 |
commit | 05e1fedcc9cd30d1a34a65e640da45e980b4f859 (patch) | |
tree | 9cfb7620907ac126f26cdfe9363cb73ed74ea179 /src/sound | |
parent | ffd82e18b5259fab477ad375a7af8550fac526d8 (diff) |
Moved source to kernel directory
Diffstat (limited to 'src/sound')
-rw-r--r-- | src/sound/frequency.c | 31 | ||||
-rw-r--r-- | src/sound/sound.h | 6 |
2 files changed, 0 insertions, 37 deletions
diff --git a/src/sound/frequency.c b/src/sound/frequency.c deleted file mode 100644 index 6d02690..0000000 --- a/src/sound/frequency.c +++ /dev/null @@ -1,31 +0,0 @@ -#include <stdint.h> -#include "../io/io.h" -#include "../timer/timer.h" - -static void play_sound(uint32_t frequency) { - uint32_t divided; - uint8_t tmp; - - divided = 1193180 / frequency; - send(0x43, 0xb6); - send(0x42, (uint8_t) (divided)); - send(0x42, (uint8_t) (divided >> 8)); - - tmp = receive(0x61); - if (tmp != (tmp | 3)) { - send(0x61, tmp | 3); - } -} - -static void shut_up() { - uint8_t tmp = receive(0x61) & 0xFC; - - send(0x61, tmp); -} - -//Make a beep -void beep(uint32_t frequency, uint32_t ticks) { - play_sound(frequency); - timer_wait(ticks); - shut_up(); -}
\ No newline at end of file diff --git a/src/sound/sound.h b/src/sound/sound.h deleted file mode 100644 index baf70b2..0000000 --- a/src/sound/sound.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef MELVIX_SOUND_H -#define MELVIX_SOUND_H - -void beep(uint32_t frequency, uint32_t ticks); - -#endif |