本文整理汇总了C++中required_device::configure_channels方法的典型用法代码示例。如果您正苦于以下问题:C++ required_device::configure_channels方法的具体用法?C++ required_device::configure_channels怎么用?C++ required_device::configure_channels使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类required_device
的用法示例。
在下文中一共展示了required_device::configure_channels方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lwriter
void lwriter_state::lwriter(machine_config &config)
{
M68000(config, m_maincpu, CPU_CLK);
m_maincpu->set_addrmap(AS_PROGRAM, &lwriter_state::maincpu_map);
SCC8530N(config, m_scc, CPU_CLK);
m_scc->configure_channels(RXC_CLK, 0, RXC_CLK, 0);
/* Port A */
m_scc->out_txda_callback().set("rs232a", FUNC(rs232_port_device::write_txd));
m_scc->out_dtra_callback().set("rs232a", FUNC(rs232_port_device::write_dtr));
m_scc->out_rtsa_callback().set("rs232a", FUNC(rs232_port_device::write_rts));
/* Port B */
m_scc->out_txdb_callback().set("rs232b", FUNC(rs232_port_device::write_txd));
m_scc->out_dtrb_callback().set("rs232b", FUNC(rs232_port_device::write_dtr));
m_scc->out_rtsb_callback().set("rs232b", FUNC(rs232_port_device::write_rts));
/* Interrupt */
m_scc->out_int_callback().set("via", FUNC(via6522_device::write_ca1));
//m_scc->out_int_callback().set(FUNC(lwriter_state::scc_int));
rs232_port_device &rs232a(RS232_PORT(config, "rs232a", default_rs232_devices, "terminal"));
rs232a.rxd_handler().set("scc", FUNC(scc8530_device::rxa_w));
rs232a.cts_handler().set("scc", FUNC(scc8530_device::ctsa_w));
rs232_port_device &rs232b(RS232_PORT(config, "rs232b", default_rs232_devices, "terminal"));
rs232b.rxd_handler().set("scc", FUNC(scc8530_device::rxb_w));
rs232b.cts_handler().set("scc", FUNC(scc8530_device::ctsb_w));
#if TPI
TPI6525(config, "tpi", 0);
#else
VIA6522(config, m_via, CPU_CLK/10); // 68000 E clock presumed
m_via->readpa_handler().set(FUNC(lwriter_state::via_pa_r));
m_via->readpb_handler().set(FUNC(lwriter_state::via_pb_r));
m_via->writepa_handler().set(FUNC(lwriter_state::via_pa_w));
m_via->writepb_handler().set(FUNC(lwriter_state::via_pb_w));
m_via->cb1_handler().set(FUNC(lwriter_state::via_cb1_w));
m_via->ca2_handler().set(FUNC(lwriter_state::via_ca2_w));
m_via->cb2_handler().set(FUNC(lwriter_state::via_cb2_w));
m_via->irq_handler().set(FUNC(lwriter_state::via_int_w));
#endif
}