From: hackbard Date: Tue, 13 Feb 2007 01:22:29 +0000 (+0000) Subject: added a makefile and a VERY VERY minimalistic not working fx2 fw X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a202fa20f103558b6e86400c60f9bc33fae2e576;p=my-code%2Ffpga.git added a makefile and a VERY VERY minimalistic not working fx2 fw --- diff --git a/fx2/Makefile b/fx2/Makefile new file mode 100644 index 0000000..3b3c0b8 --- /dev/null +++ b/fx2/Makefile @@ -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 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; +} + + +