bsp_piano.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef _BSP_PIANO_H_
  2. #define _BSP_PIANO_H_
  3. enum {
  4. WARNING_PIANO,
  5. WARNING_TONE,
  6. };
  7. //与warning_tone_tbl数组对应
  8. enum {
  9. TONE_POWER_ON,
  10. TONE_POWER_OFF,
  11. TONE_PAIR,
  12. TONE_BT_DISCONNECT,
  13. TONE_BT_CONNECT,
  14. TONE_BT_RING,
  15. TONE_MAX_VOL,
  16. TONE_LOW_BATTERY,
  17. TONE_REDIALING,
  18. TONE_BT_MODE,
  19. TONE_MAX_NB,
  20. };
  21. //与warning_piano_tbl数组对应
  22. enum {
  23. PIANO_POWER_ON,
  24. PIANO_POWER_OFF,
  25. PIANO_BT_MODE,
  26. PIANO_CAMERA_MODE,
  27. PIANO_AUX_MODE,
  28. PIANO_MAX_NB,
  29. };
  30. struct warning_tone_tbl_t {
  31. u32 len;
  32. const struct tone_tbl_t *res_tbl;
  33. };
  34. struct warning_piano_tbl_t {
  35. u32 len;
  36. const u32 *res_tbl;
  37. };
  38. extern const struct warning_piano_tbl_t warning_piano_tbl[];
  39. extern const struct warning_tone_tbl_t warning_tone_tbl[];
  40. void tone_play_kick(uint type, void *res, bool kick);
  41. void tone_play_end(void);
  42. bool tone_is_playing(void);
  43. void tone_sync_kick(void);
  44. void piano_play_process(void);
  45. void bsp_piano_warning_play(uint type, uint index);
  46. u8 get_piano_tone_sta(void);
  47. #endif