[rtems commit] libchip/serial - Only use set_vector() on Simple Vectored Architectures

Joel Sherrill joel at rtems.org
Wed May 9 21:55:53 UTC 2012


Module:    rtems
Branch:    master
Commit:    a29909cb87b5dce4385b78c55fa1ac4cbd14a779
Changeset: http://git.rtems.org/rtems/commit/?id=a29909cb87b5dce4385b78c55fa1ac4cbd14a779

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Mon May  7 18:26:51 2012 -0500

libchip/serial - Only use set_vector() on Simple Vectored Architectures

---

 c/src/libchip/serial/mc68681.c |    7 ++++++-
 c/src/libchip/serial/z85c30.c  |    6 +++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/c/src/libchip/serial/mc68681.c b/c/src/libchip/serial/mc68681.c
index 1a2e2f1..47781c2 100644
--- a/c/src/libchip/serial/mc68681.c
+++ b/c/src/libchip/serial/mc68681.c
@@ -55,7 +55,10 @@ console_fns mc68681_fns_polled =
   false,                               /* deviceOutputUsesInterrupts */
 };
 
-extern void set_vector( rtems_isr_entry, rtems_vector_number, int );
+
+#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
+  extern void set_vector( rtems_isr_entry, rtems_vector_number, int );
+#endif
 
 /*
  *  Console Device Driver Entry Points
@@ -432,7 +435,9 @@ MC68681_STATIC void mc68681_initialize_interrupts(int minor)
 
   Console_Port_Data[minor].bActive = FALSE;
 
+#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
   set_vector(mc68681_isr, Console_Port_Tbl[minor]->ulIntVector, 1);
+#endif
 
   mc68681_enable_interrupts(minor,MC68681_IMR_ENABLE_ALL_EXCEPT_TX);
 }
diff --git a/c/src/libchip/serial/z85c30.c b/c/src/libchip/serial/z85c30.c
index e6adf33..f5ebde8 100644
--- a/c/src/libchip/serial/z85c30.c
+++ b/c/src/libchip/serial/z85c30.c
@@ -80,7 +80,9 @@ console_fns z85c30_fns_polled = {
   false                              /* deviceOutputUsesInterrupts */
 };
 
-extern void set_vector( rtems_isr_entry, rtems_vector_number, int );
+#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
+  extern void set_vector( rtems_isr_entry, rtems_vector_number, int );
+#endif
 
 /*
  *  z85c30_initialize_port
@@ -722,7 +724,9 @@ Z85C30_STATIC void z85c30_initialize_interrupts(
     z85c30_negate_RTS(minor);
   }
 
+#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
   set_vector(z85c30_isr, Console_Port_Tbl[minor]->ulIntVector, 1);
+#endif
 
   z85c30_enable_interrupts(minor, SCC_ENABLE_ALL_INTR_EXCEPT_TX);
 




More information about the vc mailing list