chiark / gitweb /
add tick.asm and compile it (but still does not link)
authorian <ian>
Sun, 25 Dec 2005 23:30:32 +0000 (23:30 +0000)
committerian <ian>
Sun, 25 Dec 2005 23:30:32 +0000 (23:30 +0000)
detpic/Makefile
detpic/points.fin
detpic/program.asm
detpic/tick.asm
detpic/tick.fin

index 1604c08f424bdef218954ace57d3f02a5149eefd..05d86b9cb5c38e91b6eab8e3586c269d54c4237d 100644 (file)
@@ -6,7 +6,7 @@ PROGRAMS=               program
 OBJS_program=          vectors.o panic.o routines-led.o i2clib+panic.o \
                        misc.o detect.o variables.o points.o serout.o   \
                        syncwrite.o mascan.o energy.o                   \
-                       reverse.o nmra-stream.o
+                       reverse.o nmra-stream.o tick.o
 XCODEN_program=        morse
 XCODE1_program=        ours+pindata
 
index f17c081d7ea9df57b616b430f87d4ad7006706bc..cbd978b54fdec4c8d2b748f7e04843999abed8ff 100644 (file)
@@ -4,5 +4,6 @@
  extern points_local_intrl
  extern points_needwrite
  extern points_getwritebyte
- extern cdu_init
  extern got_pointed
+ extern cdu_init
+ extern cdu_tick
index 46ce961863ed32d216afa4af48309dc85f773fd8..bce676150ff094d162a7a4ee0b70704284062b8a 100644 (file)
@@ -75,12 +75,13 @@ master_init
        call    nmra_init
        call    serialtxfc_init
        call    mascan_init
+       call    tick_init
        return
 
 ;----------------------------------------
 master_interrupt_low
        enter_interrupt_low
-       call    ticker_intrl
+       call    tick_intrl
        call    nmra_serialrx_intrl
        call    serialtx_intrl
        call    points_local_intrl
index 1424ae3d4f8e1dd8b017c15d966182bef20d1491..9c35fb073c53f0f6108f8ac7bde31cb845221bcc 100644 (file)
@@ -1,18 +1,18 @@
 ;======================================================================
-; TICKER - regular 10ms timer interrupt
+; TICK - REGULAR 10MS TIMER INTERRUPT
 ;
-; after ticker_init, and after interrupts enabled,
+; after tick_init, and after interrupts enabled,
 ; we call <foo>_tick every 10ms.
 
  include common.inc
  code
 
 ;----------------------------------------
-ticker_init
-;  Timer 2             any                     used for ticker
-       mov_lw  tick_timer2scale ; disable (in case already running)
+tick_init
+;  Timer 2             any                     used for tick
+       mov_lw  tick_master_t2scale ; disable (in case already running)
        mov_wf  T2CON
-       mov_lw  tick_timer2period
+       mov_lw  tick_master_t2cycles
        mov_wf  PR2
        bc_f    PIR1, TMR2IF ; clear any previous interrupt
        bc_f    IPR1, TMR2IP ; low priority
@@ -21,7 +21,7 @@ ticker_init
        return
 
 ;----------------------------------------
-ticker_intrl
+tick_intrl
        bt_f_if0 PIR1, TMR2IF
        return
        ; we have an interrupt
index 7cf7f0c8dc0f945816752fcad5d2fc7d3de0feb0..18adad3ab17b803e5e73caf69ca473312206cf43 100644 (file)
@@ -1 +1,2 @@
- extern ticker_intrl
+ extern tick_init
+ extern tick_intrl