summaryrefslogtreecommitdiff
path: root/Demo/NEC_V850ES_IAR/serial/serialISR.s85
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/NEC_V850ES_IAR/serial/serialISR.s85')
-rw-r--r--Demo/NEC_V850ES_IAR/serial/serialISR.s8547
1 files changed, 47 insertions, 0 deletions
diff --git a/Demo/NEC_V850ES_IAR/serial/serialISR.s85 b/Demo/NEC_V850ES_IAR/serial/serialISR.s85
new file mode 100644
index 00000000..01e81ff7
--- /dev/null
+++ b/Demo/NEC_V850ES_IAR/serial/serialISR.s85
@@ -0,0 +1,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
+