Revision: 1674
Author: [email protected]
Date: Thu Feb 18 16:51:18 2010
Log: changed timer0 aliases: if target_cpu == PIC_14 then
http://code.google.com/p/jallib/source/detail?r=1674

Modified:
 /trunk/include/external/motor/servo/servo.jal

=======================================
--- /trunk/include/external/motor/servo/servo.jal       Tue Feb 16 22:23:44 2010
+++ /trunk/include/external/motor/servo/servo.jal       Thu Feb 18 16:51:18 2010
@@ -56,16 +56,16 @@
 var bit servo_7_on at servo_on : 6
 var bit servo_8_on at servo_on : 7

--- setup the timer aliases for the timer the user selected
+-- setup servo 1 to 8 timer aliases for the timer the user selected
 if SERVO_USE_TIMER == 0 then
+   -- aliases timer0 for 16f PICs
+   if target_cpu == PIC_14 then
+      alias t0con_t0cs is option_reg_t0cs
+      alias t0con_psa  is option_reg_psa
+      alias t0con_t0ps is option_reg_ps
+   end if
    -- set special timer0 settings
    t0con_psa  = 0  -- assign prescaler to timer0
-   -- aliases timer0 for 18f PICs
-   if target_cpu == PIC_16 then
-      alias option_reg_t0cs is t0con_t0cs
-      alias option_reg_psa is t0con_psa
-      alias option_reg_ps is t0con_t0ps
-   end if
    -- set timer registers to timer0
    alias servo_tmr      is tmr0            -- timer interval
    alias servo_cs       is t0con_t0cs      -- timer clock source bit
@@ -107,7 +107,7 @@
 procedure _servo_set_level(byte in servo_num, bit in level) is
    pragma inline

-   if servo_num == 1 & servo_1_on then
+   if servo_num == 0 & servo_1_on then
       servo_1 = level
    end if

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to