summaryrefslogtreecommitdiff
path: root/Demo/NEC_V850ES_IAR/serial/serialISR.s85
blob: 01e81ff7f0767534e883a3e4509b366a4ea541a9 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
		RSEG ICODE:CODE

		EXTERN vUARTRxISRHandler
		EXTERN vUARTTxISRHandler		
		
		PUBLIC vUARTRxISRWrapper
		PUBLIC vUARTTxISRWrapper		

; Wrappers for the serial port interrupt service routines.  These can cause a
; context switch so requires an assembly wrapper.

; Defines the portSAVE_CONTEXT and portRESTORE_CONTEXT macros.
#include "ISR_Support.h"

vUARTRxISRWrapper:

	portSAVE_CONTEXT				; Save the context of the current task.

	jarl	vUARTRxISRHandler, lp	; Call the ISR routine.

	portRESTORE_CONTEXT				; Restore the context of the current task -
									; which may be different to the task that
									; was interrupted.

vUARTTxISRWrapper:

	portSAVE_CONTEXT				; Save the context of the current task.

	jarl	vUARTTxISRHandler, lp	; Call the ISR routine.

	portRESTORE_CONTEXT				; Restore the context of the current task -
									; which may be different to the task that
									; was interrupted.


      COMMON INTVEC:CODE:ROOT(2)
      ORG 2c0H
`??vUARTRxISRWrapper??INTVEC 2c0`:
        JR vUARTRxISRWrapper

      COMMON INTVEC:CODE:ROOT(2)
      ORG 2d0H
`??vUARTTxISRWrapper??INTVEC 2d0`:
        JR vUARTTxISRWrapper

	END