Permalink
Browse files

Rename Timer registers to their proper name.

The short name was used for the Timer registers.
Not all header files define these short names resulting in a compiler warning.
  • Loading branch information...
robertinant committed Oct 6, 2012
1 parent c4877f2 commit 201ff1853b25cabb21f70d406b0e26ef85be47dd
Showing with 6 additions and 6 deletions.
  1. +6 −6 hardware/msp430/libraries/Servo/Servo.cpp
@@ -72,12 +72,12 @@ Timer_A(void)
digitalWrite(servos[counter].Pin.nbr, HIGH);
/* And hold! */
totalWait += servos[counter].ticks;
- CCR0 = servos[counter].ticks;
+ TA0CCR0 = servos[counter].ticks;
} else {
/* Wait for the remaining of REFRESH_INTERVAL. */
wait = usToTicks(REFRESH_INTERVAL) - totalWait;
totalWait = 0;
- CCR0 = (wait < 1000 ? 1000 : wait);
+ TA0CCR0 = (wait < 1000 ? 1000 : wait);
counter = -1;
}
}
@@ -106,15 +106,15 @@ static void enableTimer(void)
Timer_A(); // enable first servo
- CCTL0 = CCIE; // CCR0 interrupt enabled
- TACTL = TASSEL_2 + MC_1 + ID_3; // prescale SMCLK/8, upmode
+ TA0CCTL0 = CCIE; // CCR0 interrupt enabled
+ TA0CTL = TASSEL_2 + MC_1 + ID_3; // prescale SMCLK/8, upmode
}
static void disableTimer(void)
{
// disable interrupt
- CCTL0 = 0;
- CCR0 = 0;
+ TA0CCTL0 = 0;
+ TA0CCR0 = 0;
}

0 comments on commit 201ff18

Please sign in to comment.