u_app_handler.h 1014 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef __U_APP_HANDLER_H_
  2. #define __U_APP_HANDLER_H_
  3. #include "u_global.h"
  4. #define APP_MODE_SCENE_MAX_NUM (9)
  5. #define APP_MODE_CLR_MAX_NUM (8)
  6. enum
  7. {
  8. APP_RHYTHM_MODE_FADE7 = 0x0, //柔和
  9. APP_RHYTHM_MODE_FADE3, //经典
  10. APP_RHYTHM_MODE_JUMP3, //动感
  11. APP_RHYTHM_MODE_JUMP7, //迪斯科
  12. APP_RHYTHM_MODE_MUSIC = 0xB0,
  13. };
  14. typedef struct
  15. {
  16. uint8_t effect; //灯效果
  17. // uint8_t last_effect;
  18. uint8_t bright;
  19. uint8_t speed; //0 最慢,100 最快
  20. uint8_t clr_num;
  21. uint8_t clr_data[24];
  22. }AppModeInfo_t;
  23. void app_mode_info_init(void);
  24. void light_state_upload(void);
  25. void reply_app_encode(uint8_t cmd, uint8_t *data, uint8_t len);
  26. void light_mode_set(uint8_t *app_mode);
  27. void app_mode_info_init(void);
  28. void app_set_mode_clr(uint8_t *data, uint8_t len);
  29. void app_read_mode_clr(uint8_t mode,uint8_t *reply_buff, uint8_t *len);
  30. void app_light_normal_effect_enter(uint8_t app_effect, uint32_t *clr_buff, uint8_t clr_num, uint8_t speed, uint8_t bright);
  31. #endif //_U_APP_HANDLER_H_