Subversion Repositories f9daq

Rev

Rev 125 | Rev 138 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 125 Rev 136
Line 259... Line 259...
259
      return 0;
259
      return 0;
260
  }
260
  }
261
//printf("R 0x%02x 0x%02x 0x%08x %x\n", AM , DW, VME_Address, *Data);
261
//printf("R 0x%02x 0x%02x 0x%08x %x\n", AM , DW, VME_Address, *Data);
262
  if (nb<0)  printf("%s %d %d %s\n",__FILE__,__LINE__,nb, strerror(-nb) );
262
  if (nb<0)  printf("%s %d %d %s\n",__FILE__,__LINE__,nb, strerror(-nb) );
263
 
263
 
264
  return nb;
264
  return (short)nb;
265
}
265
}
266
 
266
 
267
short __stdcall WIENER_VMUSB_VME_W( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data) {
267
short __stdcall WIENER_VMUSB_VME_W( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data) {
268
  int nb=0;
268
  int nb=0;
269
  if (!WUSB_udev) return -222;
269
  if (!WUSB_udev) return -222;
Line 278... Line 278...
278
    default:
278
    default:
279
      return 0;
279
      return 0;
280
  }
280
  }
281
  if (nb<0)  printf("%s %d %d %s\n",__FILE__,__LINE__,nb, strerror(-nb) );
281
  if (nb<0)  printf("%s %d %d %s\n",__FILE__,__LINE__,nb, strerror(-nb) );
282
 
282
 
283
  return nb;
283
  return (short)nb;
284
}
284
}
285
 
285
 
286
short __stdcall WIENER_VMUSB_VME_MW( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data) {
286
short __stdcall WIENER_VMUSB_VME_MW( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data) {
287
  switch (DW) {
287
  switch (DW) {
288
    case VME_D16:
288
    case VME_D16:
Line 297... Line 297...
297
short __stdcall WIENER_VMUSB_VME_MWRST( void ) {
297
short __stdcall WIENER_VMUSB_VME_MWRST( void ) {
298
  WIENER_VMUSB_StackInit();
298
  WIENER_VMUSB_StackInit();
299
  return 0;
299
  return 0;
300
}
300
}
301
short __stdcall WIENER_VMUSB_VME_MWEXEC( void ) {
301
short __stdcall WIENER_VMUSB_VME_MWEXEC( void ) {
302
  return WUSBXX_stack_execute (WUSB_udev, NULL);
302
  return (short) WUSBXX_stack_execute (WUSB_udev, NULL);
303
}
303
}
304
 
304
 
305
short __stdcall WIENER_VMUSB_VME_MR( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t *Data) {
305
short __stdcall WIENER_VMUSB_VME_MR( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t *Data) {
306
  switch (DW) {
306
  switch (DW) {
307
    case VME_D16:
307
    case VME_D16:
Line 316... Line 316...
316
short __stdcall WIENER_VMUSB_VME_MRRST( void ) {
316
short __stdcall WIENER_VMUSB_VME_MRRST( void ) {
317
  WIENER_VMUSB_StackInit();
317
  WIENER_VMUSB_StackInit();
318
  return 0;
318
  return 0;
319
}
319
}
320
short __stdcall WIENER_VMUSB_VME_MREXEC(  uint32_t *Data  ) {
320
short __stdcall WIENER_VMUSB_VME_MREXEC(  uint32_t *Data  ) {
321
  return WUSBXX_stack_execute (WUSB_udev,(char *) Data);
321
  return (short) WUSBXX_stack_execute (WUSB_udev,(char *) Data);
322
}
322
}