Mercurial > hg > beaglert
comparison include/I2c_Codec.h @ 134:09a32ca96255
Fixed and improved I2c_codec. Copied from the scope-refactoring branch
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Thu, 27 Aug 2015 03:39:11 +0100 |
parents | ef9392d077a4 |
children | d064234468cd |
comparison
equal
deleted
inserted
replaced
107:836052c86e1e | 134:09a32ca96255 |
---|---|
19 #include "I2c.h" | 19 #include "I2c.h" |
20 | 20 |
21 | 21 |
22 class I2c_Codec : public I2c | 22 class I2c_Codec : public I2c |
23 { | 23 { |
24 short unsigned int pllJ; | |
25 short unsigned int pllD; | |
24 public: | 26 public: |
25 int writeRegister(unsigned int reg, unsigned int value); | 27 int writeRegister(unsigned int reg, unsigned int value); |
26 | 28 |
27 int initCodec(); | 29 int initCodec(); |
28 int startAudio(int dual_rate); | 30 int startAudio(int dual_rate); |
29 int stopAudio(); | 31 int stopAudio(); |
30 | 32 |
31 int setPllJ(short unsigned int j); | 33 int setPllJ(short unsigned int j); |
32 int setPllD(unsigned int d); | 34 int setPllD(unsigned int d); |
33 int setPllK(float k); | 35 int setPllK(float k); |
36 int setAudioSamplingRate(float newSamplingRate); | |
37 short unsigned int getPllJ(); | |
38 unsigned int getPllD(); | |
39 float getPllK(); | |
40 float getAudioSamplingRate(); | |
34 int setDACVolume(int halfDbSteps); | 41 int setDACVolume(int halfDbSteps); |
35 int writeDACVolumeRegisters(bool mute); | 42 int writeDACVolumeRegisters(bool mute); |
36 int setADCVolume(int halfDbSteps); | 43 int setADCVolume(int halfDbSteps); |
37 int writeADCVolumeRegisters(bool mute); | 44 int writeADCVolumeRegisters(bool mute); |
38 int setHPVolume(int halfDbSteps); | 45 int setHPVolume(int halfDbSteps); |