diff options
author | Marvin Borner | 2020-05-06 19:04:05 +0200 |
---|---|---|
committer | Marvin Borner | 2020-05-06 19:04:05 +0200 |
commit | d94ffac4a584dc7a4f6f2ec567b8caab05ce9253 (patch) | |
tree | 559cd596a0a407d4b40c1d12d3c6a0686494da16 /src/kernel/sound | |
parent | 1a8563a05608b5b5e27eada44cf4790926001c68 (diff) |
New build parameters and shared includes
This changes many files but I've just applied some replace commands.. So
- nothing special!
Diffstat (limited to 'src/kernel/sound')
-rw-r--r-- | src/kernel/sound/frequency.c | 20 | ||||
-rw-r--r-- | src/kernel/sound/sound.h | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/kernel/sound/frequency.c b/src/kernel/sound/frequency.c index 772df10..c485955 100644 --- a/src/kernel/sound/frequency.c +++ b/src/kernel/sound/frequency.c @@ -1,32 +1,32 @@ #include <stdint.h> -#include <kernel/io/io.h> -#include <kernel/timer/timer.h> +#include <io/io.h> +#include <timer/timer.h> -void play_sound(uint32_t frequency) +void play_sound(u32 frequency) { - uint32_t divided; - uint8_t tmp; + u32 divided; + u8 tmp; divided = 1193180 / frequency; outb(0x43, 0xb6); - outb(0x42, (uint8_t)(divided)); - outb(0x42, (uint8_t)(divided >> 8)); + outb(0x42, (u8)(divided)); + outb(0x42, (u8)(divided >> 8)); tmp = inb(0x61); if (tmp != (tmp | 3)) { - outb(0x61, (uint8_t)(tmp | 3)); + outb(0x61, (u8)(tmp | 3)); } } static void shut_up() { - uint8_t tmp = (uint8_t)(inb(0x61) & 0xFC); + u8 tmp = (u8)(inb(0x61) & 0xFC); outb(0x61, tmp); } // Make a beep -void beep(uint32_t frequency, uint32_t ticks) +void beep(u32 frequency, u32 ticks) { play_sound(frequency); timer_wait((int)ticks); diff --git a/src/kernel/sound/sound.h b/src/kernel/sound/sound.h index 44ec6f5..001ef92 100644 --- a/src/kernel/sound/sound.h +++ b/src/kernel/sound/sound.h @@ -8,6 +8,6 @@ * @param frequency The frequency of the beep * @param ticks The duration in ticks */ -void beep(uint32_t frequency, uint32_t ticks); +void beep(u32 frequency, u32 ticks); #endif
\ No newline at end of file |