#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/ioctl.h>

#include "../../sis3100_calls/sis3100_vme_calls.h" 
#include "../../dev/pci/sis1100_var.h"   

/* #include "../header/sis3300.h" */



int test1(int p, u_int32_t vme_base_addr /*, u_int32_t* return_data */ ) ;


/****************************************************************************/

int main(int argc, char* argv[])
{

#define MAX_NUMBER_LWORDS 0x100000  

int p;
int mod_base;
int no_of_lwords ;

u_int32_t addr ;
u_int32_t data ;
u_int32_t blt_data[MAX_NUMBER_LWORDS] ;
u_int32_t get_lwords ;

int i;

int return_code ;
int error_cnt ;
int loop_cnt ;
int temp ;



/* open VME */
   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
     printf("error on opening VME environment\n");
     return -1;
   }

if (argc<2)  {
   printf("usage:  SIS330x VME_BASE_ADDRESS   \n");
  return -1;
  }

  mod_base     = strtoul(argv[1],NULL,0) ;

  return_code = test1(p, mod_base /*, u_int32_t* return_data */ ) ;


close(p);
return 0;
}


































