From 87a1598171c2f613767e9a7e5f47def9e1cb4d4f Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 23 Jul 2011 02:44:09 +0000 Subject: BEACON_INT is a variable now git-svn-id: https://svn.spreadspace.org/mur.sat@40 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- software/ttx/ttx.asm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'software/ttx') 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 -- cgit v1.2.3