From f495cc1e93710c233292a503720ec235a61b685c Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 18 Mar 2020 17:32:50 +0100 Subject: Applied official linux kernel code style guidelines Due to my change to vim and the clang-format plugin this was needed! --- src/kernel/sound/frequency.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/kernel/sound') diff --git a/src/kernel/sound/frequency.c b/src/kernel/sound/frequency.c index 5c45c60..772df10 100644 --- a/src/kernel/sound/frequency.c +++ b/src/kernel/sound/frequency.c @@ -4,31 +4,31 @@ void play_sound(uint32_t frequency) { - uint32_t divided; - uint8_t tmp; + uint32_t divided; + uint8_t tmp; - divided = 1193180 / frequency; - outb(0x43, 0xb6); - outb(0x42, (uint8_t) (divided)); - outb(0x42, (uint8_t) (divided >> 8)); + divided = 1193180 / frequency; + outb(0x43, 0xb6); + outb(0x42, (uint8_t)(divided)); + outb(0x42, (uint8_t)(divided >> 8)); - tmp = inb(0x61); - if (tmp != (tmp | 3)) { - outb(0x61, (uint8_t) (tmp | 3)); - } + tmp = inb(0x61); + if (tmp != (tmp | 3)) { + outb(0x61, (uint8_t)(tmp | 3)); + } } static void shut_up() { - uint8_t tmp = (uint8_t) (inb(0x61) & 0xFC); + uint8_t tmp = (uint8_t)(inb(0x61) & 0xFC); - outb(0x61, tmp); + outb(0x61, tmp); } // Make a beep void beep(uint32_t frequency, uint32_t ticks) { - play_sound(frequency); - timer_wait((int) ticks); - shut_up(); + play_sound(frequency); + timer_wait((int)ticks); + shut_up(); } \ No newline at end of file -- cgit v1.2.3