Main Page | Modules | Data Structures | File List | Data Fields | Globals

bbit.c

Go to the documentation of this file.
00001 /* BeeOS v0.1. Created: 2003/08/10 Modified: 2004/03/03
00002  * Copyright (C) 2004 Paul Harvey - ROMA, Australia.
00003  * csirac@users.sourceforge.net
00004  */
00005 
00006 /*   This program is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License as published by
00008  *   the Free Software Foundation; either version 2 of the License, or
00009  *   (at your option) any later version.
00010  * 
00011  *   This program is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *   GNU General Public License for more details.
00015  * 
00016  *   You should have received a copy of the GNU General Public License
00017  *   along with this program; if not, write to the Free Software
00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00023 #include "../include/beeos.h"
00024 #include "../include/bbit.h"
00025 
00031 /*@-redef@*/
00032 void bitnclr(uchar *addr, uchar bitn)
00033 /*@=redef@*/
00034 {
00035     *addr &= ~(0x01<<bitn);
00036 
00037     return;
00038 }
00039 
00045 /*@-redef@*/
00046 void bitnset(uchar *addr, uchar bitn)
00047 /*@=redef@*/
00048 {
00049     *addr |= 0x01<<bitn;
00050     
00051     return;
00052 }
00053 
00060 /*@-redef@*/
00061 bool bitncheck(uchar *addr, uchar bitn)
00062 /*@=redef@*/
00063 {
00064     if ((*addr & (0x01<<bitn)) != '\0') return true;
00065         else return false;
00066 }

Generated on Sat Apr 10 17:08:02 2004 for BeeOS by doxygen 1.3.6-20040222