|
isa卡的地址跳线设为0x223,在outb时不管怎么设置输入值
调用inb时得到的值都一样。在outb处编译时有个warning:large integer implicitly truncated to unsigned type;在/proc/ioports里看到了
申请的io资源
模块代码如下:
int init_module(void)
{
int err;
if((err=check_region(0x223,1))<0)
{
printk("<0> error \n");
return err;
}
request_region(0x223,1,"iokernel1");
outb(0x223,0x11);
unsigned char temp=inb(0x223);
printk("<0> the temp=%d \n",temp);
return 0;
}
void cleanup_module(void)
{
release_region(0x226,3);
printk("<0> bye bre");
}
MODULE_LICENSE("GPL"); |
|