summaryrefslogtreecommitdiff
path: root/software/ttx
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2011-07-23 02:44:09 +0000
committerChristian Pointner <equinox@mur.at>2011-07-23 02:44:09 +0000
commit87a1598171c2f613767e9a7e5f47def9e1cb4d4f (patch)
treec9f162c53b8b5689e0d818f913ecefe7187bf9fb /software/ttx
parentadded safe mode checks (diff)
BEACON_INT is a variable now
git-svn-id: https://svn.spreadspace.org/mur.sat@40 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/ttx')
-rw-r--r--software/ttx/ttx.asm13
1 files changed, 8 insertions, 5 deletions
diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm
index 0100a13..69f56cf 100644
--- a/software/ttx/ttx.asm
+++ b/software/ttx/ttx.asm
@@ -44,7 +44,7 @@ ESPACE EQU .256 - .29
CSPACE EQU .256 - .87
WSPACE EQU .256 - .203
ENABLE_TIME EQU .256 - .10
-BEACON_INT EQU .10 ; *2 = Beacon Interval in seconds
+BCONINT_DEF EQU .10 ; *2 = Beacon Interval in seconds
;; I/O Pins
CWENABLE EQU GP0
@@ -66,6 +66,7 @@ PENTLECNT EQU H'0047'
BUF EQU H'0050'
;; all pages
+BEACON_INT EQU H'0079'
STATE EQU H'007A'
BEACONCNTH EQU H'007B'
BEACONCNTL EQU H'007C'
@@ -109,7 +110,7 @@ tmr1_int
disable_tmr1
bcf T1CON,TMR1ON
- movlw BEACON_INT
+ movf BEACON_INT,w
movwf SECCNT
interrupt_end
@@ -152,13 +153,15 @@ init
bcf GPIO,CWOUT
bcf GPIO,CWENABLE
- movlw BEACON_INT
+ movf BEACON_INT,w
movwf SECCNT
clrf STATE ; TODO: read State from EEPROM
clrf BEACONCNTL ; TODO: read Beaconcnt from EEPROM
clrf BEACONCNTH
-
+ movlw BCONINT_DEF ; TODO: read Beacon Interval from EEPROM
+ movwf BEACON_INT
+
btfss STATE,safe ; safe mode -> disable scheduler
bsf T1CON,TMR1ON
@@ -589,7 +592,7 @@ main
goto powerdown
;; this gets called every 2*BEACON_INT seconds
- movlw BEACON_INT
+ movf BEACON_INT,w
movwf SECCNT
call send_beacon