/* atmtest7.c */ /* This program writes/reads and logs the ENTIRE Xram */ #include #include #include "atmuser.h" int iobuf[1024]; short xram[8192]; void main( int argc, char **argv) { int fd; FILE *xr; 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 < 8192; i++) { iobuf[0] = 0x08000000 + 2 * i; ioctl(fd, AIO_RDVSAP, iobuf); xram[i] = iobuf[1]; } xr = fopen("xram.log", "w"); fwrite(xram, 2, 8192, xr); fclose(xr); }