Re: [Fx2lib-devel] Sourcing slave FIFO packets
Status: Beta
Brought to you by:
mulicheng
|
From: Chris M. <fx...@m3...> - 2011-02-28 19:20:13
|
Genius, thanks Dennis it works now. I've probably still got some superfluous
stuff, but the following implementation of send_fifo() works.
Thanks again.
Chris
void fifo_send(void) {
RESETFIFO(0x06);
OUTPKTEND=0x86; SYNCDELAY();
OUTPKTEND=0x86; SYNCDELAY();
RESETFIFO(0x02);
FIFORESET = 0x80; SYNCDELAY();
FIFORESET = 0x06; SYNCDELAY();
EP6FIFOBUF[0] = 0x00;
EP6FIFOBUF[1] = 0x01;
EP6FIFOBUF[2] = 0x00;
EP6FIFOBUF[3] = 0x00;
EP6FIFOBUF[4] = 0x00;
EP6FIFOBUF[5] = sendCount++;
SYNCDELAY(); EP6BCH = 0;
SYNCDELAY(); EP6BCL = 6;
OUTPKTEND = 0x86; SYNCDELAY();
FIFORESET = 0; SYNCDELAY();
}
|