added a makefile and a VERY VERY minimalistic not working fx2 fw
authorhackbard <hackbard>
Tue, 13 Feb 2007 01:22:29 +0000 (01:22 +0000)
committerhackbard <hackbard>
Tue, 13 Feb 2007 01:22:29 +0000 (01:22 +0000)
fx2/Makefile [new file with mode: 0644]
fx2/fx2.c [new file with mode: 0644]

diff --git a/fx2/Makefile b/fx2/Makefile
new file mode 100644 (file)
index 0000000..3b3c0b8
--- /dev/null
@@ -0,0 +1,16 @@
+CC = gcc
+CFLAGS = -Wall -O3
+
+OBJECTS = ee2ihex usb_bulk_test
+
+all: $(OBJECTS)
+
+clean:
+       rm -f $(OBJECTS)
+       rm -f *.lnk
+       rm -f *.lst
+       rm -f *.map
+       rm -f *.mem
+       rm -f *.rel
+       rm -f *.rst
+       rm -f *.sym
diff --git a/fx2/fx2.c b/fx2/fx2.c
new file mode 100644 (file)
index 0000000..ddea734
--- /dev/null
+++ b/fx2/fx2.c
@@ -0,0 +1,40 @@
+/*
+ * fx2 firmware 
+ *
+ * author: hackbard@hackdaworld.org
+ *
+ * number of priorities:
+ * - switch on board power
+ * - allow high speed usb transfer
+ * - do jtag
+ * 
+ */
+
+/* constant definitions */
+#define TRUE   1
+#define FALSE  0
+#define POWER_ON       1;
+#define POWER_OFF      0;
+
+/* type definitions */
+typedef unsigned char u8;
+typedef unsigned short u16;
+typedef unsigned int u32;
+
+/* fx2 register */
+xdata at 0xb5 volatile u8 OED;
+xdata at 0xb0 volatile u8 IOD;
+
+void power_on() {
+
+       OED|=(1<<7);
+       IOD|=(1<<7);
+}
+
+void main() {
+
+       power_on;
+}
+
+
+