Author: jsuijs
Date: Mon Dec 22 06:05:50 2008
New Revision: 636

Modified:
    trunk/unvalidated/include/peripheral/timer/timer0_isr_interval.jal
    trunk/unvalidated/sample/test/peripheral/timer/test_timer0_interval.jal

Log:
jsg fix

Modified: trunk/unvalidated/include/peripheral/timer/timer0_isr_interval.jal
==============================================================================
--- trunk/unvalidated/include/peripheral/timer/timer0_isr_interval.jal   
(original)
+++ trunk/unvalidated/include/peripheral/timer/timer0_isr_interval.jal  Mon  
Dec 22 06:05:50 2008
@@ -11,10 +11,10 @@
  -- TODO:
  --

-var word IsrCounter
-var word PrevIsrCounter
+var word isr_counter
+var word prev_isr_counter

-var word IsrCountdown[DELAY_SLOTS]
+var word isr_countdown[DELAY_SLOTS]
  var byte timer0_load

  procedure set_delay(byte in slot, word in ticks) is
@@ -22,7 +22,7 @@
     if (slot >= DELAY_SLOTS) then return end if

        INTCON_T0IE = off
-       IsrCountdown[slot] = ticks
+       isr_countdown[slot] = ticks
        INTCON_T0IE = on
        
  end procedure
@@ -31,8 +31,8 @@

     if (slot >= DELAY_SLOTS) then return true end if

-       if (IsrCountdown[slot] == 0) then
-       if (IsrCountdown[slot] == 0) then
+       if (isr_countdown[slot] == 0) then
+       if (isr_countdown[slot] == 0) then
           -- note: double checking is done to cope with the isr
           -- decrementing from 0x100 to 0x0ff without disabling the isr.
              return true    -- delay passed
@@ -94,19 +94,19 @@

  end procedure

-procedure ISR is
+procedure ISR() is
  pragma interrupt

        if INTCON_T0IF == true then
        tmr0 = timer0_load

        -- counters
-      IsrCounter = IsrCounter + 1
+      isr_counter = isr_counter + 1

        var byte index
        for DELAY_SLOTS using index loop
-         if (IsrCountdown[index] != 0) then
-            IsrCountdown[index] = IsrCountdown[index] - 1
+         if (isr_countdown[index] != 0) then
+            isr_countdown[index] = isr_countdown[index] - 1
           end if
        end loop


Modified:  
trunk/unvalidated/sample/test/peripheral/timer/test_timer0_interval.jal
==============================================================================
--- trunk/unvalidated/sample/test/peripheral/timer/test_timer0_interval.jal     
 
(original)
+++ trunk/unvalidated/sample/test/peripheral/timer/test_timer0_interval.jal     
 
Mon Dec 22 06:05:50 2008
@@ -32,19 +32,19 @@

     forever loop

-      if (IsrCounter != PrevIsrCounter) then
-         PrevIsrCounter = IsrCounter
+      if (isr_counter != prev_isr_counter) then
+         prev_isr_counter = isr_counter
           -- put here code that you want
           -- to execute each tick.
        end if ; 1 kHz loop

        if (check_delay(0)) then
           set_delay(0, 409) -- 409 ticks on delay-slot 0
-         Led = !Led
+         led = !led
        end if
        if (check_delay(1)) then
           set_delay(1, 619) -- 619 ticks on delay-slot 1
-         Led2 = !Led2
+         led2 = !led2
        end if
     end loop


--~--~---------~--~----~------------~-------~--~----~
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