* [ECOS] buzzer on PC
@ 2003-09-08 13:38 Piotr Trojanek
2003-09-08 15:38 ` David N. Welton
0 siblings, 1 reply; 3+ messages in thread
From: Piotr Trojanek @ 2003-09-08 13:38 UTC (permalink / raw)
To: ecos-discuss
Hi!
how to 'beep' on PC buzzer from ecos?
--
Piotr Trojanek
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] buzzer on PC
2003-09-08 13:38 [ECOS] buzzer on PC Piotr Trojanek
@ 2003-09-08 15:38 ` David N. Welton
2003-09-10 13:29 ` Piotr Trojanek
0 siblings, 1 reply; 3+ messages in thread
From: David N. Welton @ 2003-09-08 15:38 UTC (permalink / raw)
To: Piotr Trojanek; +Cc: ecos-discuss
Piotr Trojanek <ptroja@elproma.com.pl> writes:
> how to 'beep' on PC buzzer from ecos?
Oh, I know this one!
countdown = 1193180 / speaker_frequency;
set_speaker(int countdown)
{
char snd = 0;
/* Init speaker. */
HAL_WRITE_UINT8(0x43, 0xb6);
HAL_WRITE_UINT8(0x42, countdown & 0xff);
HAL_WRITE_UINT8(0x42, countdown >> 8);
HAL_READ_UINT8(0x61, snd);
snd |= 3;
HAL_WRITE_UINT8(0x61, snd);
}
Something like that ought to work.
--
David N. Welton
Consulting: http://www.dedasys.com/
Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
Apache Tcl: http://tcl.apache.org/
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] buzzer on PC
2003-09-08 15:38 ` David N. Welton
@ 2003-09-10 13:29 ` Piotr Trojanek
0 siblings, 0 replies; 3+ messages in thread
From: Piotr Trojanek @ 2003-09-10 13:29 UTC (permalink / raw)
To: David N. Welton, ecos-discuss
On Mon, Sep 08, 2003 at 05:38:57PM +0200, David N. Welton wrote:
> Piotr Trojanek <ptroja@elproma.com.pl> writes:
>
> > how to 'beep' on PC buzzer from ecos?
>
> Oh, I know this one!
>
> countdown = 1193180 / speaker_frequency;
>
> set_speaker(int countdown)
> {
> char snd = 0;
> /* Init speaker. */
> HAL_WRITE_UINT8(0x43, 0xb6);
> HAL_WRITE_UINT8(0x42, countdown & 0xff);
> HAL_WRITE_UINT8(0x42, countdown >> 8);
> HAL_READ_UINT8(0x61, snd);
> snd |= 3;
> HAL_WRITE_UINT8(0x61, snd);
> }
>
> Something like that ought to work.
works great:), thanks!
--
Piotr Trojanek
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-09-10 13:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-08 13:38 [ECOS] buzzer on PC Piotr Trojanek
2003-09-08 15:38 ` David N. Welton
2003-09-10 13:29 ` Piotr Trojanek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).