app_manager.h 649 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // Created by kindring on 2025/12/26.
  3. //
  4. #ifndef YUNTUNE_APP_MANAGER_H
  5. #define YUNTUNE_APP_MANAGER_H
  6. #include "esp_err.h"
  7. /**
  8. * 功放工作模式, 切换aux与蓝牙模式
  9. */
  10. typedef enum {
  11. AUDIO_MODE_AUX = 0,
  12. AUDIO_MODE_BLE,
  13. AUDIO_MODE_MAX
  14. } audio_mode_t;
  15. // 运行上下文
  16. typedef struct {
  17. audio_mode_t audio_mode;
  18. char *device_name;
  19. bool auto_reconnect;
  20. int reconnect_wait_time;
  21. int reconnect_max_attempts;
  22. char *wifi_ssid;
  23. char *wifi_password;
  24. char *ap_ssid;
  25. char *ap_password;
  26. } device_config_t;
  27. audio_mode_t next_audio_mode();
  28. esp_err_t init_app();
  29. #endif //YUNTUNE_APP_MANAGER_H