change log for rtems (2010-10-21)

rtems-vc at rtems.org rtems-vc at rtems.org
Thu Oct 21 14:10:53 UTC 2010


 *sh*:
2010-10-21	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* include/tm27.h: New file.
	* Makefile.am, preinstall.am: Reflect change above.
	* include/bsp.h: Fixed lpc32xx_micro_seconds_delay().
	* misc/timer.c: Support for timer tests.

M   1.19  c/src/lib/libbsp/arm/lpc32xx/ChangeLog
M    1.8  c/src/lib/libbsp/arm/lpc32xx/Makefile.am
M    1.6  c/src/lib/libbsp/arm/lpc32xx/include/bsp.h
A    1.1  c/src/lib/libbsp/arm/lpc32xx/include/tm27.h
M    1.2  c/src/lib/libbsp/arm/lpc32xx/misc/timer.c
M    1.7  c/src/lib/libbsp/arm/lpc32xx/preinstall.am

diff -u rtems/c/src/lib/libbsp/arm/lpc32xx/ChangeLog:1.18 rtems/c/src/lib/libbsp/arm/lpc32xx/ChangeLog:1.19
--- rtems/c/src/lib/libbsp/arm/lpc32xx/ChangeLog:1.18	Thu Oct 14 04:37:18 2010
+++ rtems/c/src/lib/libbsp/arm/lpc32xx/ChangeLog	Thu Oct 21 08:58:18 2010
@@ -1,3 +1,10 @@
+2010-10-21	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
+	* include/tm27.h: New file.
+	* Makefile.am, preinstall.am: Reflect change above.
+	* include/bsp.h: Fixed lpc32xx_micro_seconds_delay().
+	* misc/timer.c: Support for timer tests.
+
 2010-10-14	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
 	* include/emc.h, include/i2c.h, include/lpc32xx.h, include/nand-mlc.h:

diff -u rtems/c/src/lib/libbsp/arm/lpc32xx/Makefile.am:1.7 rtems/c/src/lib/libbsp/arm/lpc32xx/Makefile.am:1.8
--- rtems/c/src/lib/libbsp/arm/lpc32xx/Makefile.am:1.7	Tue Sep 28 09:38:26 2010
+++ rtems/c/src/lib/libbsp/arm/lpc32xx/Makefile.am	Thu Oct 21 08:58:18 2010
@@ -21,7 +21,7 @@
 ###############################################################################
 
 include_HEADERS = include/bsp.h
-include_HEADERS += ../../shared/include/tm27.h
+include_HEADERS += include/tm27.h
 
 nodist_include_HEADERS = ../../shared/include/coverhd.h \
 	include/bspopts.h

diff -u rtems/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h:1.5 rtems/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h:1.6
--- rtems/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h:1.5	Wed Jun 23 03:27:56 2010
+++ rtems/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h	Thu Oct 21 08:58:18 2010
@@ -102,12 +102,12 @@
 static inline void lpc32xx_micro_seconds_delay(unsigned us)
 {
   unsigned start = lpc32xx_timer();
-  unsigned end = start + us * (LPC32XX_PERIPH_CLK / 1000000);
-  unsigned now = 0;
+  unsigned delay = us * (LPC32XX_PERIPH_CLK / 1000000);
+  unsigned elapsed = 0;
 
   do {
-    now = lpc32xx_timer();
-  } while (now < end);
+    elapsed = lpc32xx_timer() - start;
+  } while (elapsed < delay);
 }
 
 void lpc32xx_restart(void *addr);

diff -u /dev/null rtems/c/src/lib/libbsp/arm/lpc32xx/include/tm27.h:1.1
--- /dev/null	Thu Oct 21 09:10:52 2010
+++ rtems/c/src/lib/libbsp/arm/lpc32xx/include/tm27.h	Thu Oct 21 08:58:18 2010
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2010 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Obere Lagerstr. 30
+ *  82178 Puchheim
+ *  Germany
+ *  <info at embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#ifndef _RTEMS_TMTEST27
+#error "This is an RTEMS internal file you must not include directly."
+#endif
+
+#ifndef __tm27_h
+#define __tm27_h
+
+#define MUST_WAIT_FOR_INTERRUPT 0
+
+#include <assert.h>
+
+#include <rtems.h>
+
+#include <bsp/lpc32xx.h>
+#include <bsp/irq.h>
+#include <bsp/irq-generic.h>
+
+#define MUST_WAIT_FOR_INTERRUPT 1
+
+static void Install_tm27_vector(void (*handler)(rtems_vector_number))
+{
+  rtems_status_code sc = RTEMS_SUCCESSFUL;
+
+  LPC32XX_SW_INT = 0;
+
+  sc = rtems_interrupt_handler_install(
+    LPC32XX_IRQ_SW,
+    "SW",
+    RTEMS_INTERRUPT_UNIQUE,
+    (rtems_interrupt_handler) handler,
+    NULL
+  );
+  assert(sc == RTEMS_SUCCESSFUL);
+}
+
+static void Cause_tm27_intr(void)
+{
+  LPC32XX_SW_INT = 0x1;
+}
+
+static void Clear_tm27_intr(void)
+{
+  LPC32XX_SW_INT = 0;
+  lpc32xx_irq_set_priority(LPC32XX_IRQ_SW, LPC32XX_IRQ_PRIORITY_LOWEST);
+}
+
+static void Lower_tm27_intr(void)
+{
+  bsp_interrupt_vector_enable(LPC32XX_IRQ_SW);
+  lpc32xx_irq_set_priority(LPC32XX_IRQ_SW, LPC32XX_IRQ_PRIORITY_HIGHEST);
+}
+
+#endif /* __tm27_h */

diff -u rtems/c/src/lib/libbsp/arm/lpc32xx/misc/timer.c:1.1 rtems/c/src/lib/libbsp/arm/lpc32xx/misc/timer.c:1.2
--- rtems/c/src/lib/libbsp/arm/lpc32xx/misc/timer.c:1.1	Tue Dec 15 09:20:47 2009
+++ rtems/c/src/lib/libbsp/arm/lpc32xx/misc/timer.c	Thu Oct 21 08:58:18 2010
@@ -22,16 +22,10 @@
 #include <rtems.h>
 #include <rtems/timerdrv.h>
 
-static bool benchmark_timer_find_average_overhead = false;
+#include <bsp.h>
 
 static uint32_t benchmark_timer_base;
 
-/* TODO */
-static uint32_t lpc32xx_timer(void)
-{
-  return 0;
-}
-
 void benchmark_timer_initialize(void)
 {
   benchmark_timer_base = lpc32xx_timer();
@@ -39,17 +33,10 @@
 
 uint32_t benchmark_timer_read(void)
 {
-  uint32_t delta = lpc32xx_timer() - benchmark_timer_base;
-
-  if (benchmark_timer_find_average_overhead) {
-    return delta;
-  } else {
-    /* TODO */
-    return 0;
-  }
+  return lpc32xx_timer() - benchmark_timer_base;
 }
 
 void benchmark_timer_disable_subtracting_average_overhead(bool find_average_overhead)
 {
-  benchmark_timer_find_average_overhead = find_average_overhead;
+  /* VOID */
 }

diff -u rtems/c/src/lib/libbsp/arm/lpc32xx/preinstall.am:1.6 rtems/c/src/lib/libbsp/arm/lpc32xx/preinstall.am:1.7
--- rtems/c/src/lib/libbsp/arm/lpc32xx/preinstall.am:1.6	Wed Jun 23 03:27:56 2010
+++ rtems/c/src/lib/libbsp/arm/lpc32xx/preinstall.am	Thu Oct 21 08:58:18 2010
@@ -46,7 +46,7 @@
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
 
-$(PROJECT_INCLUDE)/tm27.h: ../../shared/include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
+$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
 



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20101021/5adede39/attachment.html>


More information about the vc mailing list