From 22ed61f97815856bf74cec25ae6bca88bfbe5f44 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 22 Dec 2010 19:19:14 -0800 Subject: zpu: renamed the directory for the usrp2 fw to zpu to reflect the cpu type --- firmware/zpu/apps/blinkenlights.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 firmware/zpu/apps/blinkenlights.c (limited to 'firmware/zpu/apps/blinkenlights.c') 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 + +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"); +//} -- cgit v1.2.3