|
From: Marcel T. <te...@us...> - 2002-07-17 21:10:29
|
Update of /cvsroot/openwince/tools/ioperm/tests
In directory usw-pr-cvs1:/tmp/cvs-serv27241
Added Files:
.cvsignore Makefile.am spkrtest.c
Log Message:
Added spkrtest (speaker test).
--- NEW FILE: .cvsignore ---
Makefile
Makefile.in
.deps
.libs
spkrtest
--- NEW FILE: Makefile.am ---
#
# $Id: Makefile.am,v 1.1 2002/07/17 21:10:25 telka Exp $
#
# Copyright (C) 2002 ETC s.r.o.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
# Written by Marcel Telka <ma...@te...>, 2002.
#
noinst_PROGRAMS = spkrtest
spkrtest_SOURCES = spkrtest.c
INCLUDES = -I$(top_srcdir)/include
LDADD = -L$(top_srcdir)/library -lioperm
--- NEW FILE: spkrtest.c ---
/*
* $Id: spkrtest.c,v 1.1 2002/07/17 21:10:25 telka Exp $
*
* Copyright (C) 2002 ETC s.r.o.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* Written by Marcel Telka <ma...@te...>, 2002.
*
*/
#include <sys/io.h>
#include <unistd.h>
int
main( void )
{
ioperm( 0x61, 1, 1 );
outb( inb( 0x61 ) | 0x3, 0x61 );
sleep( 1 );
outb( inb( 0x61 ) & ~0x3, 0x61 );
ioperm( 0x61, 1, 0 );
return 0;
}
|