summaryrefslogtreecommitdiffstats
path: root/firmware/zpu/apps/blinkenlights.c
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-19 22:23:46 -0800
committerJosh Blum <josh@joshknows.com>2011-01-19 22:23:46 -0800
commit9239878b0b81c3a368bf11cfc2fe48bfb05ff902 (patch)
treef41a5e58eac89b35cb99537a0a0b64662384a9f2 /firmware/zpu/apps/blinkenlights.c
parentfc138381ee4bd8d191795230b7447071a85e1f28 (diff)
parent7d918c5f6acc9a5d2c8ae03e2e67b403f7efd5ff (diff)
downloaduhd-9239878b0b81c3a368bf11cfc2fe48bfb05ff902.tar.gz
uhd-9239878b0b81c3a368bf11cfc2fe48bfb05ff902.tar.bz2
uhd-9239878b0b81c3a368bf11cfc2fe48bfb05ff902.zip
Merge branch 'next'
Conflicts: host/lib/usrp/usrp2/codec_impl.cpp
Diffstat (limited to 'firmware/zpu/apps/blinkenlights.c')
-rw-r--r--firmware/zpu/apps/blinkenlights.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/firmware/zpu/apps/blinkenlights.c b/firmware/zpu/apps/blinkenlights.c
new file mode 100644
index 000000000..30cb33a7f
--- /dev/null
+++ b/firmware/zpu/apps/blinkenlights.c
@@ -0,0 +1,28 @@
+/* -*- 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;
+
+ output_regs->led_src = 0;
+
+ while(1) {
+ //delay(5000000);
+ for(c=0;c<50000;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");
+//}