예제 #1
0
파일: barcodereader.c 프로젝트: RTS2/rts2
/******************************************************************************
 * cleanup(...)
 *****************************************************************************/
void
cleanup(void)
{
  if (sport1_stat.fd) {
    // wildi was shutdown_serial(sport1_stat.fd);
    serial_shutdown(sport1_stat.fd);
    sys_debug_log(3, "%s closed", sport1_stat.dev_name);
  }

  if (sport2_stat.fd) {
    // wildi was shutdown_serial(sport2_stat.fd);
    serial_shutdown(sport2_stat.fd);
    sys_debug_log(3, "%s closed", sport2_stat.dev_name);
  }
}
예제 #2
0
파일: vsid.c 프로젝트: AreaScout/vice
void machine_resources_shutdown(void)
{
    serial_shutdown();
    video_resources_shutdown();
    c64_resources_shutdown();
    sound_resources_shutdown();
    cartio_shutdown();
}
예제 #3
0
파일: plus4.c 프로젝트: martinpiper/VICE
void machine_resources_shutdown(void)
{
    serial_shutdown();
    video_resources_shutdown();
    plus4_resources_shutdown();
    sound_resources_shutdown();
    rs232drv_resources_shutdown();
    printer_resources_shutdown();
    drive_resources_shutdown();
}
예제 #4
0
파일: vic20.c 프로젝트: martinpiper/VICE
void machine_resources_shutdown(void)
{
    serial_shutdown();
    video_resources_shutdown();
    vic20_resources_shutdown();
    sound_resources_shutdown();
    rs232drv_resources_shutdown();
    printer_resources_shutdown();
    drive_resources_shutdown();
    cartridge_resources_shutdown();
}
예제 #5
0
파일: c64dtv.c 프로젝트: sasq64/script-vice
void machine_resources_shutdown(void)
{
    serial_shutdown();
    flash_trap_shutdown();
    flash_trap_resources_shutdown();
    c64dtv_resources_shutdown();
    c64dtvmem_resources_shutdown();
    rs232drv_resources_shutdown();
    printer_resources_shutdown();
    drive_resources_shutdown();
    fsdevice_resources_shutdown();
    disk_image_resources_shutdown();
}
예제 #6
0
void machine_resources_shutdown(void)
{
    serial_shutdown();
    scpu64_resources_shutdown();
    rs232drv_resources_shutdown();
    printer_resources_shutdown();
    drive_resources_shutdown();
    cartridge_resources_shutdown();
    rombanks_resources_shutdown();
    userport_rtc_resources_shutdown();
    cartio_shutdown();
    fsdevice_resources_shutdown();
    disk_image_resources_shutdown();
}
예제 #7
0
파일: c128.c 프로젝트: BigBoss21X/vice-emu
void machine_resources_shutdown(void)
{
    serial_shutdown();
    video_resources_shutdown();
    c128_resources_shutdown();
    sound_resources_shutdown();
    rs232drv_resources_shutdown();
    printer_resources_shutdown();
    drive_resources_shutdown();
    cartridge_resources_shutdown();
    functionrom_resources_shutdown();
    rombanks_resources_shutdown();
    cartio_shutdown();
}
예제 #8
0
파일: vic20.c 프로젝트: peterled/vice
void machine_resources_shutdown(void)
{
    serial_shutdown();
    video_resources_shutdown();
    vic20_resources_shutdown();
    sound_resources_shutdown();
    rs232drv_resources_shutdown();
    printer_resources_shutdown();
    drive_resources_shutdown();
    cartridge_resources_shutdown();
#ifdef HAVE_MIDI
    midi_resources_shutdown();
#endif
    cartio_shutdown();
}
예제 #9
0
void machine_resources_shutdown(void)
{
    serial_shutdown();
    video_resources_shutdown();
    c64_resources_shutdown();
    plus60k_resources_shutdown();
    plus256k_resources_shutdown();
    c64_256k_resources_shutdown();
    sound_resources_shutdown();
    rs232drv_resources_shutdown();
    printer_resources_shutdown();
    drive_resources_shutdown();
    cartridge_resources_shutdown();
    rombanks_resources_shutdown();
    userport_rtc_resources_shutdown();
    cartio_shutdown();
}
예제 #10
0
void machine_resources_shutdown(void)
{
    cartridge_resources_shutdown();
    speech_resources_shutdown();
    serial_shutdown();
    plus4_resources_shutdown();
    rs232drv_resources_shutdown();
    printer_resources_shutdown();
    drive_resources_shutdown();
    fsdevice_resources_shutdown();
    disk_image_resources_shutdown();
    sampler_resources_shutdown();
    cartio_shutdown();
    userport_resources_shutdown();
    joyport_bbrtc_resources_shutdown();
    tapeport_resources_shutdown();
    debugcart_resources_shutdown();
}
예제 #11
0
파일: c64.c 프로젝트: martinpiper/VICE
void machine_resources_shutdown(void)
{
    serial_shutdown();
    video_resources_shutdown();
    c64_resources_shutdown();
    reu_resources_shutdown();
    georam_resources_shutdown();
    ramcart_resources_shutdown();
    plus60k_resources_shutdown();
    plus256k_resources_shutdown();
    c64_256k_resources_shutdown();
    mmc64_resources_shutdown();
    sound_resources_shutdown();
    rs232drv_resources_shutdown();
    printer_resources_shutdown();
    drive_resources_shutdown();
    cartridge_resources_shutdown();
}
예제 #12
0
파일: vic20.c 프로젝트: markjreed/vice-emu
void machine_resources_shutdown(void)
{
    serial_shutdown();
    vic20_resources_shutdown();
    rs232drv_resources_shutdown();
    printer_resources_shutdown();
    drive_resources_shutdown();
    cartridge_resources_shutdown();
#ifdef HAVE_MIDI
    midi_resources_shutdown();
#endif
    cartio_shutdown();
    fsdevice_resources_shutdown();
    disk_image_resources_shutdown();
    sampler_resources_shutdown();
    userport_rtc_58321a_resources_shutdown();
    userport_rtc_ds1307_resources_shutdown();
    userport_resources_shutdown();
    bbrtc_resources_shutdown();
    tapeport_resources_shutdown();
}
예제 #13
0
파일: barcodereader.c 프로젝트: RTS2/rts2
/******************************************************************************
 * start_bcr_comm()
 * Sets up the serial ports to communicate with barcode readers, initializes
 * the barcode readers and creates two threads to handle the serial
 * communication.
 *****************************************************************************/
int start_bcr_comm()
{
  char *SerialDev1 = DEFAULT_BCR_SERPORT_DEV1;
  char *SerialDev2 = DEFAULT_BCR_SERPORT_DEV2;
  int sd1;         // file descriptor for 1st serial device
  int sd2;         // file descriptor for 2nd serial device

  int bitrate  = DEFAULT_BCR_BITRATE;
  int databits = DEFAULT_BCR_DATABITS;
  int parity   = DEFAULT_BCR_PARITY;
  int stopbits = DEFAULT_BCR_STOPBITS;

  int res = 0;

  sys_debug_log(1, "Barcode reader 1 on %s, barcode reader 2 on %s",
                    SerialDev1, SerialDev2);

  // open serial ports
  // wildi if ((sd1 = init_serial(SerialDev1, bitrate, databits, parity, stopbits)) < 0)
  if ((sd1 = serial_init(SerialDev1, bitrate, databits, parity, stopbits)) < 0)
  {
    sys_log(ILOG_ERR, "open of %s failed.", SerialDev1);
    return -1;
  }
  init_sport(&sport1_stat, sd1, SerialDev1);

  //wildi if ((sd2 = init_serial(SerialDev2, bitrate, databits, parity, stopbits)) < 0)
  if ((sd2 = serial_init(SerialDev2, bitrate, databits, parity, stopbits)) < 0)
  {
    sys_log(ILOG_ERR, "open of %s failed.", SerialDev2);
    // wildi was shutdown_serial(sd1);
    serial_shutdown(sd1);
    return -2;
  }
  init_sport(&sport2_stat, sd2, SerialDev2);

  pthread_mutex_init(&pos_data_mutex, NULL);

  // create receive communication thread
  pthread_create(&bcr_receive_th_id, NULL, &bcr_receive_thread, NULL);

  // initialize/setup barcode readers
  init_barcodereader(&sport1_stat);
  init_barcodereader(&sport2_stat);

  millisleep(200);

  init_pos_detect_state(&pos_detect_state);



  openlog ("rts2 threads", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
     
  syslog (LOG_NOTICE, "Program started by User %d", getuid ());


  // create communication thread which talks to barcode readers
  int ret= pthread_create(&bcr_sending_th_id, NULL, &bcr_sending_thread, NULL);

  syslog (LOG_NOTICE, "State was  %d", ret);
  return res;
}