cun
This commit is contained in:
@ -70,6 +70,10 @@
|
||||
#include "bt_background.h"
|
||||
#include "default_event_handler.h"
|
||||
|
||||
#if (JL_EARPHONE_APP_EN)
|
||||
#include "rcsp_adv_user_update.h"
|
||||
#endif
|
||||
|
||||
#define xlog(format, ...) printf("[%s] " format, __func__, ##__VA_ARGS__)
|
||||
|
||||
|
||||
@ -2471,6 +2475,19 @@ static int event_handler(struct application *app, struct sys_event *event)
|
||||
} else if ((u32)event->arg == DEVICE_EVENT_FROM_POWER) {
|
||||
return app_power_event_handler(&event->u.dev);
|
||||
}
|
||||
#if (JL_EARPHONE_APP_EN)
|
||||
else if ((u32)event->arg == DEVICE_EVENT_FROM_RCSP) {
|
||||
log_info("DEVICE_EVENT_FROM_RCSP: %d", event->u.rcsp.event);
|
||||
switch (event->u.rcsp.event) {
|
||||
case MSG_JL_UPDATE_START:
|
||||
log_info(">>> EARPHONE APP: MSG_JL_UPDATE_START\n");
|
||||
// You can add UI notifications here, like LED blinking or a tone.
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if TCFG_CHARGESTORE_ENABLE
|
||||
else if ((u32)event->arg == DEVICE_EVENT_CHARGE_STORE) {
|
||||
app_chargestore_event_handler(&event->u.chargestore);
|
||||
@ -2790,3 +2807,4 @@ static int state_machine(struct application *app, enum app_state state, struct i
|
||||
// .ops = &app_earphone_ops,
|
||||
// .state = APP_STA_DESTROY,
|
||||
// };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user