added a makefile and a VERY VERY minimalistic not working fx2 fw
[my-code/fpga.git] / fx2 / fx2.c
1 /*
2  * fx2 firmware 
3  *
4  * author: hackbard@hackdaworld.org
5  *
6  * number of priorities:
7  * - switch on board power
8  * - allow high speed usb transfer
9  * - do jtag
10  * 
11  */
12
13 /* constant definitions */
14 #define TRUE    1
15 #define FALSE   0
16 #define POWER_ON        1;
17 #define POWER_OFF       0;
18
19 /* type definitions */
20 typedef unsigned char u8;
21 typedef unsigned short u16;
22 typedef unsigned int u32;
23
24 /* fx2 register */
25 xdata at 0xb5 volatile u8 OED;
26 xdata at 0xb0 volatile u8 IOD;
27
28 void power_on() {
29
30         OED|=(1<<7);
31         IOD|=(1<<7);
32 }
33
34 void main() {
35
36         power_on;
37 }
38
39
40