# HG changeset patch # User Giulio Moro # Date 1452901585 0 # Node ID 4c5acd649d4645b182048d020725946276934039 # Parent 391ad036557d270ee7e8b4d1fdc1625e10896a3b Fixed I2c_Codec diff -r 391ad036557d -r 4c5acd649d46 core/I2c_Codec.cpp --- a/core/I2c_Codec.cpp Fri Jan 15 21:50:46 2016 +0000 +++ b/core/I2c_Codec.cpp Fri Jan 15 23:46:25 2016 +0000 @@ -245,11 +245,9 @@ } float I2c_Codec::getAudioSamplingRate(){ - int pllP=1; //TODO: create get/set for pllP and pllR - int pllR=1; long int PLLCLK_IN=12000000; // f_{S(ref)} = (PLLCLK_IN × K × R)/(2048 × P) - float fs = (PLLCLK_IN/2048.0f) * getPllK()*pllR/(float)pllP; + float fs = (PLLCLK_IN/2048.0f) * getPllK()*getPllR()/(float)getPllP(); return fs; }