AX5420P & AX5425P User
’
s Manual
Examples
25
C h a p t e r 6
Examples
NOTE:
Because these examples include AX5425P
andAX5420P, But following example is for AX5425P
When you use AX5420P board, you must fix this
example. All '5425' in the examples will be changed
as '5420'. And like 5425DRV.SYS will be changed as
5420DRV.SYS.
6.1 Turbo
C
**************************************************************************************
*
Example program for turbo C language
*
*
To get BASE ADDRESS
*
* IRQ
LEVEL *
*
SLOT NUMBER via device driver
*
*
Before executing this program, device driver
*
* installed
successfully. *
**************************************************************************************
#include <dos.h>
#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <fcntl.h>
#include <io.h>
main()
{int fd;
int base,slotno,irqno;
unsigned int i,j,dat;
if((fd=open("5425DRV",O_RDWR))==-1)
{
printf("AX5425P open fail! \n");
exit(0);
}
else
printf("OK\n");
write(fd,"B1",2);
read(fd,&base,sizeof(int));
write(fd,"I1",2);
read(fd,&irqno,sizeof(int));
Содержание AX5420P
Страница 1: ...AX5420P AX5425P PCI Card 16 8 CH Opto isolated D I 16 8 CH Relay Actuator User s Manual...
Страница 10: ...AX5420P AX5425P User s Manual 4 This page does not contain any information...
Страница 18: ...AX5420P AX5425P User s Manual 12 This page does not contain any information...
Страница 26: ...AX5420P AX5425P User s Manual 20 This page does not contain any information...
Страница 30: ...AX5420P AX5425P User s Manual 24 This page does not contain any information...
Страница 36: ...AX5420P AX5425P User s Manual 30 This page does not contain any information...