Plan 9 from Bell Labs’s /usr/web/sources/extra/9hist/pc/archncr3170.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


## diffname pc/archncr3170.c 1992/0923
## diff -e /dev/null /n/bootesdump/1992/0923/sys/src/9/pc/archncr3170.c
0a
#include	"u.h"
#include	"../port/lib.h"
#include	"mem.h"
#include	"dat.h"
#include	"fns.h"
#include	"io.h"

enum
{
	Pindex=	0x198,
	Pdata=	0x199,
};

static Lock pmulock;
static int
pmuwrbit(int index, int bit, int pos)
{
	uchar x;

	lock(&pmulock);
	outb(Pindex, index);
	x = inb(Pdata);
	if(bit)
		x |= 1<<pos;
	else
		x &= ~(1<<pos);
	outb(Pindex, index);
	outb(Pdata, x);
	unlock(&pmulock);
	return 0;
}

static int
ncr3170serialpower(int onoff)
{
	return pmuwrbit(0x85, 1^onoff, 4);
}

PCArch ncr3170 =
{
	"NCRD.0",
	i8042reset,
	0,
	0,
	0,
	ncr3170serialpower,
	0,
	0,
};
.
## diffname pc/archncr3170.c 1997/0327 # deleted
## diff -e /n/bootesdump/1992/0923/sys/src/9/pc/archncr3170.c /n/emeliedump/1997/0327/sys/src/brazil/pc/archncr3170.c
1,49d

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.