ReactOS 0.4.15-dev-8102-g108db8f
pcbeep.c File Reference
#include <freeldr.h>
Include dependency graph for pcbeep.c:

Go to the source code of this file.

Macros

#define CLOCK_TICK_RATE   1193182
 

Functions

static VOID Sound (USHORT Frequency)
 
VOID PcBeep (VOID)
 

Macro Definition Documentation

◆ CLOCK_TICK_RATE

#define CLOCK_TICK_RATE   1193182

Definition at line 13 of file pcbeep.c.

Function Documentation

◆ PcBeep()

VOID PcBeep ( VOID  )

Definition at line 34 of file pcbeep.c.

35{
36 Sound(700);
38 Sound(0);
39}
static VOID Sound(USHORT Frequency)
Definition: pcbeep.c:17
VOID StallExecutionProcessor(ULONG Microseconds)
Definition: pchw.c:60

Referenced by MachInit().

◆ Sound()

static VOID Sound ( USHORT  Frequency)
static

Definition at line 17 of file pcbeep.c.

18{
19 USHORT Scale;
20
21 if (Frequency == 0)
22 {
24 return;
25 }
26
27 Scale = CLOCK_TICK_RATE / Frequency;
28 WRITE_PORT_UCHAR((PUCHAR)0x43, 0xB6);
29 WRITE_PORT_UCHAR((PUCHAR)0x42, Scale & 0xFF);
30 WRITE_PORT_UCHAR((PUCHAR)0x42, Scale >> 8);
32}
#define READ_PORT_UCHAR(p)
Definition: pc98vid.h:22
#define WRITE_PORT_UCHAR(p, d)
Definition: pc98vid.h:21
#define CLOCK_TICK_RATE
Definition: pcbeep.c:13
unsigned short USHORT
Definition: pedump.c:61
static LARGE_INTEGER Frequency
Definition: clock.c:41
unsigned char * PUCHAR
Definition: typedefs.h:53

Referenced by PcBeep().