[rtems commit] bsp: Fix CLOCK_DRIVER_USE_FAST_IDLE and CLOCK_DRIVER_ISRS_PER_TICK.

Chris Johns chrisj at rtems.org
Wed Aug 14 01:49:00 UTC 2013


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

Author:    Chris Johns <chrisj at rtems.org>
Date:      Wed Aug 14 11:53:28 2013 +1000

bsp: Fix CLOCK_DRIVER_USE_FAST_IDLE and CLOCK_DRIVER_ISRS_PER_TICK.

Use the value rather than being defined. This allows inverted
logic to be used.

---

 c/src/lib/libbsp/shared/clockdrv_shell.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/c/src/lib/libbsp/shared/clockdrv_shell.h b/c/src/lib/libbsp/shared/clockdrv_shell.h
index 7919261..4a455bb 100644
--- a/c/src/lib/libbsp/shared/clockdrv_shell.h
+++ b/c/src/lib/libbsp/shared/clockdrv_shell.h
@@ -1,6 +1,6 @@
 /**
  *  @file
- *  
+ *
  *  Clock Tick Device Driver Shell
  */
 
@@ -17,7 +17,7 @@
 
 #include <bsp.h>
 
-#if defined(CLOCK_DRIVER_USE_FAST_IDLE) && defined(CLOCK_DRIVER_ISRS_PER_TICK)
+#if CLOCK_DRIVER_USE_FAST_IDLE && CLOCK_DRIVER_ISRS_PER_TICK
 #error "clockdrv_shell.h: Fast Idle PLUS n ISRs per tick is not supported"
 #endif
 
@@ -58,7 +58,7 @@ void Clock_exit( void );
     (CPU_SIMPLE_VECTORED_INTERRUPTS != TRUE)
 void Clock_isr(void *arg)
 {
-#else 
+#else
 rtems_isr Clock_isr(rtems_vector_number vector);
 rtems_isr Clock_isr(
   rtems_vector_number vector
@@ -70,7 +70,7 @@ rtems_isr Clock_isr(
    */
   Clock_driver_ticks += 1;
 
-  #ifdef CLOCK_DRIVER_USE_FAST_IDLE
+  #if CLOCK_DRIVER_USE_FAST_IDLE
     do {
       rtems_clock_tick();
     } while (
@@ -89,7 +89,7 @@ rtems_isr Clock_isr(
      */
     Clock_driver_support_at_tick();
 
-    #ifdef CLOCK_DRIVER_ISRS_PER_TICK
+    #if CLOCK_DRIVER_ISRS_PER_TICK
       /*
        *  The driver is multiple ISRs per clock tick.
        */
@@ -182,7 +182,7 @@ rtems_device_driver Clock_initialize(
   /*
    *  If we are counting ISRs per tick, then initialize the counter.
    */
-  #ifdef CLOCK_DRIVER_ISRS_PER_TICK
+  #if CLOCK_DRIVER_ISRS_PER_TICK
     Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK;
   #endif
 




More information about the vc mailing list