📄 ecp_ir.lst
字号:
; Get
current bit
count
104 000096 1483 dec R4
; Decrement bit count
105 000098 3220 jnz TACCR1Int_3
; Is it 0?
106 00009A 82436401 mov #0x0000,&TACCTL1
; Stop TA1
107 00009E 82436601 mov #0x0000,&TACCTL2
; Stop TA2
108 0000A2 0512 push R5
; Save Regs
109 0000A4 0612 push R6
110 0000A6 1540.... mov IRReadIndex,R5
; Get
the read
index
111 0000AA 1640.... mov IRWriteIndex,R6
; Get
the write
index
112 0000AE 2653 add #0x0002,R6
; Add 2 to write index
113 0000B0 36F03F00 and #0x003F,R6
; Indexes are 6 bits
114 0000B4 0695 cmp R5,R6
; Compare read
and next
115 0000B6
; write index
116 0000B6 1B24 jeq IRBUFFOVERRUN
; Out of buffer space,
117 0000B8
; IR overrun
118 0000B8 1440.... mov IRData,R4
; Get the
IR data
119 0000BC 3540.... mov #IRBuffer,R5
;
Pointer in
R5
120 0000C0 1550.... add IRWriteIndex,R5
; Add
the write
index
121 0000C4 85440000 mov R4,0(R5)
; Store to
buffer
122 0000C8 1540.... mov IRWriteIndex,R5
; Get
the write
index
123 0000CC 2553 add #0x0002,R5
; Increment the index
124 0000CE 35F03F00 and #0x003F,R5
; Index is 6 bits
125 0000D2 8045.... mov R5,IRWriteIndex
; Save the
index
126 0000D6 55423000 mov.b &P5IN,R5
; Read in
port 5
127 0000DA 75C02000 bic.b #MSP430_INT,R5
; Set the IR Event Flag
128 0000DE C2453100 mov.b R5,&P5OUT
; Write out
port 5
129 0000E2 B012.... call #ResetIR
; Setup for next IR
130 0000E6 3641 pop R6
; Restore Regs
131 0000E8 3541 pop R5
132 0000EA 3441 pop R4
133 0000EC 0013 reti
; Interrupt done
134 0000EE B012.... IRBUFFOVERRUN call #ResetIR
; Throw out last IR data
135 0000F2 F0D2.... bis.b #ECP_IR_OVERRUN,ECPStatu
s ; Indicate overrun
136 0000F6 3641 pop R6
; Restore Regs
137 0000F8 3541 pop R5
138 0000FA 3441 pop R4
139 0000FC 0013 reti
; Interrupt done
140 0000FE C044.... TACCR1Int_3 mov.b R4,IRBits
; Save
IRBITS
141 000102 1440.... mov IRData,R4
; Get IR
Data
142 000106 0454 rla R4
; Shift left once
143 000108 0512 push R5
; Save R5
144 00010A 15426401 mov &TACCTL1,R5
; Get
TACCTL1
145 00010E 35F00004 and #SCCI,R5
; Is SCCI bit set?
146 000112 0124 jz TACCR1Int_4
; No
147 000114 14D3 bis #0x0001,R4
; Set IRDATA LSB to 1
148 000116 8044.... TACCR1Int_4 mov R4, IRData
; Save
it
149 00011A 14427401 mov &TACCR1,R4
; Get
TACCR1
150 00011E 34501D00 add #BIT_50,R4
; Add 1/2 IR Bit time
151 000122 82447601 mov R4,&TACCR2
; Set TA2 to
generate
152 000126
; a timeout if next
153 000126
; packet edge is not
154 000126
; captured within 1/2
155 000126
; bit time
156 000126 B24010006601 mov #CCIE,&TACCTL2
; Compare mode, enable int
157 00012C B24010C96401 mov #CAP+CM1+CM0+SCS+CCIE,&TA
CCTL1 ; Capture mode, CCI1A
158 000132
; input, both edges
159 000132
; synchronous enable
160 000132
; interrupt
161 000132 3541 pop R5
; Restore Regs
162 000134 3441 pop R4
163 000136 0013 reti
164 000138
165 000138
166 000138 82436401 TACCR2Interrupt mov #0x0000,&TACCTL1
; Timeout, stop TA1
167 00013C 82436601 mov #0x0000,&TACCTL2
; Timeout, stop TA2
168 000140 B012.... call #ResetIR
; Reset for next time
169 000144 0013 reti
170 000146
171 000146
172 000146 ; **********************************************
******************************
173 000146 ; Function: PushInputEvent
174 000146 ;
175 000146 ; Purpose: Pushes an input event into the user
event cue.
176 000146 ;
177 000146 ; Inputs: R4 - Input event code, 16 bit
178 000146 ;
179 000146 ; Returns: None
180 000146 ; **********************************************
******************************
181 000146 ;PushInputEvent
182 000146
183 000146
184 000146
185 000146 END
##############################
# CRC:CAB5 #
# Errors: 0 #
# Warnings: 0 #
# Bytes: 330 #
##############################
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -