Mercurial > hg > beaglert
changeset 182:4c5acd649d46
Fixed I2c_Codec
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 15 Jan 2016 23:46:25 +0000 |
parents | 391ad036557d |
children | 2bdb48d1fca6 |
files | core/I2c_Codec.cpp |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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; }