beautypg.com

Cypress FX2LP User Manual

Page 20

background image

February 19, 2008

Document No. 001-15342 Rev. **

20

AN6077

EP0BUF[ 0 ] = Configuration;
EP0BCH = 0;
EP0BCL = 1;
return(TRUE); // Handled by user code
}

BOOL DR_SetInterface( void )
{ // Called when a Set Interface command is received
AlternateSetting = SETUPDAT[ 2 ];
return( TRUE ); // Handled by user code
}

BOOL DR_GetInterface( void )
{ // Called when a Set Interface command is received
EP0BUF[ 0 ] = AlternateSetting;
EP0BCH = 0;
EP0BCL = 1;
return( TRUE ); // Handled by user code
}

BOOL DR_GetStatus( void )
{
return( TRUE );
}

BOOL DR_ClearFeature( void )
{
return( TRUE );
}

BOOL DR_SetFeature( void )
{
return( TRUE );
}

BOOL DR_VendorCmnd( void )
{
return( TRUE );
}

//-----------------------------------------------------------------------------
// USB Interrupt Handlers
// The following functions are called by the USB interrupt jump table.
//-----------------------------------------------------------------------------

// Setup Data Available Interrupt Handler
void ISR_Sudav( void ) interrupt 0
{
GotSUD = TRUE; // Set flag
EZUSB_IRQ_CLEAR( );
USBIRQ = bmSUDAV; // Clear SUDAV IRQ
}

// Setup Token Interrupt Handler
void ISR_Sutok( void ) interrupt 0
{
EZUSB_IRQ_CLEAR( );
USBIRQ = bmSUTOK; // Clear SUTOK IRQ
}

void ISR_Sof( void ) interrupt 0
{
EZUSB_IRQ_CLEAR( );

[+] Feedback

This manual is related to the following products: