void remote488_device::ieee488_ifc(int state) { update_signal(SIGNAL_IFC_BIT , state); if (!state) { LOG("IFC\n"); bus_reset(); } }
// done on each push of 'reset' key (or reset command) void sim_reset() { hold_off = FALSE; boot_time = rcl_key = num_meas = meas_time = shifted_key; self_test = TRUE; need_recall_file = recall_file; recall_active = FALSE; kfp = 0; bus_reset(); front_panel_reset(); sim_proc_reset(); hpib_reset(); }
void remote488_device::device_reset() { m_no_propagation = true; m_in_signals = 0xff; m_bus->atn_w(this , 1); m_bus->eoi_w(this , 1); m_bus->ifc_w(this , 1); m_bus->ren_w(this , 1); m_bus->srq_w(this , 1); m_out_signals = 0xff; m_no_propagation = false; // Fake disconnection m_connected = true; set_connection(false); bus_reset(); }
/* USB_EORSM_DNRSM, USB_EORST_RST, USB_LPMSUSP_DDISC, USB_LPM_DCONN, USB_MSOF, USB_RAMACER, USB_RXSTP_TXSTP_0, USB_RXSTP_TXSTP_1, USB_RXSTP_TXSTP_2, USB_RXSTP_TXSTP_3, USB_RXSTP_TXSTP_4, USB_RXSTP_TXSTP_5, USB_RXSTP_TXSTP_6, USB_RXSTP_TXSTP_7, USB_STALL0_STALL_0, USB_STALL0_STALL_1, USB_STALL0_STALL_2, USB_STALL0_STALL_3, USB_STALL0_STALL_4, USB_STALL0_STALL_5, USB_STALL0_STALL_6, USB_STALL0_STALL_7, USB_STALL1_0, USB_STALL1_1, USB_STALL1_2, USB_STALL1_3, USB_STALL1_4, USB_STALL1_5, USB_STALL1_6, USB_STALL1_7, USB_SUSPEND, USB_TRFAIL0_TRFAIL_0, USB_TRFAIL0_TRFAIL_1, USB_TRFAIL0_TRFAIL_2, USB_TRFAIL0_TRFAIL_3, USB_TRFAIL0_TRFAIL_4, USB_TRFAIL0_TRFAIL_5, USB_TRFAIL0_TRFAIL_6, USB_TRFAIL0_TRFAIL_7, USB_TRFAIL1_PERR_0, USB_TRFAIL1_PERR_1, USB_TRFAIL1_PERR_2, USB_TRFAIL1_PERR_3, USB_TRFAIL1_PERR_4, USB_TRFAIL1_PERR_5, USB_TRFAIL1_PERR_6, USB_TRFAIL1_PERR_7, USB_UPRSM, USB_WAKEUP */ void USB_0_Handler(void) { uint32_t int_status = USB->DEVICE.INTFLAG.reg & USB->DEVICE.INTENSET.reg; /*------------- Interrupt Processing -------------*/ // SAMD doesn't distinguish between Suspend and Disconnect state. // Both condition will cause SUSPEND interrupt triggered. // To prevent being triggered when D+/D- are not stable, SUSPEND interrupt is only // enabled when we received SET_ADDRESS request and cleared on Bus Reset if ( int_status & USB_DEVICE_INTFLAG_SUSPEND ) { USB->DEVICE.INTFLAG.reg = USB_DEVICE_INTFLAG_SUSPEND; // Enable wakeup interrupt USB->DEVICE.INTFLAG.reg = USB_DEVICE_INTFLAG_WAKEUP; // clear pending USB->DEVICE.INTENSET.reg = USB_DEVICE_INTFLAG_WAKEUP; dcd_event_bus_signal(0, DCD_EVENT_SUSPEND, true); } // Wakeup interrupt is only enabled when we got suspended. // Wakeup interrupt will disable itself if ( int_status & USB_DEVICE_INTFLAG_WAKEUP ) { USB->DEVICE.INTFLAG.reg = USB_DEVICE_INTFLAG_WAKEUP; // disable wakeup interrupt itself USB->DEVICE.INTENCLR.reg = USB_DEVICE_INTFLAG_WAKEUP; dcd_event_bus_signal(0, DCD_EVENT_RESUME, true); } if ( int_status & USB_DEVICE_INTFLAG_EORST ) { USB->DEVICE.INTFLAG.reg = USB_DEVICE_INTFLAG_EORST; // Disable both suspend and wakeup interrupt USB->DEVICE.INTENCLR.reg = USB_DEVICE_INTFLAG_WAKEUP | USB_DEVICE_INTFLAG_SUSPEND; bus_reset(); dcd_event_bus_signal(0, DCD_EVENT_BUS_RESET, true); } // Setup packet received. maybe_handle_setup_packet(); }