Re: How to trigger the mainboard buzzer?



On Apr 22, 1:53 pm, Blake <Bl...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,

You can just write a stream interface driver to access some I/O ports.
There's a sample using 8253 buzzer, but the I/O ports should depend on your
BIOS setting.

BOOL MyBeep(DWORD dwFreq, DWORD dwDuration)
{
    _outp(0x43, 0xb6);    // Set Buzzer    
    _outp(0x42, LOBYTE(0x1234dc / dwFreq));    // Frequency LSB    
    _outp(0x42, HIBYTE(0x1234dc / dwFreq));    // Frequency MSB    
    _outp(0x61, _inp(0x61) | 0x3);    // Start beep
    Sleep(dwDuration);
    _outp(0x61, _inp(0x61) & 0xfc);    // End beep
    return TRUE;

}

Hope it's help!!!
Blake

"Michel Verhagen (eMVP)" wrote:
You can write a full audio driver for the PC speaker if you want... It
involves programming the PIT on the x86.

Here's a good starting point:http://en.wikipedia.org/wiki/PC_speaker

Good luck,

Michel Verhagen, eMVP
Check out my blog:http://GuruCE.com/blog

  GuruCE Ltd.
  Microsoft Embedded Partner
 http://GuruCE.com
  Consultancy, training and development services.

Paul G. Tobey [eMVP] wrote:
You'd have to implement your own code to do this, unless your BSP has
support for triggering that device in some other way.  It should be obvious
that Windows CE isn't going to have some sort of standard "mainboard buzzer"
device!  That *is* obvious, right?  You might see if the Notification LED
(yes, I know that the buzzer is not an LED), is somehow used by your board's
BSP for this.

If not, you'll have to write a driver and decide how to make it work (as a
fake audio device or just a custom driver interface that your application
would have to CreateFile() to open, then maybe DeviceIoControl() to send a
custom message to tell the buzzer to buzz).

Paul T.

"traudi" <tra...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:62BE5F99-CF62-4A5B-BD01-DFF494129320@xxxxxxxxxxxxxxxx
Hi Luca,

I have the MessageBeep function tested. This function plays notivication
sounds (wav-files: exlamation, critical aso.) over the soundcard output
line
and not over the mainboard buzzer. Do you know, how I can change the
output
channel from this function?

Thanks
traudi

"Luca Calligaris" wrote:

Look for MessageBeep API

--

Luca Calligaris
www.eurotech.it

"traudi" <tra...@xxxxxxxxxxxxxxxxxxxxxxxxx> ha scritto nel messaggio
news:42AD3730-C822-46C7-B3E9-C9A7C0BF1161@xxxxxxxxxxxxxxxx
Hi all,

do's erveryone know, how I can trigger the mainboard buzzer from
x86-system
under windows ce 5 from a application written with c++ or cf 3.5? The
system
has a internal soundcard but no speakers. The buzzer is allways
present...

Regards from Germany.
traudi

I'd just like to say a massive thanks to you for posting this
solution. This works perfectly on Windows CE. The only modification I
needed to make was to replace _outp and _inp with appropriate calls.
God knows why, but Microsoft decided that CE should attempt to use a
sound card for MessageBeep() even if one isn't installed, and remove
all other Beep functions.
.