summaryrefslogtreecommitdiffstats
path: root/firmware/microblaze/apps/blinkenlights.c
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-11-17 18:31:21 -0800
committerNick Foster <nick@nerdnetworks.org>2010-11-17 18:31:21 -0800
commit95cf7753c175e868d1aacaad378bfe74d9454200 (patch)
tree2eef9c811655d7a1b4d0fb020db7fa5125a2adc7 /firmware/microblaze/apps/blinkenlights.c
parent81c9f77306dc82f250bfb2871b8bd7db67a40085 (diff)
parent89ae5f3f651cff22226e2b2c0ce0ed796dad4c71 (diff)
downloaduhd-95cf7753c175e868d1aacaad378bfe74d9454200.tar.gz
uhd-95cf7753c175e868d1aacaad378bfe74d9454200.tar.bz2
uhd-95cf7753c175e868d1aacaad378bfe74d9454200.zip
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into flow_ctrl
Conflicts: host/lib/transport/udp_simple.cpp host/lib/usrp/usrp2/mboard_impl.cpp host/lib/usrp/usrp2/usrp2_iface.cpp host/lib/usrp/usrp2/usrp2_regs.hpp
Diffstat (limited to 'firmware/microblaze/apps/blinkenlights.c')
-rw-r--r--firmware/microblaze/apps/blinkenlights.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/firmware/microblaze/apps/blinkenlights.c b/firmware/microblaze/apps/blinkenlights.c
new file mode 100644
index 000000000..4cebe5c9d
--- /dev/null
+++ b/firmware/microblaze/apps/blinkenlights.c
@@ -0,0 +1,26 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2010 Ettus Research LLC
+ *
+ */
+
+#include "memory_map.h"
+#include <nonstdio.h>
+
+int main(int argc, char *argv[]) {
+
+ uint32_t c = 0;
+ uint8_t i = 0;
+
+ while(1) {
+ //delay(5000000);
+ for(c=0;c<5000000;c++) asm("NOP");
+ output_regs->leds = (i++ % 2) ? 0xFF : 0x00; //blink everything on that register
+ }
+
+ return 0;
+}
+
+//void delay(uint32_t t) {
+// while(t-- != 0) asm("NOP");
+//}