Ejemplo n.º 1
0
int main( void )
{
  // Stop watchdog timer to prevent time out reset

  while(1)
  {
    step_motor();
  }
}
Ejemplo n.º 2
0
void RTI(void) {
  ++rti_ticks;
  
  if (rti_ticks % 5 == 0) {
  	 step_motor(window_going_up);
  }
  
  if (rti_ticks == 1500) {
	disable_rti();
  }
  
  CRGFLG = 0x80;
}
Ejemplo n.º 3
0
static void c1551_port_w( device_t *device, UINT8 direction, UINT8 data )
{
	/*

        bit     description

        P0      STP0A
        P1      STP0B
        P2      MTR0
        P3      ACT0
        P4      WPS
        P5      DS0
        P6      DS1
        P7      BYTE LTCHED

    */

	c1551_t *c1551 = get_safe_token(device->owner());

	/* spindle motor */
	int mtr = BIT(data, 2);
	spindle_motor(c1551, mtr);

	/* stepper motor */
	int stp = data & 0x03;
	step_motor(c1551, mtr, stp);

	/* TODO activity LED */

	/* density select */
	int ds = (data >> 5) & 0x03;

	if (c1551->ds != ds)
	{
		c1551->bit_timer->adjust(attotime::zero, 0, attotime::from_hz(C2040_BITRATE[ds]/4));
		c1551->ds = ds;
	}
}