コード例 #1
0
ファイル: aic3204_test.c プロジェクト: remyjaspers/TDS02
/*
 * 
 *  aic3204_test( )
 *
 *      Test different configurations of the AIC3204
 */
Int16 aic3204_test( )
{
     /* Set A20_MODE for GPIO mode */
    CSL_FINST(CSL_SYSCTRL_REGS->EBSR, SYS_EBSR_A20_MODE, MODE1); 
    
    /* Use GPIO to enable AIC3204 chip */
    USBSTK5505_GPIO_init();
    USBSTK5505_GPIO_setDirection(GPIO26, GPIO_OUT);
    USBSTK5505_GPIO_setOutput( GPIO26, 1 );    // Take AIC3201 chip out of reset
    
    /* Initialize I2C */
    USBSTK5505_I2C_init( );
    
    /* Codec tests */
    printf( " -> 1 KHz Tone on Headphone.\n" );
    if ( aic3204_tone_headphone( ) )           // Output test
        return 1;
        
    USBSTK5505_wait( 100 );  // Wait    
    printf( "<-> Audio Loopback from Stereo IN --> to HP OUT\n" );
    if ( aic3204_loop_linein( ) )              // Loop test
        return 3;
        
    USBSTK5505_GPIO_setOutput( GPIO26, 0 );    // Disable AIC3204
    return 0;
}
コード例 #2
0
ファイル: aic3204_test.c プロジェクト: psucurran/NoiseNinjas
/*
 * 
 *  aic3204_test( )
 *
 *      Test different configurations of the AIC3204
 */
Int16 aic3204_test( )
{
    /* Initialize I2C */
    EZDSP5535_I2C_init( );
    
      
    EZDSP5535_wait( 100 );  // Wait    
    printf( "<-> Audio Loopback from Stereo IN --> to HP OUT\n" );
    if ( aic3204_loop_linein( ) )              // Loop test
        return 3;
        
    return 0;
}