fixing merge conflict
authorArthur Wolf <wolf.arthur@gmail.com>
Sat, 16 Mar 2013 20:03:41 +0000 (21:03 +0100)
committerArthur Wolf <wolf.arthur@gmail.com>
Sat, 16 Mar 2013 20:03:41 +0000 (21:03 +0100)
1  2 
src/libs/StepTicker.cpp
src/libs/StepperMotor.cpp
src/main.cpp

@@@ -150,18 -131,26 +144,26 @@@ extern "C" void TIMER1_IRQHandler (void
  // The actual interrupt handler where we do all the work
  extern "C" void TIMER0_IRQHandler (void){
  
 -    LPC_TIM0->IR |= 1 << 0;
 -
 -    // If no axes enabled, just ignore for now
 -    if( global_step_ticker->active_motor_bm == 0 ){
 -        return;
 -    }
 +    LPC_GPIO3->FIODIR |= 1<<25;
 +    LPC_GPIO1->FIODIR |= 1<<22;
 +    LPC_GPIO1->FIODIR |= 1<<23;
 +    LPC_GPIO1->FIODIR |= 1<<30;
 +    LPC_GPIO1->FIODIR |= 1<<31;
 +    LPC_GPIO1->FIOSET =  1<<22;
  
 -    // Do not get out of here before everything is nice and tidy
 -    LPC_TIM0->MR0 = 2000000;
 +    // Reset interrupt register
 +    LPC_TIM0->IR |= 1 << 0;
  
      // Step pins
-     global_step_ticker->tick();
+     //global_step_ticker->tick();
+     _isr_context = true;
+     uint16_t bitmask = 1;
+     for (uint8_t motor = 0; motor < 12; motor++, bitmask <<= 1){
+         if (global_step_ticker->active_motor_bm & bitmask){
+             global_step_ticker->active_motors[motor]->tick();
+         }
+     }
+     _isr_context = false;
  
      // We may have set a pin on in this tick, now we start the timer to set it off
      if( global_step_ticker->reset_step_pins ){
Simple merge
diff --cc src/main.cpp
@@@ -71,7 -77,7 +72,7 @@@ int main() 
  
      Kernel* kernel = new Kernel();
  
-     kernel->streams->printf("Smoothie ( grbl port ) version 0.7.2 with new accel \r\n");
 -    kernel->streams->printf("Smoothie ( grbl port ) version 0.7.2 @%dMHz\r\n", SystemCoreClock / 1000000);
++    kernel->streams->printf("Smoothie ( grbl port ) version 0.7.2 with new accel @%dMHz\r\n", SystemCoreClock / 1000000);
  
      // Create and add main modules
      kernel->add_module( new Laser() );