diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-07-26 15:33:30 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-07-26 15:33:30 -0700 |
commit | f72ad02f5ec370f45995ecd2b3e8b322e9a7e4dc (patch) | |
tree | 069b728b6e44a5db8607a8c5815e3a2d50a114ac /firmware/microblaze/apps/blinkenlights.c | |
parent | f86c25317b457b280c697fc47905c79bdbbc0c93 (diff) | |
download | uhd-f72ad02f5ec370f45995ecd2b3e8b322e9a7e4dc.tar.gz uhd-f72ad02f5ec370f45995ecd2b3e8b322e9a7e4dc.tar.bz2 uhd-f72ad02f5ec370f45995ecd2b3e8b322e9a7e4dc.zip |
New branch with firmware dir from USRP2P branch.
Diffstat (limited to 'firmware/microblaze/apps/blinkenlights.c')
-rw-r--r-- | firmware/microblaze/apps/blinkenlights.c | 26 |
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"); +//} |