Appendix
42
1041814CLDNA Series
(2)
Input/Output Program
a.
Output Program
Function Input: int pin value 1~4 are corresponding with the output pin 1~4
respectively
int lev_val 1: the output pin is high, 0: the output pin is low
Function Output: None
void Out_Lev(int pin ,int lev_val)
{
unsigned int reg_val ;
outportb(BAR,0xbf);
outportb(BAR+0x04,0x40);
outportb(BAR+0x03,0x01);
reg_val = inportb(BAR+0x05);
reg_val = lev_val ?
reg_val|(0x01<<pin+3) :reg_val&(~(0x01<<pin+3)) ;
outportb(BAR+0x05, reg_val);
reg_val =(inportb(BAR+0x02)|0x08)&0xeb;
reg_val |= 0x40;
outportb(BAR+0x02, reg_val);
delay(30);
reg_val =inportb(BAR);
while((reg_val &0x02)!=0x02)
{
reg_val =inportb(BAR);
if((reg_val &0x04)!=0)
{
printf("ERROR\n");
return 0;
}
}
}
Содержание 104-1814CLDNA Series
Страница 1: ...104 1814CLDNA Series PCI 104 Express 单板电脑 PCI 104 Express Single Board Computer Version B01 ...
Страница 8: ...第二章 安装说明 4 104 1814CLDNA 系列 第二章 安装说明 产品外形尺寸图 单位 mm ...
Страница 42: ...第四章 驱动程序安装说明 38 104 1814CLDNA 系列 第四章 驱动程序安装说明 本产品的驱动程序可依据配套光盘内容安装 在此不做介绍 ...
Страница 54: ...Chapter 2 Installation 4 104 1814CLDNA Series Chapter 2 Installation Product Outline Unit mm ...