mirror of
git://projects.qi-hardware.com/nn-usb-fpga.git
synced 2025-04-21 12:27:27 +03:00
Adding lm32 demo to SAKC project
This commit is contained in:
20
lm32/logic/sakc/firmware/gdb-test/main.c
Normal file
20
lm32/logic/sakc/firmware/gdb-test/main.c
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "soc-hw.h"
|
||||
|
||||
void main()
|
||||
{
|
||||
gpio0->oe = 0x000000ff;
|
||||
for(;;) {
|
||||
int i;
|
||||
|
||||
for(i=0; i<8; i++) {
|
||||
uint32_t out1, out2;
|
||||
|
||||
out1 = 0x01 << i;
|
||||
out2 = 0x80 >> i;
|
||||
gpio0->out = out1 | out2;
|
||||
|
||||
msleep(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user