Esempio n. 1
0
/*
 *
 *  AIC3204_rget( regnum, *regval )
 *
 *      Return value of codec register regnum
 *
 */
Int16 AIC3204_rget( Int8 regnum, Int8* regval )
{
    Int16  retcode = 0;

    retcode |= EZDSP5535_I2C_write( AIC3204_I2C_ADDR, &regnum, 1 );
    retcode |= EZDSP5535_I2C_read( AIC3204_I2C_ADDR, regval, 1 );

    EZDSP5535_waitusec( 1 );
    return retcode;
}
Esempio n. 2
0
/*
 *
 *  AIC3204_rGet( regnum, *regval )
 *
 *      Return value of codec register regnum
 *
 */
Int16 AIC3204_rget(  Uint16 regnum, Uint16* regval )
{
    Int16  retcode = 0;
    Uint16 cmd[2];

    cmd[0] = regnum & 0x007F;       // 7-bit Device Register
    cmd[1] = 0;

    retcode |= EZDSP5535_I2C_write( AIC3204_I2C_ADDR, cmd, 1 );
    retcode |= EZDSP5535_I2C_read( AIC3204_I2C_ADDR, cmd, 1 );

    *regval = cmd[0];
    EZDSP5535_wait( 10 );
    return retcode;
}