This commit is contained in:
lmx
2025-11-26 11:25:20 +08:00
parent 8089cf5b3a
commit 6b8d9ea6a0
27 changed files with 151096 additions and 150478 deletions

View File

@ -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,
// };