#ifndef __U_APP_HANDLER_H_ #define __U_APP_HANDLER_H_ #include "u_global.h" #define APP_MODE_SCENE_MAX_NUM (9) #define APP_MODE_CLR_MAX_NUM (8) enum { APP_RHYTHM_MODE_FADE7 = 0x0, //柔和 APP_RHYTHM_MODE_FADE3, //经典 APP_RHYTHM_MODE_JUMP3, //动感 APP_RHYTHM_MODE_JUMP7, //迪斯科 APP_RHYTHM_MODE_MUSIC = 0xB0, }; typedef struct { uint8_t effect; //灯效果 // uint8_t last_effect; uint8_t bright; uint8_t speed; //0 最慢,100 最快 uint8_t clr_num; uint8_t clr_data[24]; }AppModeInfo_t; void app_mode_info_init(void); void light_state_upload(void); void reply_app_encode(uint8_t cmd, uint8_t *data, uint8_t len); void light_mode_set(uint8_t *app_mode); void app_mode_info_init(void); void app_set_mode_clr(uint8_t *data, uint8_t len); void app_read_mode_clr(uint8_t mode,uint8_t *reply_buff, uint8_t *len); void app_light_normal_effect_enter(uint8_t app_effect, uint32_t *clr_buff, uint8_t clr_num, uint8_t speed, uint8_t bright); #endif //_U_APP_HANDLER_H_