-
Notifications
You must be signed in to change notification settings - Fork 1
/
c_user_reg.asm
34 lines (26 loc) · 965 Bytes
/
c_user_reg.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
;==USART task
.def URX0 = R1 ; buffer
.def URX1 = R2
.def URXC = R3 ; buffer state
.def UCC0 = R4 ; received command
.def UCC1 = R5 ; received parameter
;==BEEPER task
.def BEEPER_STATE = R6 ; current state of timer
.def BEEPER_ENABLED = R7 ; enabled/disabled state
.equ BPR_PORTB_MASK = 0b00001000 ; port pin mask
.equ BEEPER_DELAY = 7 ; number used for SetTimerTask (beeper freq)
.equ BEEPER_TOP = 125 ; TOP value for timer
;==LED task
.def LED_STATE = R8 ; which leds are on
.def LED_SWITCH = R9 ; alarm led os other leds is on
.equ LED_DELAY = 255 ; number for SetTimerTask
.equ LED_PORTD_MASK = 0b11000000 ; output pins
.equ LED_PORTB_MASK = 0b00000111
;==WDR task
.def WDR_CNT_LOW = R10 ; counter regs
.def WDR_RST = R11 ; wdr called?
.def WDR_ARMED = R12
.equ WDR_TS_DELAY = 235 ; value for SetTimerTask
.equ WDR_PORTC_MASK = 0b00001000 ; wdr reset output pin mask
;==BTN task
.equ BTN_PULLUP_MSK = 0b00111000 ; pullup