1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2025-04-21 12:27:27 +03:00

labsw/fw/: added simple button -> LED / relay change loop

This commit is contained in:
Werner Almesberger
2011-09-03 12:33:43 -03:00
parent e73383b7d8
commit 5649c890f7
4 changed files with 89 additions and 1 deletions

View File

@@ -12,7 +12,7 @@
MAIN = labsw
OBJS = $(MAIN) usb descr # version ep0
OBJS = $(MAIN) usb descr version # ep0
F32XBASE = ../../../f32xbase
@@ -28,6 +28,26 @@ USB_ID = $(shell \
.PHONY: dfu
all: io-parts.h
io-parts.h: io.h Makefile
cpp -dD $< | \
sed '1,/IO_H/d' | \
awk \
'BEGIN { print "/* MACHINE-GENERATED. DO NOT EDIT ! */"; \
print "#ifndef IO_PARTS_H"; \
print "#define IO_PARTS_H"; } \
/#define/ && $$3 != "" { \
split($$3, a, "_"); \
print $$1, $$2 "_PORT", a[1]; \
print $$1, $$2 "_MODE", a[1] "MDOUT"; \
print $$1, $$2 "_BIT", a[2]; } \
END { print "#endif" }' >$@ || \
{ rm -f $@; exit 1; }
#clean::
# rm -f io-parts.h
# hack: for now, we just reuse the boot loader from cntr
USB_ID = 20b7:cb72