您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

control_wm8731.h 572B

12345678910111213141516171819202122232425
  1. #ifndef control_wm8731_h_
  2. #define control_wm8731_h_
  3. #include "AudioControl.h"
  4. class AudioControlWM8731 : public AudioControl
  5. {
  6. public:
  7. bool enable(void);
  8. bool disable(void) { return false; }
  9. bool volume(float n) { return volumeInteger(n * 0.8 + 47.499); }
  10. bool inputLevel(float n) { return false; }
  11. bool inputSelect(int n) { return false; }
  12. protected:
  13. bool write(unsigned int reg, unsigned int val);
  14. bool volumeInteger(unsigned int n); // range: 0x2F to 0x7F
  15. };
  16. class AudioControlWM8731master : public AudioControlWM8731
  17. {
  18. public:
  19. bool enable(void);
  20. };
  21. #endif