// Handled by user code

AN6077

}

BOOL TD_Suspend( void )

{// Called before the device goes into suspend mode return( TRUE );

}

BOOL TD_Resume( void )

{ // Called after the device resumes return( TRUE );

}

//-----------------------------------------------------------------------------

//Device Request hooks

//The following hooks are called by the end point 0 device request parser. //-----------------------------------------------------------------------------

BOOL DR_GetDescriptor( void )

{

return( TRUE );

}

BOOL DR_SetConfiguration( void )

{// Called when a Set Configuration command is received if( EZUSB_HIGHSPEED( ) )

{// FX2LP in high speed mode

SYNCDELAY;//

EP6AUTOINLENH = 0x02; // set core AUTO commit len = 512 bytes

SYNCDELAY;// EP6AUTOINLENL = 0x00;

SYNCDELAY;//

enum_pkt_size = 512; // max. pkt. size = 512 bytes

}

else

{// FX2LP in full speed mode

SYNCDELAY;//

EP6AUTOINLENH = 0x00; // set core AUTO commit len = 64 bytes

SYNCDELAY;// EP6AUTOINLENL = 0x40;

SYNCDELAY;

= 64;

//

enum_pkt_size

// max. pkt. size = 64 bytes

}

 

 

Configuration =

SETUPDAT[

2 ];

return( TRUE );

//

Handled by user code

}

BOOL DR_GetConfiguration( void )

{// Called when a Get Configuration command is received EP0BUF[ 0 ] = Configuration;

EP0BCH = 0;

EP0BCL = 1; return(TRUE);

}

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 )

 

 

February 19, 2008

 

Document No. 001-15342 Rev. **

13

[+] Feedback

Page 13
Image 13
Cypress FX2LP, AN6077 manual Setupdat