X-Git-Url: http://git.megacz.com/?p=slipway.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fslipway%2FFtdiBoardSlave.c;h=e9aba2e5c9b9a24873eee4a9366a36c7b4f12e3c;hp=920e46bf468aff4ea5a7219197f83e639e957aee;hb=b89edf07b45b7821a31388f2467ad74d99870d60;hpb=ce3e555b762e4c39e7eacbea061c114ce1f1bbc1 diff --git a/src/edu/berkeley/slipway/FtdiBoardSlave.c b/src/edu/berkeley/slipway/FtdiBoardSlave.c index 920e46b..e9aba2e 100644 --- a/src/edu/berkeley/slipway/FtdiBoardSlave.c +++ b/src/edu/berkeley/slipway/FtdiBoardSlave.c @@ -109,9 +109,9 @@ void fpga_interrupts(int on) { if (on) { //FISUA = 0x1; FISCR = 0x80; - FISUD = 0x08; + FISUA = 0x01; } else { - FISUD = 0; + FISUA = 0; FISCR = 0; } } @@ -125,9 +125,9 @@ inline void conf(int z, int y, int x, int d) { #define TIMERVAL 100 -ISR(SIG_FPGA_INTERRUPT15) { +ISR(SIG_FPGA_INTERRUPT0) { interrupt_count++; - //fpga_interrupts(1); + fpga_interrupts(1); sei(); } @@ -153,8 +153,9 @@ inline int hex(char c) { } int readFPGA() { + fpga_interrupts(0); int ret = FISUA; - //fpga_interrupts(1); + fpga_interrupts(1); return ret; } @@ -203,7 +204,7 @@ int main() { flag=1; send(readFPGA()); break; - /* + case 3: { int32_t local_interrupt_count = interrupt_count; interrupt_count = 0; @@ -213,7 +214,7 @@ int main() { send((local_interrupt_count >> 0) & 0xff); break; } - */ + /* case 3: //init_timer();