adac.h 694 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Squeezelite for esp32
  3. *
  4. * (c) Sebastien 2019
  5. * Philippe G. 2019, philippe_44@outlook.com
  6. *
  7. * This software is released under the MIT License.
  8. * https://opensource.org/licenses/MIT
  9. *
  10. */
  11. #include "driver/i2s.h"
  12. #include "freertos/FreeRTOS.h"
  13. typedef enum { ADAC_ON = 0, ADAC_STANDBY, ADAC_OFF } adac_power_e;
  14. struct adac_s {
  15. bool (*init)(int i2c_port_num, int i2s_num, i2s_config_t* config);
  16. void (*deinit)(void);
  17. void (*power)(adac_power_e mode);
  18. void (*speaker)(bool active);
  19. void (*headset)(bool active);
  20. void (*volume)(unsigned left, unsigned right);
  21. };
  22. extern struct adac_s dac_tas57xx;
  23. extern struct adac_s dac_a1s;
  24. extern struct adac_s dac_external;