84
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D
EZ-USB Development Kit Firmware Examples
SYNCDELAY; //
EP2BCL = 0x80;
}
Endpoint EP6 is re-armed with an incremental pattern of data starting with 0x2.
// if EP6 IN is available, re-arm it
If(!(EP2468STAT & bmEP6FULL))
{
SYNCDELAY;
EP6BCH = 0x02;
SYNCDELAY;
EP6BCL = 0x00;
}
The contents received from the EP4 OUT endpoint are copied to a temporary buffer, myBuffer[], and
re-armed.
// if there is new data in EP4FIFOBUF, then copy it to a temporary buffer
if(!(EP2468STAT & bmEP4EMPTY))
{
APTR1H = MSB( &EP4FIFOBUF );
APTR1L = LSB( &EP4FIFOBUF );
AUTOPTRH2 = MSB( &myBuffer );
AUTOPTRL2 = LSB( &myBuffer );
myBufferCount = (EP4BCH << 8) + EP4BCL;
for( i = 0x0000; i < myBufferCount; i++ )
{
EXTAUTODAT2 = EXTAUTODAT1;
}
SYNCDELAY; //
EP4BCL = 0x80; // re(arm) EP4OUT
}
If the EP8 Bulk IN endpoint is empty, then the contents of temporary buffer are transferred to an
AUTO pointer and finally copied to the EP8 IN buffer as shown in the following code.
// if there is room in EP8IN, then copy the contents of the temporary buf-
fer to it
if(!(EP2468STAT & bmEP8FULL) && myBufferCount)
{
APTR1H = MSB( &myBuffer );
APTR1L = LSB( &myBuffer );
AUTOPTRH2 = MSB( &EP8FIFOBUF );
AUTOPTRL2 = LSB( &EP8FIFOBUF );
for( i = 0x0000; i < myBufferCount; i++ )
{
// setup to transfer EP4OUT buffer to EP8IN buffer using AUTO-
POINTER(s) in SFR space
EXTAUTODAT2 = EXTAUTODAT1;
}
Summary of Contents for CY3674
Page 18: ...18 EZ USB Development Kit User Guide Doc 001 66390 Rev D Getting Started...
Page 34: ...34 EZ USB Development Kit User Guide Doc 001 66390 Rev D Development Kit Contents...
Page 54: ...54 EZ USB Development Kit User Guide Doc 001 66390 Rev D Cypress USB Drivers for EZ USB Kits...
Page 110: ...110 EZ USB Development Kit User Guide Doc 001 66390 Rev D Resources...
Page 113: ...EZ USB Development Kit User Guide Doc 001 66390 Rev D 113 A 2 Board Layout...