clean up + uart tx fix
[my-code/atmel.git] / hdw-tank / motor.asm
index 5b630ed..3339c99 100644 (file)
@@ -8,56 +8,56 @@
 MOTOR_INIT:
 
        ; ports -> output
-       in tmp_motor,DDRB
-       sbr tmp_motor,(1<<MOT_DIR_L)|(1<<MOT_DIR_R)
-       sbr tmp_motor,(1<<MOT_PWR_L)|(1<<MOT_PWR_R)
-       out DDRB,tmp_motor
+       in tmp1,DDRB
+       sbr tmp1,(1<<MOT_DIR_L)|(1<<MOT_DIR_R)
+       sbr tmp1,(1<<MOT_PWR_L)|(1<<MOT_PWR_R)
+       out DDRB,tmp1
 
 MOTOR_STOP:
 
        ; output zero
-       in tmp_motor,PORTB
-       cbr tmp_motor,(1<<MOT_DIR_L)|(1<<MOT_DIR_R)
-       cbr tmp_motor,(1<<MOT_PWR_L)|(1<<MOT_PWR_R)
-       out PORTB,tmp_motor
+       in tmp1,PORTB
+       cbr tmp1,(1<<MOT_DIR_L)|(1<<MOT_DIR_R)
+       cbr tmp1,(1<<MOT_PWR_L)|(1<<MOT_PWR_R)
+       out PORTB,tmp1
 
        ret
 
 MOTOR_FWD:
 
-       in tmp_motor,PORTB
-       sbr tmp_motor,(1<<MOT_DIR_L)|(1<<MOT_DIR_R)
-       sbr tmp_motor,(1<<MOT_PWR_L)|(1<<MOT_PWR_R)
-       out PORTB,tmp_motor
+       in tmp1,PORTB
+       sbr tmp1,(1<<MOT_DIR_L)|(1<<MOT_DIR_R)
+       sbr tmp1,(1<<MOT_PWR_L)|(1<<MOT_PWR_R)
+       out PORTB,tmp1
 
        ret
 
 MOTOR_BWD:
 
-       in tmp_motor,PORTB
-       cbr tmp_motor,(1<<MOT_DIR_L)|(1<<MOT_DIR_R)
-       sbr tmp_motor,(1<<MOT_PWR_L)|(1<<MOT_PWR_R)
-       out PORTB,tmp_motor
+       in tmp1,PORTB
+       cbr tmp1,(1<<MOT_DIR_L)|(1<<MOT_DIR_R)
+       sbr tmp1,(1<<MOT_PWR_L)|(1<<MOT_PWR_R)
+       out PORTB,tmp1
 
        ret
 
 MOTOR_RIGHT:
 
-       in tmp_motor,PORTB
-       sbr tmp_motor,(1<<MOT_DIR_L)
-       cbr tmp_motor,(1<<MOT_DIR_R)
-       sbr tmp_motor,(1<<MOT_PWR_L)|(1<<MOT_PWR_R)
-       out PORTB,tmp_motor
+       in tmp1,PORTB
+       sbr tmp1,(1<<MOT_DIR_L)
+       cbr tmp1,(1<<MOT_DIR_R)
+       sbr tmp1,(1<<MOT_PWR_L)|(1<<MOT_PWR_R)
+       out PORTB,tmp1
 
        ret
 
 MOTOR_LEFT:
 
-       in tmp_motor,PORTB
-       sbr tmp_motor,(1<<MOT_DIR_R)
-       cbr tmp_motor,(1<<MOT_DIR_L)
-       sbr tmp_motor,(1<<MOT_PWR_L)|(1<<MOT_PWR_R)
-       out PORTB,tmp_motor
+       in tmp1,PORTB
+       sbr tmp1,(1<<MOT_DIR_R)
+       cbr tmp1,(1<<MOT_DIR_L)
+       sbr tmp1,(1<<MOT_PWR_L)|(1<<MOT_PWR_R)
+       out PORTB,tmp1
 
        ret