summaryrefslogtreecommitdiffstats
path: root/led/posix_delay_sleep
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-06 20:25:58 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-06 20:25:58 +0000
commit3083373e471be76b1624e0583c5a3f2f455d41c1 (patch)
treee7d15e5fdeb23587043f57d57fb0de6f399dbbbc /led/posix_delay_sleep
downloadrtems-examples-3083373e471be76b1624e0583c5a3f2f455d41c1.tar.bz2
Initial import of reorganized examples.initialbase
Diffstat (limited to 'led/posix_delay_sleep')
-rw-r--r--led/posix_delay_sleep/.cvsignore1
-rw-r--r--led/posix_delay_sleep/Makefile27
-rw-r--r--led/posix_delay_sleep/test.c45
3 files changed, 73 insertions, 0 deletions
diff --git a/led/posix_delay_sleep/.cvsignore b/led/posix_delay_sleep/.cvsignore
new file mode 100644
index 0000000..fecf58a
--- /dev/null
+++ b/led/posix_delay_sleep/.cvsignore
@@ -0,0 +1 @@
+o-optimize
diff --git a/led/posix_delay_sleep/Makefile b/led/posix_delay_sleep/Makefile
new file mode 100644
index 0000000..d1f6715
--- /dev/null
+++ b/led/posix_delay_sleep/Makefile
@@ -0,0 +1,27 @@
+#
+# $Id$
+#
+
+#
+# RTEMS_MAKEFILE_PATH is typically set in an environment variable
+#
+
+PGM=${ARCH}/posix_delay_nanosleep.exe
+
+# optional managers required
+MANAGERS=all
+
+# C source names
+CSRCS = test.c
+COBJS = $(CSRCS:%.c=${ARCH}/%.o)
+
+include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
+include $(RTEMS_CUSTOM)
+include $(PROJECT_ROOT)/make/leaf.cfg
+
+OBJS= $(COBJS) $(CXXOBJS) $(ASOBJS)
+
+all: ${ARCH} $(PGM)
+
+$(PGM): $(OBJS)
+ $(make-exe)
diff --git a/led/posix_delay_sleep/test.c b/led/posix_delay_sleep/test.c
new file mode 100644
index 0000000..6f34a7b
--- /dev/null
+++ b/led/posix_delay_sleep/test.c
@@ -0,0 +1,45 @@
+/*
+ * Simple test program -- simplified version of sample test hello.
+ */
+
+#include <bsp.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+
+#include "../led.h"
+
+void *POSIX_Init(
+ void *argument
+)
+{
+ puts( "\n\n*** LED BLINKER -- sleep ***" );
+
+ LED_INIT();
+
+ while (1) {
+
+ (void) sleep( 1 );
+ LED_ON();
+ (void) sleep( 1 );
+ LED_OFF();
+
+ }
+ exit( 0 );
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+
+/* end of file */