Beispiel #1
0
void ttl74123_device::start_pulse()
{
	attotime duration = compute_duration();

	if(timer_running())
	{
		/* retriggering, but not if we are called to quickly */
		attotime delay_time = attotime(0, ATTOSECONDS_PER_SECOND * m_cap * 220);

		if(m_timer->elapsed() >= delay_time)
		{
			m_timer->adjust(duration);

			if (LOG) logerror("74123 %s:  Retriggering pulse.  Duration: %f\n", tag(), duration.as_double());
		}
		else
		{
			if (LOG) logerror("74123 %s:  Retriggering failed.\n", tag());
		}
	}
	else
	{
		/* starting */
		m_timer->adjust(duration);

		set_output();

		if (LOG) logerror("74123 %s:  Starting pulse.  Duration: %f\n", tag(), duration.as_double());
	}
}
Beispiel #2
0
static void start_pulse(const device_config *device)
{
	ttl74123_t *chip = get_safe_token(device);

	attotime duration = compute_duration(chip);

	if (timer_running(chip))
	{
		/* retriggering, but not if we are called to quickly */
		attotime delay_time = attotime_make(0, ATTOSECONDS_PER_SECOND * chip->intf->cap * 220);

		if (attotime_compare(timer_timeelapsed(chip->timer), delay_time) >= 0)
		{
			timer_adjust_oneshot(chip->timer, duration, 0);

			if (LOG) logerror("74123 %s:  Retriggering pulse.  Duration: %f\n", device->tag, attotime_to_double(duration));
		}
		else
		{
			if (LOG) logerror("74123 %s:  Retriggering failed.\n", device->tag);
		}
	}
	else
	{
		/* starting */
		timer_adjust_oneshot(chip->timer, duration, 0);

		set_output(device);

		if (LOG) logerror("74123 %s:  Starting pulse.  Duration: %f\n", device->tag, attotime_to_double(duration));
	}
}
Beispiel #3
0
static void start_pulse(TTL74123_state *chip)
{
	attotime duration = compute_duration(chip);

	if (timer_running(chip))
	{
		/* retriggering, but not if we are called to quickly */
		attotime delay_time = attotime_make(0, ATTOSECONDS_PER_SECOND * chip->intf->cap * 220);

		if (attotime_compare(timer_timeelapsed(chip->timer), delay_time) >= 0)
		{
			timer_adjust(chip->timer, duration, 0, attotime_never);

			if (LOG) logerror("74123 #%d:  Retriggering pulse.  Duration: %f\n", chip->which, attotime_to_double(duration));
		}
		else
		{
			if (LOG) logerror("74123 #%d:  Retriggering failed.\n", chip->which);
		}
	}
	else
	{
		/* starting */
		timer_adjust(chip->timer, duration, 0, attotime_never);

		set_output(chip);

		if (LOG) logerror("74123 #%d:  Starting pulse.  Duration: %f\n", chip->which, attotime_to_double(duration));
	}
}
Beispiel #4
0
void ttl74123_device::start_pulse()
{
	attotime duration = compute_duration();

	if(timer_running())
	{
		/* retriggering, but not if we are called to quickly */
		attotime delay_time = attotime_make(0, ATTOSECONDS_PER_SECOND * m_config.m_cap * 220);

		if(attotime_compare(timer_timeelapsed(m_timer), delay_time) >= 0)
		{
			timer_adjust_oneshot(m_timer, duration, 0);

			if (LOG) logerror("74123 %s:  Retriggering pulse.  Duration: %f\n", tag(), attotime_to_double(duration));
		}
		else
		{
			if (LOG) logerror("74123 %s:  Retriggering failed.\n", tag());
		}
	}
	else
	{
		/* starting */
		timer_adjust_oneshot(m_timer, duration, 0);

		set_output();

		if (LOG) logerror("74123 %s:  Starting pulse.  Duration: %f\n", tag(), attotime_to_double(duration));
	}
}
Beispiel #5
0
void ttl74123_device::set_output()
{
	int output = timer_running();

	machine().scheduler().timer_set( attotime::zero, timer_expired_delegate(FUNC(ttl74123_device::output_callback ),this), output);

	if (LOG) logerror("74123 %s:  Output: %d\n", tag(), output);
}
Beispiel #6
0
static TIMER_CALLBACK( clear_callback )
{
	const device_config *device = (const device_config *)ptr;
	ttl74123_t *chip = get_safe_token(device);
	int output = timer_running(chip);

	chip->intf->output_changed_cb(device, 0, output);
}
Beispiel #7
0
void ttl74123_device::set_output()
{
	int output = timer_running();

	timer_set( &m_machine, attotime_zero, (void *)this, output, output_callback );

	if (LOG) logerror("74123 %s:  Output: %d\n", tag(), output);
}
void ttl74123_device::set_output()
{
	int output = timer_running();

	machine().scheduler().timer_set( attotime::zero, FUNC(output_callback ), output, (void *)this);

	if (LOG) logerror("74123 %s:  Output: %d\n", tag(), output);
}
Beispiel #9
0
static void set_output(TTL74123_state *chip)
{
	int output = timer_running(chip);

	chip->intf->output_changed_cb(output);

	if (LOG) logerror("74123 #%d:  Output: %d\n", chip->which, output);
}
Beispiel #10
0
static void set_output(const device_config *device)
{
	ttl74123_t *chip = get_safe_token(device);
	int output = timer_running(chip);

	timer_set( device->machine, attotime_zero, (void *) device, output, output_callback );

	if (LOG) logerror("74123 %s:  Output: %d\n", device->tag, output);
}
Beispiel #11
0
Datei: fc.c Projekt: 3a9LL/panda
/**
 * Free Fibre Channel exchange
 *
 * @v refcnt		Reference count
 */
static void fc_xchg_free ( struct refcnt *refcnt ) {
	struct fc_exchange *xchg =
		container_of ( refcnt, struct fc_exchange, refcnt );

	assert ( ! timer_running ( &xchg->timer ) );
	assert ( list_empty ( &xchg->list ) );

	fc_port_put ( xchg->port );
	free ( xchg );
}
Beispiel #12
0
int board_late_init(void)
{
	struct davinci_gpio *gpio = davinci_gpio_bank45;

	/* 24MHz InputClock / 15 prediv -> 1.6 MHz timer running */
	while ((get_timer_val() < CONFIG_AIT_TIMER_TIMEOUT) &&
		timer_running())
		;

	/* 1 sec reached -> stop timer, clear all LED */
	stop_timer();
	clrbits_le32(&gpio->out_data, CONFIG_CAM_ENC_LED_MASK);
	return 0;
}
Beispiel #13
0
void ttl74123_device::clear()
{
	int output = timer_running();

	m_config.m_output_changed_cb(this, 0, output);
}
Beispiel #14
0
void ttl74123_device::clear()
{
	int output = timer_running();

	m_output_changed(0, output);
}