player_ui.h 951 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef __PLAYER_H__
  2. #define __PLAYER_H__
  3. #include <rtthread.h>
  4. /* music tag information structure */
  5. struct tag_info
  6. {
  7. char title [40]; /* music title */
  8. char artist[40]; /* music artist */
  9. rt_uint32_t duration; /* music total duration (second) */
  10. rt_uint32_t position; /* music current position (second) */
  11. rt_uint32_t bit_rate; /* bit rate */
  12. rt_uint32_t sampling; /* sampling */
  13. rt_uint32_t data_start; /* start position of data */
  14. };
  15. enum PLAYER_CMD
  16. {
  17. PLAYER_CMD_START,
  18. PLAYER_CMD_STOP
  19. };
  20. enum PLAYER_MODE
  21. {
  22. PLAYER_STOP,
  23. PLAYER_PLAY_FILE,
  24. PLAYER_PLAY_RADIO,
  25. };
  26. enum PLAYER_STEP
  27. {
  28. PLAYER_STEP_STOP,
  29. PLAYER_STEP_PREV,
  30. PLAYER_STEP_NEXT,
  31. };
  32. void player_ui_init(void);
  33. void player_notify_play(void);
  34. void player_notify_stop(void);
  35. void player_set_position(rt_uint32_t position);
  36. #endif