summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEric Norum <WENorum@lbl.gov>1999-11-19 16:30:03 +0000
committerEric Norum <WENorum@lbl.gov>1999-11-19 16:30:03 +0000
commit6304b70849817e5841b0b4dc8b046039d6acca37 (patch)
treedf88af521e48d12987233ac5d48e31fd59c47b89 /examples
parentae6dcada99e033f9a55784d74a28fd5baa6f313d (diff)
Useful add-on libraries
Diffstat (limited to 'examples')
-rw-r--r--examples/ncurses/init.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/examples/ncurses/init.c b/examples/ncurses/init.c
new file mode 100644
index 0000000..8a81a1a
--- /dev/null
+++ b/examples/ncurses/init.c
@@ -0,0 +1,52 @@
+/*
+ * Root task
+ *
+ * $Revision$ $Date$ $Author$
+ */
+#include <bsp.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/*
+ ***********************************************************************
+ * RTEMS CONFIGURATION *
+ ***********************************************************************
+ */
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_MAXIMUM_TASKS 20
+#define CONFIGURE_MAXIMUM_SEMAPHORES 10
+#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 10
+
+#define CONFIGURE_MICROSECONDS_PER_TICK 52489
+
+#define CONFIGURE_INIT
+#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \
+ RTEMS_NO_TIMESLICE | \
+ RTEMS_NO_ASR | \
+ RTEMS_INTERRUPT_LEVEL(0))
+#define CONFIGURE_INIT_TASK_STACK_SIZE (40*1024)
+#define CONFIGURE_INIT_TASK_PRIORITY 100
+rtems_task Init (rtems_task_argument argument);
+
+#define CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
+rtems_driver_address_table Device_drivers[] = {
+ CONSOLE_DRIVER_TABLE_ENTRY,
+ CLOCK_DRIVER_TABLE_ENTRY,
+};
+
+#include <confdefs.h>
+
+extern int main (int argc, char **argv);
+
+/*
+ * RTEMS Startup Task
+ */
+rtems_task
+Init (rtems_task_argument ignored)
+{
+ putenv ("TERM=xterm");
+ putenv ("NCURSES_TRACE=20");
+ main (0, NULL);
+ rtems_task_suspend (RTEMS_SELF);
+}