@l-hargrove
I was looking at our example (peripheral_server) and only if KE_MSG_CONSUMED = 0 , that it is safe to send a new notification.
I believe that CEVA has updated their documents and they went from GATT_CMP_EVT to GATTC_CMP_EVT .
int GATTC_CmpEvt(ke_msg_id_t const msg_id,
struct gattc_cmp_evt const *param,
ke_task_id_t const dest_id, ke_task_id_t const src_id)
{
/* Retrieve the index of environment structure representing peer device */
signed int device_indx = Find_Connected_Device_Index(KE_IDX_GET(src_id));
if (device_indx == INVALID_DEV_IDX)
{
return (KE_MSG_CONSUMED);
}
if (param->operation == GATTC_NOTIFY)
{
if (param->status == GAP_ERR_NO_ERROR ||
param->status == GAP_ERR_DISCONNECTED)
{
cs_env[device_indx].sent_success = true;
}
}
return (KE_MSG_CONSUMED);
}
// Status returned by a task when handling a message
enum ke_msg_status_tag
{
KE_MSG_CONSUMED = 0, ///< consumed, msg and ext are freed by the kernel
KE_MSG_NO_FREE, ///< consumed, nothing is freed by the kernel
KE_MSG_SAVED, ///< not consumed, will be pushed in the saved queue
};
Also you can see there is a picture to show this procedure in RSL10 firmware reference document.
Thank you for using our community forum.