<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2010-10-21)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>sh</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-10-21 Sebastian Huber <sebastian.huber@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.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/arm/lpc32xx/ChangeLog.diff?r1=text&tr1=1.18&r2=text&tr2=1.19&diff_format=h">M</a></td><td width='1%'>1.19</td><td width='100%'>c/src/lib/libbsp/arm/lpc32xx/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/arm/lpc32xx/Makefile.am.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>c/src/lib/libbsp/arm/lpc32xx/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>c/src/lib/libbsp/arm/lpc32xx/include/bsp.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/arm/lpc32xx/include/tm27.h?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">c/src/lib/libbsp/arm/lpc32xx/include/tm27.h</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/arm/lpc32xx/misc/timer.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>c/src/lib/libbsp/arm/lpc32xx/misc/timer.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/arm/lpc32xx/preinstall.am.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>c/src/lib/libbsp/arm/lpc32xx/preinstall.am</td></tr>
</table>
<pre>
<font color='#006600'>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
</font><font color='#997700'>@@ -1,3 +1,10 @@
</font><font color='#000088'>+2010-10-21    Sebastian Huber <sebastian.huber@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.
+
</font> 2010-10-14        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
        * include/emc.h, include/i2c.h, include/lpc32xx.h, include/nand-mlc.h:

<font color='#006600'>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
</font><font color='#997700'>@@ -21,7 +21,7 @@
</font> ###############################################################################
 
 include_HEADERS = include/bsp.h
<font color='#880000'>-include_HEADERS += ../../shared/include/tm27.h
</font><font color='#000088'>+include_HEADERS += include/tm27.h
</font> 
 nodist_include_HEADERS = ../../shared/include/coverhd.h \
        include/bspopts.h

<font color='#006600'>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
</font><font color='#997700'>@@ -102,12 +102,12 @@
</font> static inline void lpc32xx_micro_seconds_delay(unsigned us)
 {
   unsigned start = lpc32xx_timer();
<font color='#880000'>-  unsigned end = start + us * (LPC32XX_PERIPH_CLK / 1000000);
-  unsigned now = 0;
</font><font color='#000088'>+  unsigned delay = us * (LPC32XX_PERIPH_CLK / 1000000);
+  unsigned elapsed = 0;
</font> 
   do {
<font color='#880000'>-    now = lpc32xx_timer();
-  } while (now < end);
</font><font color='#000088'>+    elapsed = lpc32xx_timer() - start;
+  } while (elapsed < delay);
</font> }
 
 void lpc32xx_restart(void *addr);

<font color='#006600'>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
</font><font color='#997700'>@@ -0,0 +1,69 @@
</font><font color='#000088'>+/*
+ * Copyright (c) 2010 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Obere Lagerstr. 30
+ *  82178 Puchheim
+ *  Germany
+ *  <info@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 */
</font>
<font color='#006600'>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
</font><font color='#997700'>@@ -22,16 +22,10 @@
</font> #include <rtems.h>
 #include <rtems/timerdrv.h>
 
<font color='#880000'>-static bool benchmark_timer_find_average_overhead = false;
</font><font color='#000088'>+#include <bsp.h>
</font> 
 static uint32_t benchmark_timer_base;
 
<font color='#880000'>-/* TODO */
-static uint32_t lpc32xx_timer(void)
-{
-  return 0;
-}
-
</font> void benchmark_timer_initialize(void)
 {
   benchmark_timer_base = lpc32xx_timer();
<font color='#997700'>@@ -39,17 +33,10 @@
</font> 
 uint32_t benchmark_timer_read(void)
 {
<font color='#880000'>-  uint32_t delta = lpc32xx_timer() - benchmark_timer_base;
-
-  if (benchmark_timer_find_average_overhead) {
-    return delta;
-  } else {
-    /* TODO */
-    return 0;
-  }
</font><font color='#000088'>+  return lpc32xx_timer() - benchmark_timer_base;
</font> }
 
 void benchmark_timer_disable_subtracting_average_overhead(bool find_average_overhead)
 {
<font color='#880000'>-  benchmark_timer_find_average_overhead = find_average_overhead;
</font><font color='#000088'>+  /* VOID */
</font> }

<font color='#006600'>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
</font><font color='#997700'>@@ -46,7 +46,7 @@
</font>   $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
 
<font color='#880000'>-$(PROJECT_INCLUDE)/tm27.h: ../../shared/include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
</font><font color='#000088'>+$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
</font>   $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
 
</pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>