Index: src/arch/i386/lib/beep.c =================================================================== --- src/arch/i386/lib/beep.c (révision 0) +++ src/arch/i386/lib/beep.c (révision 0) @@ -0,0 +1,22 @@ +#include +void beep(unsigned int frequency, unsigned length) +{ + unsigned int count = 1193180 / frequency; + + // Switch on the speaker + outb(inb(0x61)|3, 0x61); + + // Set command for counter 2, 2 byte write + outb(0xB6, 0x43); + + // Select desired Hz + outb(count & 0xff, 0x42); + outb((count >> 8) & 0xff, 0x42); + + // Block for 'length' microseconds + mdelay(length); + + // Switch off the speaker + outb(inb(0x61)&0xFC, 0x61); +} + Modification de propriétés sur src/arch/i386/lib/beep.c ___________________________________________________________________ Nom : svn:eol-style + native Index: src/arch/i386/lib/Config.lb =================================================================== --- src/arch/i386/lib/Config.lb (révision 2875) +++ src/arch/i386/lib/Config.lb (copie de travail) @@ -3,6 +3,7 @@ object c_start.S object cpu.c +object beep.c object pci_ops_conf1.c object pci_ops_conf2.c object pci_ops_mmconf.c