/* Function for freeing instance. Instance identifier is provided in the parameter 'p_instance' in case the routine succeeds.  */
static __INLINE void connection_instance_free(uint32_t const *p_instance)
/* Function for freeing instance. Instance identifier is provided in the parameter 'p_instance' in case the routine succeeds.  */
static __INLINE void connection_instance_free(uint32_t const *p_instance)
{
    DM_TRC("[DM]:[CI 0x%02X]: Freeing connection instance\r\n", (*p_instance));
    if (m_connection_table[*p_instance].state != STATE_IDLE)
    {
        DM_LOG("[DM]:[%02X]: Freed connection instance.\r\n", (*p_instance));
        connection_instance_init(*p_instance);
    }
}