bool bitbanger_device::dec_tune(bool test) { int adjust_tune = m_tune - 1; if( adjust_tune < 0 ) return FALSE; if( !test) { m_tune = adjust_tune; m_current_baud = attotime::from_hz(baud_value()); } return TRUE; }
bool bitbanger_device::inc_baud(bool test) { int adjust_baud = (int)m_baud + 1; if( adjust_baud >= BITBANGER_BAUD_MAX ) return FALSE; if( !test) { m_baud = adjust_baud; m_current_baud = attotime::from_hz(baud_value()); } return TRUE; }
bool bitbanger_device::inc_tune(bool test) { int adjust_tune = (int)m_tune + 1; if( adjust_tune >= BITBANGER_TUNE_MAX ) return FALSE; if (!test) { m_tune = adjust_tune; m_current_baud = attotime::from_hz(baud_value()); } return TRUE; }
void bitbanger_device::device_start(void) { /* output config */ m_build_count = 0; m_output_timer = timer_alloc(TIMER_OUTPUT); /* input config */ m_input_timer = timer_alloc(TIMER_INPUT); m_idle_delay = attotime::from_seconds(1); m_input_buffer_size = 0; m_input_buffer_cursor = 0; /* defaults */ m_mode = m_default_mode; m_baud = m_default_baud; m_tune = m_default_tune; m_current_baud = attotime::from_hz(baud_value()); /* callback */ m_input_func.resolve(m_input_callback, *this); }