]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
LpcEurobot - added eb_blink. This is software rins knightrider on debug leds.
authorJiri Kubias <jiri.kubias@gmail.com>
Fri, 25 Dec 2009 19:01:16 +0000 (20:01 +0100)
committerJiri Kubias <jiri.kubias@gmail.com>
Fri, 25 Dec 2009 19:01:16 +0000 (20:01 +0100)
build/lpceurobot/eb_blink [new symlink]
src/eb_blink/Makefile [new file with mode: 0644]
src/eb_blink/Makefile.omk [new file with mode: 0644]
src/eb_blink/main.c [new file with mode: 0644]

diff --git a/build/lpceurobot/eb_blink b/build/lpceurobot/eb_blink
new file mode 120000 (symlink)
index 0000000..bc8b0e5
--- /dev/null
@@ -0,0 +1 @@
+../../src/eb_blink/
\ No newline at end of file
diff --git a/src/eb_blink/Makefile b/src/eb_blink/Makefile
new file mode 100644 (file)
index 0000000..76b56fd
--- /dev/null
@@ -0,0 +1,14 @@
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ;  while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd`  ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+       @echo -e "\nThe Makefile.rules has not been found in this or parent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
diff --git a/src/eb_blink/Makefile.omk b/src/eb_blink/Makefile.omk
new file mode 100644 (file)
index 0000000..2ef2554
--- /dev/null
@@ -0,0 +1,12 @@
+# -*- makefile -*-
+#if MACH == lpc21xx
+
+# eb_blink je nazev programu, pod timto navzem bude systemem prekladan
+bin_PROGRAMS = eb_blink
+
+
+# za nazev_programu_SOURCES se davaji vsechny C zdrojaky, ktere se budou kompilovat
+eb_blink_SOURCES =  main.c
+
+#endif
+
diff --git a/src/eb_blink/main.c b/src/eb_blink/main.c
new file mode 100644 (file)
index 0000000..43a9786
--- /dev/null
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//                 Eurobot BLINK TEST  (with LPC2129)
+//
+// Description
+// -----------
+// This software blinks on debug leds. Use it with lpceurobot board
+// Author : Jiri Kubias DCE CVUT
+//
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include <lpc21xx.h>                            /* LPC21xx definitions */
+#include <deb_led.h>
+               
+
+void dummy_wait()
+{
+       unsigned int wait = 5000000;
+       while(--wait);
+}
+
+int main (void)  {
+
+
+       
+
+       while(1)
+       {       
+               deb_led_change(LEDR);
+               dummy_wait();   
+               deb_led_change(LEDG);
+               dummy_wait();
+               deb_led_change(LEDB);
+               dummy_wait();
+               deb_led_change(LEDY);
+               dummy_wait();
+
+       } 
+}
+
+
+