void default_findt_alert_ind_hnd (uint8_t connection_idx, uint8_t alert_lvl) { if (alert_lvl) app_proxr_alert_start(alert_lvl); else app_proxr_alert_stop(); }
int proxr_alert_ind_handler(ke_msg_id_t const msgid, struct proxr_alert_ind const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id) { if (param->alert_lvl) app_proxr_alert_start(param->alert_lvl); else app_proxr_alert_stop(); return (KE_MSG_CONSUMED); }
void app_proxr_enable(void) { // Allocate the message struct proxr_enable_req * req = KE_MSG_ALLOC(PROXR_ENABLE_REQ, TASK_PROXR, TASK_APP, proxr_enable_req); // init application alert state app_proxr_alert_stop(); // Fill in the parameter structure req->conhdl = app_env.conhdl; req->sec_lvl = PERM(SVC, ENABLE); req->lls_alert_lvl = (uint8_t) alert_state.ll_alert_lvl; req->txp_lvl = alert_state.txp_lvl; // Send the message ke_msg_send(req); }