/* Callback notifying an application that a remote device connection is currently congested and cannot receive any more data. An application should avoid sending more data until a further callback is received indicating the congestion status has been cleared.  */
void btgattc_congestion_callback(int conn_id, uint8_t congested)
/* Callback notifying an application that a remote device connection is currently congested and cannot receive any more data. An application should avoid sending more data until a further callback is received indicating the congestion status has been cleared.  */
void btgattc_congestion_callback(int conn_id, uint8_t congested)
{
    int index = -1;
    TLS_BT_APPL_TRACE_VERBOSE("%s, conn_id=%d\r\n", __FUNCTION__, conn_id);
    index = get_app_env_index_by_conn_id(conn_id);
	if(index<0)
	{
		TLS_BT_APPL_TRACE_ERROR("%s, congested=%d, conn_id=%d\r\n", __FUNCTION__, congested, conn_id);
		return;
	}
    TLS_HAL_CBACK(app_env[index].ps_callbak, congestion_cb, conn_id, congested);
}