panel_uart.h 592 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include "esp_err.h"
  3. #include <stdbool.h>
  4. #include <stdint.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. // 初始化面板串口模块并启动相关后台任务
  9. esp_err_t panel_uart_init(void);
  10. // 主动上报某个状态项给面板 MCU
  11. void panel_uart_report(uint8_t item, uint8_t value);
  12. // 设置蓝牙连接和播放状态,供 main 回调同步面板
  13. void panel_uart_set_bt_state(bool connected, bool streaming);
  14. // 获取当前记录的面板电量
  15. uint8_t panel_uart_get_battery_percent(void);
  16. bool panel_uart_get_charging_status(void);
  17. #ifdef __cplusplus
  18. }
  19. #endif