/* aperegs.c */ /* This program reads all access registers of the APE 25 */ #include #include #include "apedefs.h" #include "atmuser.h" int iobuf[1024]; void main( int argc, char **argv) { int fd; int regid; int i; fd = open("/dev/ape25", O_RDWR); if (fd < 0) { printf("Device /dev/ape25 could not be opened. \n"); exit(1); } for (i = 0; i < REG_COUNT; i++) { iobuf[0] = aperegs[i].loc; ioctl(fd, AIO_RDSREG, iobuf); printf("%s %04x - %04x \n", aperegs[i].name, aperegs[i].loc, (unsigned short)iobuf[1]); } }