summaryrefslogtreecommitdiffstats
path: root/bsps/arm/lpc176x/start/restart.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/arm/lpc176x/start/restart.c')
-rw-r--r--bsps/arm/lpc176x/start/restart.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/bsps/arm/lpc176x/start/restart.c b/bsps/arm/lpc176x/start/restart.c
new file mode 100644
index 0000000000..d6e5783f53
--- /dev/null
+++ b/bsps/arm/lpc176x/start/restart.c
@@ -0,0 +1,35 @@
+/**
+ * @file
+ *
+ * @ingroup lpc176x
+ *
+ * @brief Restart implementation.
+ */
+
+/*
+ * Copyright (c) 2011-2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@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.org/license/LICENSE.
+ */
+
+#include <rtems.h>
+#include <bsp.h>
+
+void bsp_restart( const void *const addr )
+{
+ rtems_interrupt_level level;
+
+ void (*start) ( void ) = addr;
+
+ rtems_interrupt_disable( level );
+ (void) level; /* avoid set but not used warning */
+ ( *start )();
+}