You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
572B

  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